Is it possible to return the original XML from SOAP :: Lite without debugging enabled?

Debugging is a good function, but I would like to return a "readable" raw xml from either the request or the response using the method. That way, I can print them in note in my test environment. Can someone tell me how can I do this?

+4
source share
2 answers

Is the outputxml flag what are you after?


From the documentation :

 outputxml() 

Allows you to specify the output type of all method calls. If true, all methods return raw, raw XML. You can parse it with XML :: Parser, SOAP :: Deserializer or any other appropriate module.

0
source

A bit late (hah!), But I was looking for the same thing in the version of the library we use, I was able to do the following:

 my $soap = SOAP::Lite->new() # ->uri(...)->proxy(...)->autotype(0) ; my $header = SOAP::Header->name(...); my $som = $soap->call('method' => $args, $header); my $serializer = SOAP::Serializer->new; my $xml = $serializer->serialize($som->dataof('//')); # includes a lot of attributes... # or my $xml = $serializer->serialize($som->valueof('//')); 

This is not quite the same, but can be quite complete for most purposes.

0
source

All Articles