note 92645 added to soapclient.soapcall
| From: | l dot tomov at raz dot bg | Date: | Sun, 02 Aug 2009 01:47:00 +0000 |
| Subject: | note 92645 added to soapclient.soapcall | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158996@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 89.190.194.18
Probable Submitter: 78.83.248.239
----
Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php
Edit -- https://master.php.net/note/edit/92645
Del: integrated -- https://master.php.net/note/delete/92645/integrated
Del: useless -- https://master.php.net/note/delete/92645/useless
Del: bad code -- https://master.php.net/note/delete/92645/bad+code
Del: spam -- https://master.php.net/note/delete/92645/spam
Del: non-english -- https://master.php.net/note/delete/92645/non-english
Del: in docs -- https://master.php.net/note/delete/92645/in+docs
Del: other reasons-- https://master.php.net/note/delete/92645
Reject -- https://master.php.net/note/reject/92645
Search -- https://master.php.net/manage/user-notes.php