Hi to everyone.
A friend of mine implemented a web service and she can consume it when running Apache with WAMPP. When I try to consume the same web service with the same code I get:
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() [<a href='soapclient.soapclient'>soapclient.soapclient</a>]: Invalid parameters in C:\xampp\htdocs\Prueba\clienteUsuario.php:7 Stack trace: #0 C:\xampp\htdocs\Prueba\clienteUsuario.php(7): SoapClient->SoapClient('http://localhos...', true) #1 {main} thrown in C:\xampp\htdocs\Prueba\clienteUsuario.php on line 7
I'm using XAMPP 1.7.2. Then I tried to consume the web service in an application developed with Yii and I get:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/Prueba/wsUsuario.php?wsdl' : Premature end of data in tag definitions line 2
problem with web service
Moderator: General Moderators
Re: problem with web service
I'm not sure what your question is. But the first error looks like you are sending a second parameter of true instead of an array. It should be
see php.net docs.
The second error looks like the wsdl contains invalid xml.
Code: Select all
$client = new SoapClient($wsdl, $arrayOfOptions);The second error looks like the wsdl contains invalid xml.