Reputation: 109
Alright, I'm tired of racking my brain on this, so hopefully someone here can enlighten me:
I'm trying to access a SOAP service using PHP and nuSOAP. While I have successfully accessed the service using PHP5's built-in SoapClient, I am unfortunately limited to PHP4, and using nuSOAP; resulting in a WSDL error that I can't figure out.
The PHP5 code (works):
$wsdl= 'https://mybilling.hipointinc.com:8443/wsdl.fcgi?get=Session.xsd';
$soap_client = new SoapClient($wsdl, array('trace'=>1));
$args = array("login" => $account_id, "password" => $password, "domain" => $domain);
$session = $soap_client->login($args);
The nuSOAP code (doesn't work):
$wsdl= 'https://mybilling.hipointinc.com:8443/wsdl.fcgi?get=Session.xsd';
$namespace = 'https://mybilling.hipointinc.com/UM/SOAP/Session';
$soap_client = new soapclient($wsdl, true, null, $namespace);
$args = array("login" => $account_id, "password" => $password, "domain" => $domain);
$session = $soap_client->call('login', array($args));
This returns the following error:
wsdl error: http://schemas.portaone.com/soap:LoginRequest (LoginRequest) is not a supported type.
Why does the PHP5 version work, while the nuSOAP version doesn't? I'm sure it just something stupid I've overlooked, but I would appreciate some help.
For more info, I'm using the Porta Switch, PortaBilling XML API: documentation
Upvotes: 1
Views: 1314
Reputation: 109
Ok, after exploring this some more, I finally came to the answer: I had to upgrade the version of the nuSOAP library I was using. Turns out I had an older version, and simply updating that version resolved the problem (Sigh) I knew it was something stupid, but for any of you future coders who happen upon this thread via google: Learn from my mistake, and make sure the resources you are using are up-to-date.
Upvotes: 1