05-29-2008 12:31 AM - edited 03-13-2019 05:17 PM
Dear Sir,
I am an AXL Beginer Developer, I need any simple example using AXL to begin with.
I need to know format of the file, is it .asp file or xml file?
Thanks,
Marwa
05-29-2008 12:55 AM
All call manager programming guides are available from this page: http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_reference_guides_list.html
06-02-2008 12:34 AM
Dear Stephan,
Thanks alot for your help, I read the java example in the AXL programming guide for CM 4.2(3).. I tried it, but it doesn't work with me, i receive the following error:
"
HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.0
"
I don't know why... could you help me please..
this is the code:
import java.io.*;
import java.net.*;
class main
{
public static void main(String[] args)
{
//Declare references
String sAXLSOAPRequest = null; // will hold the complete request,
// HTTP header and SOAP payload
String sAXLRequest = null; // will hold only the SOAP payload
Socket socket = null; // socket to AXL server
OutputStream out = null; // output stream to server
InputStream in = null; // input stream from server
byte[] bArray = null; // buffer for reading response from server
// Build the HTTP Header
sAXLSOAPRequest = "POST /CCMApi/AXL/V1/soapisapi.dll\r\n";
sAXLSOAPRequest += "Host: 10.30.0.10:80\r\n";
sAXLSOAPRequest += "Authorization: Basic"+authstring+"\r\n";
//sAXLSOAPRequest += "Authorization: Basic bGFycnk6Y3VybHkgYW5kIG1vZQ==\r\n";
sAXLSOAPRequest += "Accept: text/*\r\n";
sAXLSOAPRequest += "Content-type: text/xml\r\n";
sAXLSOAPRequest += "Content-length: ";
// Build the SOAP payload
sAXLRequest = "
sAXLRequest += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> ";
sAXLRequest += "
sAXLRequest += " xsi:schemaLocation=\"http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd\" ";
//sAXLRequest += " xsi:schemaLocation=\"http://www.cisco.com/AXL/1.0 http://localhost/schema/axlsoap.xsd\" ";
sAXLRequest += "sequence=\"1234\">
sAXLRequest += " ";
// finish the HTTP Header
sAXLSOAPRequest += sAXLRequest.length();
sAXLSOAPRequest += "\r\n\r\n";
// now add the SOAP payload to the HTTP header, which completes the AXL SOAP request
sAXLSOAPRequest += sAXLRequest;
// now that the message has been built, we can connect to server and send it
try
{
socket = new Socket("10.30.0.10", 80);
out = socket.getOutputStream();
in = socket.getInputStream();
// send the request to the host 10 AXL Programming Guide for Cisco Unified CallManager 4.2(3)OL-10660-01 Throttling of Requests
out.write(sAXLSOAPRequest.getBytes());
// read the response from the host
StringBuffer sb = new StringBuffer(2048);
bArray = new byte[2048];
int ch = 0;
int sum = 0;
while ( (ch = in.read(bArray)) != -1 )
{
sum += ch;
sb.append(new String(bArray, 0, ch));
}
socket.close();
// output the response to the standard out
System.out.println(sb.toString());
} catch (UnknownHostException e)
{
System.err.println("Error connecting to host: " + e.getMessage());
return;
} catch (IOException ioe)
{
System.err.println("Error sending/receiving from server: " +
ioe.getMessage());
// close the socket
try
{
if (socket != null) socket.close();
} catch (Exception exc)
{
System.err.println("Error closing connection to server: " +
exc.getMessage());
}
return;
}
}
}
Thanks alot,
Marwa
06-02-2008 02:22 AM
Dear Stephan,
I enabled Basic Authentication in the IIS of the CM, But the error now is changed, the following appears in the debugger:
"
HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.0
Date: Sun, 01 Jun 2008 18:34:04 GMT
Content-Type: text/html
Content-Length: 94
"
Thanks,
Marwa
06-03-2008 09:20 AM
07-02-2008 11:29 AM
Any one know what you need to do to modify this to work with CCM 5.x / 6.x. This works find for CCM 4.x but I get errors with 6.x
07-08-2008 09:14 PM
07-09-2008 06:45 AM
Thanks I did get mine working, however I my system did not work with the https://$CCM:8443/axl/ Only https://$CCM/axl/
For some reason my AXL responds on the normal 443 port. I also found that I have issue with the SSL certificate. Because im using msxml2.xmlhttp to post the soap requests, I have to firsy open a browser to the CCM server accept the SSL cert with a warning about the name vs IP, then my post would work...
07-17-2008 10:34 AM
All:
I was trying to use the getPhone.htm file with following sample code provided in the manual:
xmlns:axlapi="http://www.cisco.com/AXL/API/1.0"
xmlns:axl="http://www.cisco.com/AXL/API/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.cisco.com/AXL/API/1.0 axlsoap.xsd">
But it doesn't give me any values and I can see the "error on page" msg.
Please let me know where/how should I see the results and detect the errors in the XML or HTML.
FYI - this is my first attempt on AXL side of it.
Thank You
Ramesh V.
08-21-2008 02:21 PM
Hi
I am trying to run this getPhones but I am getting the error "the requested resource CCMApi/AXL/V1/soapisapi.dll is not available.
I am using CUCM 6.1.2 and don't know how to change for it. I changed the line
var reqString = "http://"
to
var reqString = "https://"
but could not manage to change the port, if needed.
When I access the CUCM via the browser the ccm admin page runs under the 8443 port.
I am getting the same erros on the logs of the CUOM application and I am looking how to troubleshoot to see if some configuration on the CUCM 6.1.2 is missing.
Any help is appreciated.
08-21-2008 02:32 PM
in cucm5.x & 6.x you need to post your axl here;
03-17-2009 05:18 AM
Can you give me the plan how I can run getPhone.htm to retreive info from DB?
Run in browser?
07-01-2009 05:09 AM
Hello.
Could you answer for my question?
Can you give me the plan how I can run getPhone.htm to retreive info from DB?
Run in browser?
07-01-2009 05:58 AM
There ia actually an AXL forum and message board which is probably a better place to post AXL questions there:
http://developer.cisco.com/web/axl/forums/-/message_boards/category/1052601
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: