Re: PEAR xml_rpc => send an php object
| From: | P.Schmiel | Date: | Wed, 09 Apr 2008 17:28:02 +0000 |
| Subject: | Re: PEAR xml_rpc => send an php object | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28778@lists.php.net to get a copy of this message | ||
The "transparent" part should be the part from the object to the rpc client whitout "extracting" the object, get the variable-types, build XML_RPC_Values for each parameter, build an array, put this array in a xml_rpc_value...
I have no ability to modify the server, and the server needs the object unserialized because it do some work with the raw-xml, that's why I can't use serialize(), json_encode, base64 or whatever to transfer the object.
- Pascal
Jean-Lou Dupont schrieb:
I am confused: I thought your requirement what to "transparently transport object X through an XML_RPC virtual link", sort of. What's wrong with having a textual representation of the object through serialize? you can also base64 encode it if you need additional decoupling with the transport layer. jld. On Wed, Apr 9, 2008 at 12:53 PM, P.Schmiel <schmiel@cybernox.net> wrote:I can't transfer it serialized because the server have to applie some filters on the received XML. Thats why I can't use serialize() or some sort of encoding. - Pascal Jean-Lou Dupont schrieb:jld. On Wed, Apr 9, 2008 at 12:18 PM, P.Schmiel <schmiel@cybernox.net<mailto: schmiel@cybernox.net>> wrote: Hi, is there a posibility to convert an object to an XML_RPC_Value? I noticed the "struct" type for XML_RPC_Value, but a struct can only contain variables encapsulated in XML_RPC_Values too Quote from documentation: --- The fourth constructor form can be used to compose complex XML-RPC values. The first argument is either a simple array in the case of an XML-RPC *array* or an associative array in the case of a *struct*. The elements of the array /must be *XML_RPC_Value* objects themselves/. --- What I need is a transparent way where I can just take an object and pass it to the xml-rpc client. Thanks PascalWhy don't you "serialize" the object in question?-- PEAR General Mailing List (http://pear.php.net/)To unsubscribe, visit: http://www.php.net/unsub.php -- http://jldupont.com http://blog.jldupont.com http://photos.jldupont.com http://news.jldupont.com