Re: [SOAP] Re: Passing objects to soap server, complexType, classmap
| From: | David | Date: | Mon, 19 Jun 2006 17:42:23 +0000 |
| Subject: | Re: [SOAP] Re: Passing objects to soap server, complexType, classmap | ||
| References: | 1 2 3 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2317@lists.php.net to get a copy of this message | ||
Hi Morgan,
Morgan Pyne wrote:
Thx. The online documentation isn't terribly clear on all this and says several of the functions/objects (SoapVar, SoapParam) are for non-WSDL mode only, so I hadn't tried this. However, I just tried your suggestion but unfortunately I'm still not getting the correct object type on the server. Your example below seems to be geared towards returning an object from the server rather than passing one to it, so here is what I tried: - Removed references on both client and server to a classmap - On the client, changed the method call to pass a SoapParam instead of directly passing my object i.e.Did you pass an classmap in the options array in your SoapClient / SoapServer constructors? This is an associative array which allows the soap server/client to map schema complexTypes to php classes Kind regards, David$client = new SoapClient('http://myurl.com/wsdl' );$a = new someObj(); $b = new SoapParam($a, 'name_of_comlexType_from_WSDL');$client->myRemoteMethod( $b );On the server, the 'myRemoteMethod()' is simply displaying the object type that it is passed. It is receiving the object as a 'StdClass', instead of a 'someObj' Is this the corrrect approach? Do I need to do anything additionally on the server side?