Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Consuming AXL via C# web service calls


since the axlapi.wsdl is quite messed up, I played around making stubs of my own, since I actually need only a few API calls.

I started with one stub class:

public class AXLService : System.Web.Services.Protocols.SoapHttpClientProtocol



[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://[ccmip]/CCMApi/AXL/V1/soapisapi.dll", RequestElementName="listPhoneByName", RequestNamespace="", ResponseElementName="listPhoneByNameResponse",ResponseNamespace="", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public System.Data.DataSet ListPhoneByName(string searchString) {

object[] results = this.Invoke("ListPhoneByName", new object[] { searchString });

return ((System.Data.DataSet)(results[0]));



I managed to call the above AXL function (listPhoneByName) successfully. However, I do not get any response data. results[0] is null, although the request is successful and returns SOAP data, as I peeked in via Ethereal.

Is there anything I missed?

Kind regards and TIA,


New Member

Re: Consuming AXL via C# web service calls

It's hard to tell from whats posted.

If the request is coming back null, then .NET is expecting 'X' XML, but is getting back 'Y' XML. So, the answer is going to lie in the definition of the class listPhoneByNameResponse. Can you paste that here?

Also, can you paste the ethereal trace?

New Member

Re: Consuming AXL via C# web service calls

Oh yeah, the first thing I would look for is the namespace on the response XML. I think you might see a disconnect from the response class namespace (declared in your snippet as http:\\...AXL\1.0 and what you see on ethereal

New Member

Re: Consuming AXL via C# web service calls

Here is the TCP stream output from Ethereal:


POST /CCMApi/AXL/V1/soapisapi.dll HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2032)

Content-Type: text/xml; charset=utf-8

SOAPAction: "http:///CCMApi/AXL/V1/soapisapi.dll"

Authorization: Basic Qxxx=

Content-Length: 348

Expect: 100-continue


HTTP/1.1 100 Continue

Server: Microsoft-IIS/5.0

Date: Mon, 19 Dec 2005 12:49:28 GMT" xmlns:xsi="" xmlns:xsd="">">%


HTTP/1.1 200 OK

Content-Type: text/xml

Content-Length: 1165" SOAP-ENV:encodingStyle="">" xmlns:xsi="" xsi:schemaLocation=" http:///CCMApi/AXL/V1/axlsoap.xsd">


Cisco IP Communicator

Cisco IP Communicator


I'm afraid the namespace might indeed bear the problem. The namespaces are the same, i.e. I guess, it's because the response packet has an "axl:" namespace prefix, but I can't simply add it to ResponseElementName in the Web service call. .NET does obviously not find the right XML tag in the response stream. Hence, a call as

AXLService foobar = new AXLService();

System.Data.DataSet ds = foobar.ListPhoneByName("%");

returns ds = null.

One thing I could try is to retrieve the stream myself and parse the inner XML, which is little off the road, unless I get the ns tag thing fixed, right?

New Member

Re: Consuming AXL via C# web service calls

1) .NET is capable of figuring out soap requests, so don't give up! Parsing by hand really defeats the whole purpose

2) I don't see the problem. Did you generate by hand the listPhoneByNameResponse class? If you did or not, could you please paste its definition, as well as other classes found within that class?

New Member

Re: Consuming AXL via C# web service calls

1) You're right, but don't reaching the result while seeming so close to it, kindles frustration.

2) There is no such class. As far as I understood it, .NET should handle encoding/decoding via SOAP based on the XML schemas alone. listPhoneByNameResponse is purely referring to the XML tag in the response message.

CreatePlease login to create content