Re: Re: Passing objects to soap server, complexType, classmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

           $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?

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

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux