You didn't say what you wanted to do with the serialised XML but either of these approaches might give you what you want
serialise a data item:
my $soap= SOAP::Lite-> ... etc
or serialise the complete SOAP envelope:
$soap->serializer->envelope('method', 'somemethod', $p1, $p2 ...)
If you browse through the source for SOAP::Lite you should be able to see what these two examples are doing.
At 2004-10-28, 19:01:25 Jon Orwant <orwant@...
>I'll leave explaining the proper technique to someone else, but...this
>is a horrible kludge and you should question the goodness of a world in
>which you have to do it, but as a last resort you can always intercept
>STDERR to capture tracing info:
> use SOAP::Lite +trace => "debug";
> close STDERR;
> open STDERR, '>', \$stderr;
>And then use simple regexes to extract the incoming and outgoing XML
>On Oct 27, 2004, at 10:15 PM, Martin Naskovski wrote:
>> Hi - I am new to perl as well as new to the SOAP::Lite package - I
>> have a
>> fairly simple question - is it possible to somehow 'grab' the
>> XML after I have built it using SOAP::Data? I know about the +debug
>> option, but that does two things I don't want - it outputs my XML only
>> when I make the SOAP call, and two, I cannot capture it as a string in
>> some perl variable.
>> Can the XML be somehow retained as a string once it's been built with
>> SOAP::Data? Thank you.