NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Uncaught SoapFault exception: [WSDL] SOAP-ERROR:


Joined: 24 Mar 2008
Posts: 2
Reply with quote
Hello!

I'm new to SOAP, and i am trying to familiarize myself with PHP5 and SOAP.

I have copied an example on the web, and it should work, however, I am getting this error:

Code:

Warning: SoapClient::__construct(http://localhost:8048/xml/server_array.php) [function.SoapClient---construct]: failed to open stream: Connection refused in /var/www/html/xml/client_side.php on line 6

any suggestions please? or should I post the examples as well?

regards!
William
View user's profileFind all posts by dragunuSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
This forum relates to nusoap library, not php_soap extension.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Mar 2008
Posts: 2
Reply with quote
dmitri wrote:
This forum relates to nusoap library, not php_soap extension.


hey.
thanks for the reply, however, I am trying to use nusoap library and im having that error.
can you kindly give me some hints lease? Smile

thanks,
will
View user's profileFind all posts by dragunuSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
from the error it looks like you use php_soap instead of nusoap.
Could you please make sure what you use?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 08 Apr 2008
Posts: 2
Reply with quote
dmitri wrote:
from the error it looks like you use php_soap instead of nusoap.
Could you please make sure what you use?


Hello dmitri,

Not wanting to predict what the OP is using. But I experienced similar problems while I'm evaluating your excellent PhpED. It turns out the IDE generated code (under the NuSoap Client tab and NuSoap Wizard) uses the soapclient object.

An example of the code generated:
Code:

<?php
$wsdlURL = "http://www.webservicex.com/CurrencyConvertor.asmx?wsdl";
$soap = new soapclient($wsdlURL, "wsdl");

$parameters['parameters']['FromCurrency'] = "";
$parameters['parameters']['ToCurrency'] = "";
$result = $soap->call("ConversionRate", $parameters);
if($error = $soap->getError()){ die($error);}
?>


Naturally, soapclient constructor has a wrong 2nd parameter type above and there's no call() method.

The solution is to just change that 2nd line to use the correct object; nusoap_client. But it may be confusing for many. Including me who was only able to solve this after realizing there might be a bug in the code generation process under PhpED and the wrong object was being used.
View user's profileFind all posts by Mario FigueiredoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Naturally, what you're using is not nusoap.
It's php_soap extension that although has the same class names, uses different api and it looks like you're using it by mistake (if you want to check, please try to step-in into the soapclient constructor).

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 08 Apr 2008
Posts: 2
Reply with quote
dmitri wrote:
Naturally, what you're using is not nusoap.
It's php_soap extension that although has the same class names, uses different api and it looks like you're using it by mistake (if you want to check, please try to step-in into the soapclient constructor).


Correct. But that's because I have the PHP SOAP extension loaded, which deems nusoap's own soapclient class unusable. I understand from the documentation this is by design (and it makes sense to me since this class is only offered for backwards compatibility).

However, for a newcomer to SOAP it is confusing. The PhpED wizard generates code that doesn't work on those cases where PHP SOAP is loaded. Users think it's NuSoap fault and ask. It isn't... but the fact they did all things right from their point of view, makes them think it is. That's my 2c only.

Don't forget many (?)AMP default configurations include PHP SOAP extension (I can confirm this for WAMP and XAMPP).
View user's profileFind all posts by Mario FigueiredoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
I understand from the documentation this is by design

not, of course not. It's loosy developers picked a name that is already in use.

Quote:
I have the PHP SOAP extension loaded, which deems nusoap's own soapclient class unusable

no, of course not. You can still use it under nusoap_client() name.

Quote:
Don't forget many (?)AMP default configurations include PHP SOAP extension

it's a really new extension and not that widely spreaded.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Uncaught SoapFault exception: [WSDL] SOAP-ERROR:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic