[Xml-compile] WSDL11 compile error
Ian Goodacre
Ian.Goodacre at xtra.co.nz
Tue Oct 7 09:11:06 GMT 2014
I am trying to implement a SOAP client using XML::Compile and receiving
error:
trace: misfit
{http://schemas.xmlsoap.org/wsdl/}anyTopLevelOptionalElement
(0..unbounded) no applicable choice for
`{http://www.w3.org/ns/ws-policy}Policy' at
wsdl:definitions/wsdl:anyTopLevelOptionalElement
error: element `{http://www.w3.org/ns/ws-policy}Policy' not processed
for wsdl:definitions at /wsdl:definitions/wsp:Policy
at C:/Strawberry/perl/site/lib/XML/Compile/Translate/Reader.pm line 583
I see that the wsp:Policy element isn't allowed by
wsdl:anyTopLevelOptionalElement, but I don't know how to resolve the
problem. I was expecting that XML::Compile::SOAP::WSS would somehow
allow the policy to be included in the WSDL but it seems not.
I am using the following test script:
use strict;
use warnings;
use Data::Dumper::Concise;
use LWP;
use Log::Report mode => 'DEBUG';
use XML::Compile::WSDL11;
use XML::Compile::SOAP::WSS;
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP;
my $WSDL =
'https://test.decisionpoint3.com.au/veda2/ws/SilverChef/CompanyBusinessService?wsdl';
my $ua = LWP::UserAgent->new();
my $response = $ua->get($WSDL);
my $wsdlXml = XML::LibXML->new->parse_string($response->content);
my $wss = XML::Compile::SOAP::WSS->new;
my $wsdl = XML::Compile::WSDL11->new($wsdlXml);
Can anyone tell me what I am missing? Pointers to relevant documentation?
More information about the Xml-compile
mailing list