cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1415
Views
0
Helpful
13
Replies

AXL Beginer

marwa_ads
Level 1
Level 1

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

13 Replies 13

stephan.steiner
Spotlight
Spotlight

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

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 = "http://schemas.xmlsoap.org/soap/envelope/\" ";

sAXLRequest += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> ";

sAXLRequest += " http://www.cisco.com/AXL/1.0\" ";

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\"> SEP000E7BC54F2A ";

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

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

ErrorInvalid access to memory location.

"

Thanks,

Marwa

wschochet
Level 1
Level 1

Here is a handy little page that I use to launch SOAP messages at my Call Manager. You'll want to change the User and Password entries in line 17 as well as the host/name / IP address in line 47 to match your environment. Written by someone much smarter than I....

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

Hello,

the URL and port numbers are different for CCM 4.x and 5.x/6.x

For CCM 4.x

https://$CCM/CCMApi/AXL/V1/soapisapi.dll

For CCM 5.x and 6.x

https://$CCM:8443/axl/

Regards.

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...

All:

I was trying to use the getPhone.htm file with following sample code provided in the manual:

http://schemas.xmlsoap.org/soap/envelope/">

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">

SELECT * from numplan

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.

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.

in cucm5.x & 6.x you need to post your axl here;

https://cucm:8443/axl/

Can you give me the plan how I can run getPhone.htm to retreive info from DB?

Run in browser?

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?

keithlunn
Level 1
Level 1

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

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: