Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello Perl hackers,
I am writing an application in Perl which will require the use of some sort of RPC mechanism, so I am evaluating RPC::XML, Frontier, and SOAP::Lite for this purpose. One requirement of the application is that I need to be able to transfer application-specific XML data between the client and the server. I have noticed that RPC::XML seems to get confused when I try to send this application XML data as a string paremeter to an RPC::XML method. My question is, what is the best way to send application specific XML data between the client and the server using RPC::XML? Do I need to encode the application XML data first? Is it just a bad idea to do this in general?
Thanks, Here is an example illustrating the problem. First is the output, followed by sample code:
In the first case, the contents of a plain (non-XML) text file is sent, and the method call succeeds. In the second case, the contents of a small XML file are sent, and the send_request() method fails with the error message "Unknown tag encountered: Something". (it returns a descriptive string on error, or an RPC::XML::response object reference on success). The string "Something" is the tag name of the root element in the sample application XML data that is sent. RPC::XML server:
RPC::XML client:
Sample text file:
Sample XML file:
Edited by BazB: readmore tags added In reply to Sending application-specific XML as a string paremeter to an RPC::XML method. by nenbrian
|
|