
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2019 04:50 PM
hello community,
I farly new to APIs and Soap. I am trying to get my first script going but i cannot find what wrong am I doing.
my web browser keeps throwing this error
Fatal error: Uncaught Error: Class 'SoapClient' not found in C:\xampp\htdocs\FAC.php:24 Stack trace: #0 {main} thrown in C:\xampp\htdocs\FAC.php on line 24 .
here's my script:-
<?php
echo "<h1>Fac Info Test</h1>";
$host="callmanager pub ip address";
$username="admin username";
$password="admin password";
//disable cert check
//$context = stream_context_create(array('ssl'=>array('verify_peer_name'=>false,'allow_self_signed'=>true)));
// cert check with cert full pathinfo
//$context = stream_context_create(array('ssl'=>array('verify_peer_name'=>true,'allow_self_signed'=>true,'cafile'=>"/var/www/html/PHP-Sample/DS-UCM105.cisco.com.pem")));
$client = new SoapClient("C:\xampp\htdocs\AXLAPI.wsdl",
array('trace'=>true,
'exceptions'=>true,
'location'=>"https://".$host.":8443/axl",
'login'=>$username,
'password'=>$password,
));
function getFacInfo($client, $name) {
$returnedTags = array("name"=>"","code"=>"","authorizationLevel"=>"");
try {
$response = $client->getFacInfo(array("name"=>$name),array("returnedTags"=>$returnedTags));
}
catch (SoapFault $sf) {
echo "SoapFault: " . $sf . "<BR>";
}
catch (Exception $e) {
echo "Exception: " . $e . "<BR>";
}
echo("Uuid: ".$response->return->facInfo->uuid."<br>");
echo("Name: ".$response->return->facInfo->name."<br>");
echo("Code: ".$response->return->facInfo->code."<br>");
echo("Auth Level: ".$response->return->facInfo->authorizationLevel."<br>");
echo("<hr>");
}
?>
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 01:36 AM
As far as i see you have an error in SOAP Client.
This might be because this is not active in your php.ini
Do the following:
- Locate php.ini in your xampp folder
- Remove the ; from the beginning of extension=php_soap.dll
- Restart your web server
- Look up your phpinfo(); again and check if you see a similar picture to the one above
- If you do, problem solved!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 05:13 AM
The Error "Couldn't load from 'C: mpp\htdocs\AXLAPI.wsdl' "
seems to be because you reffer to C: mpp not C:\xmpp or it is a copy mistake.
I would suggest you put your wsdl and php file in one folder.
The you can reffer to /AXLAPI.wsdl or create a subdirectory maybe AXL the reffer to /AXL/AXLAPI.wsdl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 01:36 AM
As far as i see you have an error in SOAP Client.
This might be because this is not active in your php.ini
Do the following:
- Locate php.ini in your xampp folder
- Remove the ; from the beginning of extension=php_soap.dll
- Restart your web server
- Look up your phpinfo(); again and check if you see a similar picture to the one above
- If you do, problem solved!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 03:22 AM
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'C: mpp\htdocs\AXLAPI.wsdl' : failed to load external entity "C: mpp/htdocs/AXLAPI.wsdl" in C:\xampp\htdocs\FAC.php:39 Stack trace: #0 C:\xampp\htdocs\FAC.php(39): SoapClient->SoapClient('C:\nmpp\\htdocs\\A...', Array) #1 {main} thrown in C:\xampp\htdocs\FAC.php on line 39
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 05:13 AM
The Error "Couldn't load from 'C: mpp\htdocs\AXLAPI.wsdl' "
seems to be because you reffer to C: mpp not C:\xmpp or it is a copy mistake.
I would suggest you put your wsdl and php file in one folder.
The you can reffer to /AXLAPI.wsdl or create a subdirectory maybe AXL the reffer to /AXL/AXLAPI.wsdl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 01:48 AM
Hi,
Most likely you have caught this error because, you might have not enabled Soap Client in php.ini file.
SoapClient is an extension of PHP that must be enabled in your php.ini file in order to be extended,
Do the following to enable soap:
- Locate
php.ini
in your apache bin folder, I.eApache/bin/php.ini
- Remove the
;
from the beginning ofextension=php_soap.dll
- Restart your Apache server
HTH!
Regards,
Anusha B R
.
