cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
862
Views
0
Helpful
7
Replies

Axl problems with simple example

fredroines
Level 1
Level 1

I have been working on AXL stuff, so but I m still not able to get the correct respond from CCM server…

I done everything to get it but not luck at the moment … so below you can see that I have all result using the same example that Cisco AXL documentation show, so

As you can see, the request seems ok but the there some odd with the final part of the respond… Finally I included a “Debug” on my script to make a trace, so

I got an issue on soap respond from the service…

2008-04-03 15:20:43.632667 nusoap_parser: found root struct Fault, pos 3

2008-04-03 15:20:43.634322 nusoap_parser: in buildVal() for Error(pos 7) of type

2008-04-03 15:20:43.634892 nusoap_parser: in buildVal, there are children

2008-04-03 15:20:43.635463 nusoap_parser: in buildVal, adding Java Vector or generic compound type Error

2008-04-03 15:20:43.636090 nusoap_parser: in buildVal, return:

array(3) {

["code"]=>

&string(4) "5001"

["message"]=>

&string(33) "Content is not allowed in prolog."

["request"]=>

&string(0) ""

}

As I know , this kind of the error or issue is due to the way how the soap xml is build and xml must not bring any blank lines inner and seems it does.

Anyway just as information, I m doing it

WEB SERVER : APACHE

PHP 5.x

PHP Libraries or extensions:

PHP_CURL

PHP_SOAP

NUSOAP

Please let me know if somebody REALLY can help me

IF YOU HAVE ALREADY A COMPLETE EXAMPLE THAT REALLY WORK , WOULD BE GOOD

ANY CAN CONTACT ME VIA EMAIL IN CASE

IF THERE IS WE FIX IT WE CAN CREATE A GOOD EXAMPLE DOCUMENT WHICH WOULD BE GOOD FOR EVERYBODY AND USING PHP.

fredroines@yahoo.com

Best regards

Frederick

7 Replies 7

stephan.steiner
Spotlight
Spotlight

Most people that frequent this board do not use PHP I'm afraid.

However, in the end it's all the same and what really matters is the plaintext you're sending to the CCM.. so post that here and we can see if there's something to be figured out.

Also, activate debug level traces on the AXL Service (from the serviceability pages), and download those logs.. they will tell you quite a bit - often more than the error response.

And.. when do you get that error? when creating the request or when parsing the response? What ccm version do you have and do you create your requests by hand following the schema or using a code generator (the latter is unfortunately still flaky.. just today I found several issues in the very latest ccm release).

Hi Stephan,

I think that should not have problem with PHP I think, but anyway I have attached the file.

About your question

it seems problems when parsing the response but quite sure CCM version is 5.1

I did the code by hand based on the documentation from AXL cisco i did same example.

Thanks in advance

Fred.

I also playing around with AXL and PHP. But i don't know how to auth with the CCM.

Can you post your PHP Code with the HTTP Header for example?

Hi Cend

Well, you can do that using the soapclient

http://xref.moodle.org/nav.html?lib/soap/nusoap.php.html

Please if you fix the problem share with us and send a complete example

My example:

$soap_out .= "Host: CCMIP:8443/axl/\r\n";

$soap_out .= "Accept: text/*\r\n";

$soap_out .= "Authorization: Basic " . base64_encode($credentials) . "\r\n";

$soap_out .= "Content-Type: text/xml\r\n";

$soap_out .= "SOAPAction: CUCM:DB ver=6.0" . "\r\n";

$soap_out .= "Content-length: ".strlen($xml_data) . "\r\n";

$soap_out .= "Connection: Keep-Alive\r\n";

//Request

$soap_out .= $xml_data . "\n";

$client = new soapclient('https://CCMIP:8443/axl/');

$client->setCredentials('userid','pass','basic');

$client->send($soap_out,'CUCM:DB ver=6.0',30,30,'');

echo '

Response

' . htmlspecialchars($client->response, ENT_QUOTES) . '
';

Hi Frederick,

i try my best and keep you up running.

Thanks for example

The requests look good. What do you get back from the callmanager (also plaintext please and prior to any parsing or modification).?

Response

HTTP/1.1 200 OK

Set-Cookie: JSESSIONIDSSO=2320C9A97919E1D8B550BB7000C9AE6A; Path=/

Set-Cookie: JSESSIONID=26AD3835AF03B2FE3490A47E123FFBFA; Path=/axl; Secure

SOAPAction: ""

Content-Type: text/xml;charset=utf-8

Content-Length: 521

Date: Thu, 03 Apr 2008 14:20:43 GMT

Server: Apache-Coyote/1.1

http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

SOAP-ENV:ClientContent is not allowed in prolog.http://www.cisco.com/AXL/1.0">5001Content is not allowed in prolog.