I'm building my SOAP call "by hand" like so:
my $worker = SOAP::Lite->new(uri => $r_envelope{soapaction}, proxy => $r_envelope{endpoint}); my $response = $worker->call(SOAP::Data->name($r_envelope{method}) ->attr( { xmlns => $r_envelope{namespace} } ) => SOAP::Data->name(timestamp => $d_envelope{timestamp}), SOAP::Data->name(referenceId => $d_envelope{referenceId}), SOAP::Data->name(keycode => $d_envelope{keycode}), SOAP::Data->name(guid => $d_envelope{guid}), SOAP::Data->name(machineName => $d_envelope{machineName})
and I'd like to print out both the generated envelope (to be sent) and the one I receive back from the server. Right now, I'm printing the response envelope with:
Dumper($response->envelope);
Which works, but is less than ideal. What I'm really looking for is the SOAP envelopes themselves, like what gets printed when I:
use SOAP::Lite +trace => ['all', '-objects']
Can anyone provide some guidance in getting straight XML out of SOAP::Lite? (I'm using $response->valueof('//responseCode') for specific values, but my tool needs to be able to provide the full envelope to the end user.)

In reply to printing SOAP::Lite generated XML envelopes by chorankates

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.