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.)