Re: Returning raw xml in SOAP::Lite
- From: himanshu.garg@xxxxxxxxx
- Date: 30 Aug 2006 02:50:33 -0700
Mark wrote:
Dear Perl folks,
Using Perl 5.8.7 and SOAP::Lite 0.69, consider please this small example
from perl.com:
-----------------
#!perl -w
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
package Demo;
sub hi {
return "hello, world";
}
sub bye {
return "goodbye, cruel world";
}
-----------------
Now, I got SOAP service set up like that. But what I want, instead of,
say, return ("goodbye, cruel world");, is to return a RAW xml stream,
complete with xml envelope and all (the xml is generated in another
place), and parse that straight back to the client.
Now, I tried several things; like setting outputxml => 1. Or this:
$xml = SOAP::Data->type('xml' => $raw);
return ($xml);
(and yes, $raw is defined within the "Demo" package). But the result is
always the same: SOAP::Lite returns an empty SOAP envelope. For the life
of me I just cannot get SOAP::Lite to just output my raw data to the
client.
I am kinda new to SOAP, and quite obviously missing something. If someone
has any ideas, I'll be glad to hear them.
Without having tried it myself looks like you want to override the
serializer method to be able to create your own envelopes. Consider
taking a look at this:-
http://cookbook.soaplite.com/#changing%20method%20name%20in%20response
Thanks,
- Mark
Thank You,
++imanshu.
.
- References:
- Returning raw xml in SOAP::Lite
- From: Mark
- Returning raw xml in SOAP::Lite
- Prev by Date: Re: Stupid Q: How to preserve numeric characters
- Next by Date: Re: Problem handling a Unicode file
- Previous by thread: Returning raw xml in SOAP::Lite
- Next by thread: Hi Guys !
- Index(es):
Relevant Pages
|