soapClient

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jvieira
Forum Newbie
Posts: 1
Joined: Thu Dec 02, 2010 7:44 am

soapClient

Post 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
Post Reply