Uncaught SoapFault exception / Invalid parameters Error

I am using nusoap library to connect to Kintera API.  It worked fine on my other sites, but this one was giving me the following error message:

Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() [<a href=’soapclient.soapclient’>soapclient.soapclient</a>]: Invalid parameters in /test.php:147 Stack trace: #0 /test.php(147): SoapClient->SoapClient(‘KinteraConnect….’, true) #1 {main} thrown in /test.php on line 147

Line 147 has the following code:

$client = new soapclient($wsdl,true);

After reading up online a bit, it seems this error appears on PHP 5 servers because of class name conflicts. So I opened up nusoap.php file and figured that you could just use nusoap_client as a class name. Code piece from nusoap.php

if (!extension_loaded('soap')) {

/***    For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded.*/

class soapclient extends nusoap_client {

}

}

So I just went ahead and changed

$client = new soapclient($wsdl,true);

to

$client = new nusoap_client($wsdl,true);

and it fixed it.

Advertisements

55 thoughts on “Uncaught SoapFault exception / Invalid parameters Error

  1. Thanks, it really helped a lot. Some existing applications have the old version of nusoap.php that doesn’t have the snippet code you paste there. Don’t forget to download updated nusoap files from their project page.

  2. david

    sorry, post again because your contact section isn’t available. i want to know if maybe you have a tutorial about web services, because i want know more about this subject (for example, create my own web service with autentification) because the tutorials that i has seeing only create the web service and communicate with the client without autentification. Thanks a lot again

  3. Jubayer Arefin

    I was trying to use the nusoap but got the same error. I just changed the class name just like you did and it solved my problem.

    Thanks.

  4. Rakeshp

    Hey,Thanks a ton, you tip has really worked for me, and things worked after doing a lot of google, fortunate to find the solution from you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s