[Xml-compile] Losing received XOPs - workaround

Michael Ludwig m.ludwig at epages.com
Wed Oct 12 16:01:42 GMT 2011


[resending (2); original message from 11 August got stuck somewhere]

Hello Mark and list,

first, thanks for this module suite, which does help a bunch to
interface with SOAP services. Impressive work!

Second, XML::Compile::SOAP12 says:

**WARNING** Implementation not finished: not usable!!

Third, we're using it anyway, as it does get us more than halfway
there ... the only thing that appears to be missing is the MIME
parts of the response that are attached to the XML.

We're seeing this message, probably for those intrepid users who
elected to ignore the warning in the docs:

  warning: loosing received XOPs

Origin of this warning:

http://cpansearch.perl.org/src/MARKOV/XML-Compile-SOAP-2.24/lib/XML/Compile/Transport.pm

Our test program is basically:

my $wsdl = XML::Compile::WSDL11->new( $wsdlfile );
$wsdl->importDefinitions( "$folder/BatchGateway.xsd" );
# plus a couple more

my $ua = LWP::UserAgent->new;
$ua->ssl_opts( verify_hostname => 0 ); # self-signed cert, don't check

my $trans = XML::Compile::Transport::SOAPHTTP->new(
    user_agent => $ua,
    timeout => 30,
    address => $endpoint,
);

my $call = $wsdl->compileClient( $meth, transport => $trans );
0 and print $wsdl->explain( $meth, PERL => 'INPUT', recurse => 1);
my( $response, $trace ) = $call->( request => \%request );

So okay, we're losing the received XOPs, but I can still get them
from the $trace structure:

my $rsp = $trace->{http_response};
for ( $rsp->parts ) {
    say $_->content_type;
    say $_->content_encoding;
    say $_->content;
}

So, it works! Just wanted to know if this is our current best bet?
(Which is good enough.) Or if there is a solution that we've missed?
(Which is not unlikely.)

Michael



More information about the Xml-compile mailing list