« Back to Administration XML Questions

Problem AXL +C# .net visual studio 2008

Combination View Flat View Tree View
Threads [ Previous | Next ]
I'm making a tool in visual studio 2008 using C# for call manger 6.1.2.1000-13 using the axl webservice

i have downloaded the 2 files from the callmanger and created the class using wsdl.exe

after that i followed the instructions readme.txt
then i created an object from that class.
and ask a simpel thing like

ListUserByNameRes res = axl.listUserByName(req);
here is when i get an error and the object res is null
the error that VS gives me is
Object reference not set to an instance of an object

wen i tracert the axl service in real time monitor i see this.
{coloremoticon000000}2008-10-25 04:34:24,629 INFO [http-8443-Processor16] axl.AXLRouter - Received request 1224730975334 from admin at IP 10.0.0.2
2008-10-25 04:34:24,630 INFO [http-8443-Processor16] axl.AXLRouter - <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><listUserByName xmlns="http://www.cisco.com/AXL/1.0"><firstname xmlns="">*</firstname><lastname xmlns="">renier</lastname><searchLimit xmlns="">0</searchLimit></listUserByName></soap:Body></soap:Envelope>
2008-10-25 04:34:24,661 INFO [http-8443-Processor16] axl6_0.Handler - Handler initializing
2008-10-25 04:34:24,666 INFO [http-8443-Processor16] axl.AXLRouter - <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><axl:listUserByNameResponse xmlns:axl="http://www.cisco.com/AXL/API/1.0" xmlns:xsi="http://www.cisco.com/AXL/API/1.0"><return><user userid="renier"><firstname>renier</firstname><lastname>renier</lastname></user></return></axl:listUserByNameResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
2008-10-25 04:34:24,667 INFO [http-8443-Processor16] axl.AXLRouter - Request 1224730975334 was process in 82ms{color}

has someone any idee why i don't recieve that in visual studio?
and my object is null?

thanks
renier

Some older versions (4.x and earlier) of AXL returned the incorrect namespace in their SOAP response messages. As of CM5.x, a service parameter was added to the DBL Layer Monitor service (under Advanced) that controls whether AXL continues to return the incorrect namespace (for backward compatibility) or returns the correct namespace.

I can see in your AXL log snippet that AXL is providing

xmlns:axl="http://www.cisco.com/AXL/1.0"

instead of

xmlns="http://www.cisco.com/AXL/API/1.0"

This likely causes .NET to consider the SOAP message non-relevant and ignore it, returning a null.

You would need to change the service parameter so that AXL returns the matching namespace. Note, this could cause a conflict with other AXL applications which have been hard-coded to work with the old/incorrect namespace.

thanks, now it is working i based myself on this post. because i am just learning about it an it is kinda new for me

http://developer.cisco.com/web/axl/forums?src=/forums/thread.jspa%3FthreadID%3D29593%26tstart%3D15

thank you make my weekend is good
renier

Edited by: de witte renier on 24-okt-2008 9:48