Re: [SOAP] SOAP and MongoId

[email protected] (Justin Dearing) Wed, 26 Jun 2013 08:22:02 -0400
Newsgroups php.soap
Message-ID <CABsCM1Ok_J3YiZSfAM7mnnOq-_Gz1TSCf=RzwD0yqQFmsN4rcA@mail.gmail.com>
--047d7b676e1c6d8a6404e00db14a
Content-Type: text/plain; charset=ISO-8859-1

Assuming you are writing the client and server, and both are in php, the
service should probably take a string

Use __tostring() to covert a mongoid to the hex string, which you can cover
back with the mongoid constructor.

If that's not the case, I can suggest workarounds based on what you can
control. If you don't control the service, you should post the past of the
wsdl defining what it's expecting for the mongoid.
On Jun 26, 2013 8:01 AM, "Nikolay Sukhikh" <[email protected]> wrote:

> I'm trying to pass function parameter of type MongoId through SoapClient.
> The problem is that MongoId objects have public property '$id' and
> SoapClient generates invalid XML for them:
>
> <param xsi:type="SOAP-ENC:Struct"><$**id
> xsi:type="xsd:string">**51ca25b506e4e9872800000a</$id>**</param>
>
> Is there any way to workaround this?
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--047d7b676e1c6d8a6404e00db14a--