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

Help with AXL and PHP - SOAP Fault Exception

Daniel Ball
Level 1
Level 1
<?php
$host="10.10.20.1";
$username="administrator";
$password="password";

 

$context = stream_context_create(array('ssl'=>array('allow_self_signed'=>true)));
 
$client = new SoapClient("AXLAPI.wsdl",
    array('trace'=>true,
'exceptions'=>true,
'location'=>"https://".$host.":8443/axl",
'login'=>$username,
'password'=>$password,
));
?>
 
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
$response = $client->getUser(array("userid"=>"user01"));
echo("First Name: ".$response->return->user->firstName)."<br>";
echo("Last Name: ".$response->return->user->lastName);
?>
</body>
</html>

 

Using the above code, I keep getting an error message -> "SoapFault: SoapFault exception: [HTTP] Could not connect to host..."

 

- I'm using the CUCM in DevNet. I'm connecting to it with anyconnect and the login credentials that are emailed to me when I reserve the CUCM.

- I'm sure the WSDL file is in the same directory as my main php file.

- I can successfully pull up a web page (Chrome), type in https://10.10.20.1/8443/axl and get a message that axl is working.

- Not sure if it matters, but I'm also using XAMPP to serve my php pages.

 

I've read elsewhere that other people have been able to solve this problem by using the hostname instead of an IP address. So, for $host, I've also tried, q-cucm-pub.abc.inc, q-cucm.cisco.com, and any other permutation I can think of in place of the ip address, but I get the same results.

 

 

SOAP has always been a mystery to me. Many thanks to anyone who might be able to help. 

0 Replies 0
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: