[Xml-compile] RE: error: remote system uses XOP, use XML::Compile::XOP

DEIGNAN Ciaran c.deignan at rsd.com
Tue Aug 14 15:46:14 GMT 2012


Hi Mark,
By the way I'm really impressed by this suite of modules.

I've tried adding the module, on different lines in case there was a partic=
ular order of modules that worked. Haven't found it yet ;)

Can I show you an example? Its very short... Here I've tried calling a serv=
ice that does require a parameter, and passing that parameter with the XOP =
encoding technique. The problem is that it fails to parse the reply. The tr=
ace is in attachment.

Sincere thanks for your time.


use warnings;
use Data::Dumper;

our ($Endpoint, $Srv) =3D =

	qw{http://supporter03:9080/RSDGlass/ws/nodemgmt/ nodemgmt.wsdl};


# preparation
use LWP::Simple qw/get/;
use XML::Compile;
use XML::Compile::WSDL11;      # use WSDL version 1.1
use XML::Compile::SOAP11;      # use SOAP version 1.1

use XML::Compile::Transport::SOAPHTTP;
use XML::Compile::SOAP::WSS;
use XML::Compile::XOP;
my $xop =3D XML::Compile::XOP->new;

## Get contents od WSDL file
my $xml_desc =3D get($Endpoint . $Srv);

## Initialise Web Services Security
my $wss  =3D XML::Compile::SOAP::WSS->new(version =3D> '1.1');

## XML::Compile::WSDL11 once in your program
my $wsdl   =3D XML::Compile::WSDL11->new($xml_desc);

$wsdl->compileCalls(endpoint =3D> $Endpoint);

## Web Service Security
my $security =3D $wss->wsseBasicAuth('RSD0', 'RSD0');

my ($ret, $trace) =3D $wsdl->call('GetFilePlan', wsse_Security =3D> $securi=
ty, fileplanUid =3D> $xop->bytes('8f1b94f9-2ad8-45'));
#my $ret =3D $tst->();
print Dumper($ret); =

print Dumper($trace);


-----Original Message-----
From: Mark Overmeer [mailto:mark at overmeer.net] =

Sent: mardi 14 ao=FBt 2012 17:24
To: DEIGNAN Ciaran
Cc: xml-compile at lists.scsys.co.uk
Subject: Re: [Xml-compile] RE: error: remote system uses XOP, use XML::Comp=
ile::XOP

* DEIGNAN Ciaran (c.deignan at rsd.com) [120814 15:11]:
> I see the error message in the module "XML::Compile::Transport::SOAPHTTP"=
, in the case where the content-type is "Multipart/Related;"
> =

> lc($ct) ne 'multipart/related'
>     or error __x"remote system uses XOP, use XML::Compile::XOP";
> =

> So I guess this just isn't supported? Or is there some magic I'm missing?

The message tries to explain you need to load "XML::Compile::XOP"
explicitly in your application.
-- =

Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net

-------------- next part --------------
$VAR1 =3D undef;
$VAR1 =3D bless( {
                 'connect_elapse' =3D> '0.0600929260253906',
                 'stringify_elapse' =3D> '6.19888305664063e-005',
                 'http_response' =3D> bless( {
                                             '_protocol' =3D> 'HTTP/1.1',
                                             '_content' =3D> '------=3D_Par=
t_1_451156708.1344958981728

Content-Type: application/xop+xml; type=3D"text/xml"; charset=3Dutf-8



<SOAP-ENV:Envelope xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelo=
pe/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns3:GetFilePlanResponse xmlns:ns2=3D=
"http://www.rsd.com/2011/07/recordmgmt/schema" xmlns:ns3=3D"http://www.rsd.=
com/2011/07/nodemgmt/schema" xmlns:ns4=3D"http://www.rsd.com/2011/07/dataty=
pe/schema"><ns3:filePlanType xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-=
instance" xsi:type=3D"ns4:rmFilePlanType"><ns4:childrenType>RECORDCLASSREF<=
/ns4:childrenType><ns4:closed>false</ns4:closed><ns4:code>0000000002</ns4:c=
ode><ns4:creationDate>2012-01-06T18:02:07.366+01:00</ns4:creationDate><ns4:=
creator>cn=3DESTELLE DESCHARD - E362625,ou=3Dusers,o=3Dpsa</ns4:creator><ns=
4:fullQualifiedcode>/0000000002</ns4:fullQualifiedcode><ns4:ID>181</ns4:ID>=
<ns4:nbDisposalHold>0</ns4:nbDisposalHold><ns4:title>Relations Client=C3=A8=
le AC</ns4:title><ns4:type>WORKSPACE</ns4:type><ns4:uid>8f1b94f9-2ad8-45</n=
s4:uid><ns4:version>0</ns4:version><ns4:disposalHold>false</ns4:disposalHol=
d><ns4:nbClosed>0</ns4:nbClosed><ns4:crPhysicalUid>VEOLIA_VEMSI</ns4:crPhys=
icalUid><ns4:enforceApprovePeriod>30</ns4:enforceApprovePeriod><ns4:openedD=
ate>2012-01-06T18:02:07.366+01:00</ns4:openedDate></ns3:filePlanType></ns3:=
GetFilePlanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

------=3D_Part_1_451156708.1344958981728--',
                                             '_rc' =3D> 200,
                                             '_headers' =3D> bless( {
                                                                    'client=
-response-num' =3D> 1,
                                                                    'accept=
' =3D> 'text/xml, text/html, image/gif, image/jpeg, *; q=3D.2, */*; q=3D.2',
                                                                    'date' =
=3D> 'Tue, 14 Aug 2012 15:43:01 GMT',
                                                                    'client=
-peer' =3D> '10.10.20.39:9080',
                                                                    'client=
-date' =3D> 'Tue, 14 Aug 2012 15:43:02 GMT',
                                                                    'soapac=
tion' =3D> '""',
                                                                    'conten=
t-type' =3D> 'Multipart/Related; start-info=3D"text/xml"; type=3D"applicati=
on/xop+xml"; boundary=3D"----=3D_Part_1_451156708.1344958981728"',
                                                                    'conten=
t-language' =3D> 'en-US',
                                                                    'client=
-transfer-encoding' =3D> [
                                                                           =
                         'chunked'
                                                                           =
                       ],
                                                                    'server=
' =3D> 'WebSphere Application Server/7.0'
                                                                  }, 'HTTP:=
:Headers' ),
                                             '_msg' =3D> 'OK',
                                             '_request' =3D> bless( {
                                                                    '_conte=
nt_ref' =3D> 1,
                                                                    '_conte=
nt' =3D> \'<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelo=
pe/"><SOAP-ENV:Header><wsse:Security xmlns:wsse=3D"http://docs.oasis-open.o=
rg/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameTo=
ken><wsse:Username>RSD0</wsse:Username><wsse:Password>RSD0</wsse:Password><=
/wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><sch1:=
GetFilePlanRequest xmlns:sch1=3D"http://www.rsd.com/2011/07/nodemgmt/schema=
"><sch1:fileplanUid>8f1b94f9-2ad8-45</sch1:fileplanUid></sch1:GetFilePlanRe=
quest></SOAP-ENV:Body></SOAP-ENV:Envelope>
',
                                                                    '_proto=
col' =3D> 'HTTP/1.1',
                                                                    '_uri' =
=3D> bless( do{\(my $o =3D 'http://supporter03:9080/RSDGlass/ws/nodemgmt/')=
}, 'URI::http' ),
                                                                    '_heade=
rs' =3D> bless( {
                                                                           =
                'user-agent' =3D> 'libwww-perl/6.02',
                                                                           =
                'x-xml-compile-soap-version' =3D> '2.25',
                                                                           =
                'x-xml-compile-cache-version' =3D> '0.991',
                                                                           =
                'content-length' =3D> 601,
                                                                           =
                'soapaction' =3D> '""',
                                                                           =
                'x-xml-libxml-version' =3D> '1.70',
                                                                           =
                'x-xml-compile-version' =3D> '1.25',
                                                                           =
                'content-type' =3D> 'text/xml; charset=3D"utf-8"',
                                                                           =
                'x-lwp-version' =3D> '6.02'
                                                                           =
              }, 'HTTP::Headers' ),
                                                                    '_metho=
d' =3D> 'POST'
                                                                  }, 'HTTP:=
:Request' )
                                           }, 'HTTP::Response' ),
                 'error' =3D> bless( {
                                     'report_opts' =3D> {
                                                        'location' =3D> [
                                                                        'XM=
L::Compile::Transport::SOAPHTTP',
                                                                        'C:=
/Perl/site/lib/XML/Compile/Transport/SOAPHTTP.pm',
                                                                        208,
                                                                        'Lo=
g::Report::error',
                                                                        1,
                                                                        und=
ef,
                                                                        und=
ef,
                                                                        und=
ef,
                                                                        179=
4,
                                                                        'UU=
UUUUUUUUUUU=15',
                                                                        und=
ef
                                                                      ]
                                                      },
                                     'reason' =3D> 'ERROR',
                                     'message' =3D> bless( {
                                                           '_domain' =3D> '=
xml-compile-soap',
                                                           '_expand' =3D> 1,
                                                           '_msgid' =3D> 'r=
emote system uses XOP, use XML::Compile::XOP'
                                                         }, 'Log::Report::M=
essage' )
                                   }, 'Log::Report::Exception' ),
                 'encode_elapse' =3D> '0.000304937362670898',
                 'http_request' =3D> $VAR1->{'http_response'}{'_request'},
                 'start' =3D> '1344958982.5953',
                 'transport_start' =3D> '1344958982.59561'
               }, 'XML::Compile::SOAP::Trace' );


More information about the Xml-compile mailing list