Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Subject: RE: Test page for XML API Replied by: Yaw-Ming Chen on 24-09-2010 04:38:44 PM Hi,
This forum is for UCXSI, so I think most likely won't have XML API expert will come here to address this question. By the way The xml-test page was deprecated long time ago. It was just for testing. User should use the CME XML interface directly.
Thanks !
Subject: RE: Test page for XML API Replied by: Darcy Schaffer on 06-10-2010 08:14:54 PM I'm working with Sebastien on this issue and have attempted to use the CME XML interface directly but am getting an error when I attempt to get the response. You mention that this forum is not the correct location to ask questions about this API. Could you suggest an alternative? Or maybe someone knows the answer? I'm sending this: <SOAP-ENV:Envelope> <SOAP-ENV:Body> <axl> <request xsi:type="ISgetGlobal"><ISgetGlobal></ISgetGlobal></request> </axl> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
to our CME server: http://<IP Address of the CME>/ISApi/AXL/V1/soapisapi.is
and getting this error: The underlying connection was closed: The connection was closed unexpectedly. Any help would be appreciated. Thanks, Darcy
Subject: RE: Test page for XML API Replied by: Yaw-Ming Chen on 06-10-2010 09:37:48 PM Don't know what is your applicatio but just like to let you know that provisionign SDK in UCXSI is using AXL. The Java APIs provided in the SDK are built to communicate with Cisco Unified CME via the existing XML interface The following is an example of using XML "ISgetGlobal" method by using UCXSI response = cme_http.getGlobal();
System.out.println("\n>>>>> Class : ISGlobal, including ISVoiceMail, ISUrlServices and ISUrlService<<<<\n "); System.out.println("CME Mode = " + response.getISGlobal().getISMode()); System.out.println("CME Version = " + response.getISGlobal().getISVersion()); System.out.println("quantity of current registered ephone = " + response.getISGlobal().getISDeviceRegistered()); System.out.println("quantity of ever registered ephone = " + response.getISGlobal().getISPeakDeviceRegistered()); System.out.println("ephone registered Time, hundredths of a second since system bootup = " + response.getISGlobal().getISPeakDeviceRegisteredTime()); System.out.println("Keep Alive Interval in second = " + response.getISGlobal().getISKeepAliveInterval()); System.out.println("quantity of configured ephone = " + response.getISGlobal().getISConfiguredDevice()); System.out.println("quantity of configured extension = " + response.getISGlobal().getISConfiguredExtension()); System.out.println("IP of the service engine (CUE) = " + response.getISGlobal().getISServiceEngine()); System.out.println("CME router hostname = " + response.getISGlobal().getISName()); System.out.println("Skinny Port Number = " + response.getISGlobal().getISPortNumber()); System.out.println("max number of conference allowed = " + response.getISGlobal().getISMaxConference()); System.out.println("max number of redirect allowed = " + response.getISGlobal().getISMaxRedirect()); System.out.println("max number of ephone allowed = " + response.getISGlobal().getISMaxEphone()); System.out.println("max number of ephone-dn allowed = " + response.getISGlobal().getISMaxDN()); System.out.println("Voice Mail = " + response.getISGlobal().getISVoiceMail()); //ISVoiceMail for (ISUrlService a: response.getISGlobal().getISUrlServices().getISUrlService()){ // ISUrlServices and ISUrlService System.out.println( "URL link = "+a.getISUrlLink()+" "+ "URL Type = "+a.getISUrlType()); }
Subject: RE: Test page for XML API Replied by: Darcy Schaffer on 06-10-2010 09:40:23 PM I'm actually using a C# application to send Web requests directly to the API url. The following is my test code.
/***** POST DATA NOW LOOKS LIKE THIS <SOAP-ENV:Envelope> <SOAP-ENV:Body> <axl> <request xsi:type="ISgetGlobal"><ISgetGlobal></ISgetGlobal></request> </axl> </SOAP-ENV:Body> </SOAP-ENV:Envelope> *****/
// convert the request into a byte array UTF8Encoding encoding = new UTF8Encoding(); byte[] postBytes = encoding.GetBytes(soapRequest);
// grab the CME url and user credentials from configuration string ciscoUrl = ConfigurationManager.AppSettings["CiscoExpressServerAddress"]; string ciscoUsername = ConfigurationManager.AppSettings["CiscoLogon"]; string ciscoPassword = ConfigurationManager.AppSettings["CiscoPassword"];
// create the request object WebRequest request = WebRequest.Create(string.Format("http://{0}/ios_xml_app/cme", ciscoUrl));
// set the username and password that is valid for this CME server request.Credentials = new NetworkCredential(ciscoUsername, ciscoPassword);
// send the request to the CME server Stream dataStream = request.GetRequestStream(); dataStream.Write(postBytes, 0, postBytes.Length); dataStream.Close();
// get the response WebResponse response = request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream());
// convert the response into a string to send back to the caller StringBuilder result = new StringBuilder(); string str = reader.ReadLine(); while (str != null) { result.AppendLine(str); str = reader.ReadLine(); }
return result.ToString();
Subject: RE: Test page for XML API Replied by: Darcy Schaffer on 06-10-2010 10:17:15 PM After I make the web request the following information is logged to the CME diagnostic log. Does the error message make any sense to you? 043094: Oct 6 22:09:38.389: its_urlhook url: /ios_xml_app/cme, method 2
043095: Oct 6 22:09:38.389: Wed, 06 Oct 2010 22:09:38 GMT 139.126.176.158 /ios_xml_app/cme auth_required
Protocol = HTTP/1.1 Method = POST
043096: Oct 6 22:09:38.389: Content-Type = text/xml
Content-Length = 69
043097: Oct 6 22:09:38.545: HTTP: Priv level granted 15
043098: Oct 6 22:09:38.549: CME got a raw XML message.
043099: Oct 6 22:09:38.549: doc 0x8B660FAC, doc->doc_type 4, req 0x8ADE7BF8
043100: Oct 6 22:09:38.549: Cannot extract bad formatted XML document
043101: Oct 6 22:09:41.549: its_urlhook url: /spa525G.cfg, method 1
043102: Oct 6 22:09:41.549: lds_urlhook, url=/spa525G.cfg
043103: Oct 6 22:09:41.621: its_urlhook url: /Cisco/SPA525G/68efbd28f5d2.cfg, method 1
043104: Oct 6 22:09:41.621: lds_urlhook, url=/Cisco/SPA525G/68efbd28f5d2.cfg
Subject: RE: Test page for XML API Replied by: Darcy Schaffer on 06-10-2010 08:53:15 PM A small update... I've tried another address for the CME API as well with a slightly different result. Hitting the page at: http://<CME SERVER ADDRESS>/ios_xml_app/cme results in an empty reponse (actually, one space character). Not really sure how to proceed as the documentation is fairly sparse. Anyone have any further information on the API?
Subject: RE: Test page for XML API Replied by: Darcy Schaffer on 06-10-2010 09:16:54 PM Thanks for the link! As far as I know the server has been configured but I'll pass this on to the engineer and go from there. By the way, I also found the Admininstration XML site which I believe is the more appropriate support forum for these questions so I'll be posting any follow up questions over there. Thanks for your help Yaw-Ming.
Subject: RE: Test page for XML API Replied by: Darcy Schaffer on 07-10-2010 04:02:49 PM Ahhh...found the problem with the Bad Request. I made an error when setting the content length of the post so the request was failing. I'm now able to query the CUCME Axl service and am getting data back. Again, thanks for your help. Darcy
Subject: RE: Test page for XML API Replied by: Yusuf Tiryaki on 07-12-2011 04:55:31 AM Hi, Is there anyone who tried XML APIwith .NET serialization ?
Subject: RE: Test page for XML API Replied by: Anusha Kannappan on 07-12-2011 05:17:50 AM Hi Yusuf,
As this forum is for UCXSI, You can try to post on the following tech center to get an answer for your query related to XML API http://developer.cisco.com/web/axl/home
Thanks, Anusha
Subject: RE: Test page for XML API Replied by: Yusuf Tiryaki on 07-12-2011 05:31:56 AM Hi Anusha, I try to develop a CUCME interface, so i think requested link is not going to work for me. Actually i try to migrate UCXSI to .NET C# and my problem is about xml responses from CUCME Axl service. Response xml is not well formed to deserialize, i recieved the response;
I am waiting for a response as ; <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > <SOAP-ENV:Body> <axl xmlns="cisco_cme_xml_namespace" > <response > <ISexecCLIRersult> <ISexecCLIResponse>1</ISexecCLIResponse> <ISexecCLIError>Invalid CLI in XML message: ephone 4 exempt</ISexecCLIError> </ISexecCLIRersult> </response> </axl> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: