Page 1 of 1

soapClient

Posted: Thu Dec 02, 2010 7:53 am
by jvieira
Hi,
I'm having a little trouble. Maybe I'm doing this wrong, maybe soapClient is doing it wrong. Any pointers would be great.

I have a rather complicated soap web service I am trying to use (ipcommerce cws)

here is what i am trying to do.

Code: Select all

        
                $auth->sessionToken = $this->session_token; //string
		$auth->transaction = $bank_trans; // $bank_trans is a very complicated nested stdClass object.
		$auth->merchantProfileId = $this->merchantProfileID; //string
		$auth->serviceId = $this->serviceID; //string
		$auth->applicationProfileId = $this->appProfileID;//string
		try {
			$this->bankCard->Authorize($auth); //bankcard is an instance of soapclient
		} catch ( SoapFault $e ) {
			print_r($this->bankCard);
		}
Now, this always throws an exception because the transaction element in the XML request is blank. I have no idea why this is happening.
The transaction object appears to be built correctly, and soapClient is in WSDL mode. So. From what i can tell (and have previously seen) building the object out as a stdClass object is an okay thing to do, soapClient and the WSDL should handle the conversion correct?

Happy to provide more info if anyone has any ideas.
Thanks,
Joe