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

AXL Request to CCM 6.0 with C# Visual 2008

Hi !

I posted into the Developper's forum but no response.

I view some of you are posting here about Application Dev, so i'll try here too.

I'm trying to manually send AXL Soap REQUEST to my CallManager 6.0. (Without the toolkit class, because it's too slow!)

But when i send my request, i get response which is the HTML home page AXL webservice.

Here is the response :

< html>< head>< title>Cisco CallManager: AXL Web Service</ title></ head><body>

<h1>Cisco CallManager: AXL Web Service</h1>

The AXL Web Service is working and accepting requests.

Use HTTP POST to send a request.

</ body></ html>

I want to have the AXL RESPONSE to my <axl:getPhone> request.

Here is my code :

I'm using HttpWebRequest & HttpWebResponse to make my request.

Requete = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2000/10/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\"> ";

Requete += "<SOAP-ENV:Body> ";

Requete += "<axl:getPhone" xmlns:axl=\"http://www.cisco.com/AXL/1.0\" xsi:schemaLocation=\"http://www.cisco.com/AXL/1.0 http://ccmserver/schema/axlsoap.xsd\" sequence=\"1234\"> <phoneName>myPhoneName</phoneName>";

Requete += "</axl:getPhone> ";

Requete += "</SOAP-ENV:Body> ";

Requete += "</SOAP-ENV:Envelope> ";

public String sendRequest()

{

ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };

String strUriHttps = @"https://myCCMServerIP:8443/axl";

HttpWebRequest oWRequest = (HttpWebRequest)HttpWebRequest.Create(new Uri(strUriHttps));

oWRequest.Method = "POST";

oWRequest.ContentType = "text/xml";

oWRequest.ProtocolVersion = System.Net.HttpVersion.Version10;

NetworkCredential nc = new NetworkCredential("myLogin", "myPassword");

CredentialCache cc = new CredentialCache();

cc.Add(new Uri(strUriHttps), "Basic", nc);

oWRequest.Credentials = cc;

oWRequest.Headers.Add("SOAPAction", "CUCM:DB ver=6.0");

oWRequest.ContentLength = Requete.Length;

Stream stream = oWRequest.GetRequestStream();

stream.Write(System.Text.Encoding.ASCII.GetBytes(Requete), 0, Requete.Length);

stream.Close();

HttpWebResponse oWResponse = (HttpWebResponse)oWRequest.GetResponse();

Stream recStream = oWResponse.GetResponseStream();

StreamReader readStream = new StreamReader(recStream, Encoding.UTF8);

String rep = readStream.ReadToEnd();

return rep;

}

I want XML (AXL Soap) response, to use it to retrieve information from my request sent manually.

Someone could help me please ?

Thanks in advance.

1 REPLY
Community Member

Re: AXL Request to CCM 6.0 with C# Visual 2008

I solved the problem.

Please, look at the DEVELOPER'S CISCO FORUM at "Application XML Layer (AXL/Serviceability)" at this topic :

"Application XML Layer (AXL/Serviceability): AXL Request - CCM 6.0 - with C# .NET 3.5 - Without AXLAPIService.cs - HELP?"

http://forums.cisco.com/eforum/servlet/CDN?page=cdn&forum=Cisco%20Unified%20Communications%20Manager&topic=Application%20XML%20Layer%20(AXL/Serviceability)&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.2cbfb61e

You will found the solution.

For more information, contact me.

1397
Views
3
Helpful
1
Replies
CreatePlease to create content