Reputation: 103
i'm trying to make a test with wsdl , soap and php , and i'm gettin the error :
Fatal error: Uncaught SoapFault exception [wsdl] SOAP-ERROR
I have for now 2 files , one is a given wsdl , and client.php just for test:
<?php
$sClient = 'http://localhost/test/service/wbs.wsdl';
$wsdl = new SoapClient ( '$sClient') ;
echo "test";
?>
and i'm getin this error :
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ' hp://localhost/test/service/wbs.wsdl' : failed to load external entity " hp://localhost/test/service/wbs.wsdl" in C:\wamp\www\Outbound\client.php:4 Stack trace: #0 C:\wamp\www\test\client.php(4): SoapClient->SoapClient(' hp://localh...') #1 {main} thrown in C:\wamp\www\test\client.php on line 4
I did change the extension of soap in php.ini , i did all the modification posted in other posts , but nothing works .
Upvotes: 1
Views: 5398
Reputation: 191
Try it
$client = new SoapClient("http://{$_SERVER['HTTP_HOST']}/test/service/wbs.wsdl");
Upvotes: -2
Reputation: 2815
$wsdl = new SoapClient ( '$sClient') ;
This would not work. Use:
$wsdl = new SoapClient ( "$sClient") ;
Or - better:
$wsdl = new SoapClient ( $sClient) ;
Upvotes: -1