cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
168
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Victor Manuel Garcia Ternero on 30-03-2011 07:37:58 PM
Hello, I am trying to use SOAP to modify call forward all in a DN. I am not sure if the scheme I have is the correct:

Win2003 with IIS

CCM 6.1

I have created an example webpage with the follwing code:

POST: 8443/axl/
Host: 10.200.0.7:8443
Accept: text/*
Authorization: Basic bGFycnk6Y3VybHkgYW5kIG1vZQ==
Content-type: text/xml
SOAPAction: "CUCMB ver=6.1"
Content-length: 613

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Body>
<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>SEP000000000001</phoneName>
</axl:getPhone>
</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

I have saved it as .asp, .soap, .xml, .html... and it doesn't work, we receive an error in the first line. What is it wrong?

Thanks in advance.

Regards.

Subject: RE: Problems using SOAP with CCM
Replied by: Bin L on 30-03-2011 07:50:23 PM
Hi mate

May i ask you what is your logic to save it as .asp, soap, xml?
The sample code you provided which was a soap request which used to send a <getPhone> soap request to your CCM.
And i think you might need to send this request through your application.

Subject: RE: Problems using SOAP with CCM
Replied by: Victor Manuel Garcia Ternero on 31-03-2011 05:57:46 AM
Hi mate

May i ask you what is your logic to save it as .asp, soap, xml?
The sample code you provided which was a soap request which used to send a <getPhone> soap request to your CCM.
And i think you might need to send this request through your application.


 
Hello, as you can see I'm not a developer engineer, so I really unknow this scheme of work. I think what I need is a asp script in which I embbed the SOAP code and transfer it to the CCM via HTTP POST, is it correct? Do you have an example script to see how it works?
Thanks.
Regards.

Subject: RE: Problems using SOAP with CCM
Replied by: Aaron Graham on 03-06-2011 03:48:26 AM
You may have fallen for the same problem I had. In most of the examples in the XML developers guide, the same HTTPS header is used with the same content length (613). This content length actually depends on the size of the SOAP payload. The examples didn't reflect this. Here is what I used to generate the HTTPS header for a given soap payload string (note the GetLength() call):
/*****************************************************************************/
//
// METHOD:GenerateAndAttachHTTPSHeader()
//
// PURPOSE:  This method creates an HTTP header based on the current
//  m_ManagementAddress and m_ManagementIPPort values, and the size of the given
//  SOAP_RequestEnvelope text string. This header is placed at the beginning
//  of the given SOAP_RequestEnvelope text and the collective text is returned
//  to the caller.
// 
// Returns : CString
//
/*****************************************************************************/
CString SSL_ConnectionHandler::GenerateAndAttachHTTPSHeader(CString SOAP_RequestEnvelope)
{
CString strHTTPHeader;
CString hostLineDetails;
CString ContentLengthLineDetails;
hostLineDetails.Format("Host: %s:%d\n",(char*)(LPCSTR)m_ManagementAddress,m_ManagementIPPort);
ContentLengthLineDetails.Format("Content-length: %d\n",SOAP_RequestEnvelope.GetLength());
strHTTPHeader = "POST /axl/ HTTP/1.1\n";
strHTTPHeader += hostLineDetails;
strHTTPHeader += "Accept: text/*\n";
strHTTPHeader += "Authorization: Basic ";
  strHTTPHeader += m_authorisationText.c_str(); // add authorisation text.
strHTTPHeader += "\nContent-type: text/xml\n";
strHTTPHeader += ContentLengthLineDetails; // add Content-Length test for current request
strHTTPHeader += "Connection: Keep-Alive";
strHTTPHeader += "\n\n";
// put the HTTP header and SOAP XML together
return strHTTPHeader + SOAP_RequestEnvelope;
}

Of course, you should also make sure that:
1) You have enabled the All important AXL Service in the CUCM. (Without this you get a HTTP 404 error if I remember right).
2) The authorisationText in the header matches a valid CUCM End User whose User Group has the appropriate "Roll" associated for AXL access.

Subject: RE: Problems using SOAP with CCM
Replied by: Geoffrey Carman on 15-02-2013 11:28:07 AM
Victor Manuel Garcia Ternero:
Hello, I am trying to use SOAP to modify call forward all in a DN. I am not sure if the scheme I have is the correct:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Body>
<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>SEP000000000001</phoneName>
</axl:getPhone>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I have saved it as .asp, .soap, .xml, .html... and it doesn't work, we receive an error in the first line. What is it wrong?


 
First, get SOAPUi from www.soapui.com (Free version is fine).  Then open the WSDL in it, find the getPhone API, set the Auth username and password, set the endpoint (URL) and test with that.
 
This is the getPhone API.  You want to updatePhone when you are ready and change the element you care about. 
Getting Started

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:

Quick Links