note 92645 deleted from soapclient.soapcall by googleguy

From: Date: Tue, 22 Oct 2013 11:15:08 +0000
Subject: note 92645 deleted from soapclient.soapcall by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197039@lists.php.net to get a copy of this message
Note Submitter: l dot tomov at raz dot bg ---- I was trying to call a .net service and it took me quite some hours to get the exact object structure. I was getting a "SOAP-ERROR: Encoding: object hasn't 'newOrderRequest' property" This is how I got it working: <?php class NewOrderRequestElement { public $merchantID = "1234"; public $terminalID = "001"; } class NewOrder { public $newOrderRequest; } $no = new NewOrder; $no->newOrderRequest = new NewOrderRequestElement; $response = $client->NewOrder($no); ?> And in order to get the exact class structure, you need to call $client->__getTypes(); Hope this helps somebody.

« previous php.notes (#197039) next »