thewebsi has asked for the wisdom of the Perl Monks concerning the following question:
Using SOAP::Lite to access a web service, I'm getting:
not well-formed (invalid token) at ... XML/Parser.pm line 187
Indeed, the response XML is invalid. The ideal solution is to get the sending server to fix that, but that is unlikely to happen any time soon.
In the meantime, I was wondering if anyone knows a way to pre-process the response XML?
The response XML currently contains a null-byte (\0) that I would like to chop.
An example of what I mean:
>perl -e 'use SOAP::Lite; print SOAP::Deserializer->deserialize ( "<te +st>a</test>\0" );' not well-formed (invalid token) at line 1, column 14, byte 14 at /usr/ +lib64/perl5/vendor_perl/XML/Parser.pm line 187
My current calling code is standard:
use SOAP::Lite; my $client = SOAP::Lite->new( proxy => $proxy ); my $result = $client->call( $method => @arguments );
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite - preprocess response? ( $soap->transport->add_handler("response_done", \&content_modifier )
by Anonymous Monk on Aug 15, 2013 at 23:49 UTC | |
by thewebsi (Scribe) on Aug 16, 2013 at 04:31 UTC |