[Xml-compile] Problems Using XML::Compile::WSDL11
Luong Truong
ltruong at wavecorp.com
Thu May 14 21:26:42 GMT 2009
I'm new to SOAP and WSDL in general. I'm trying to use
XML::Compile::WSDL11 to talk to any web services. I'm getting the same
error every time:
error: no definitions for 'service' found
Can you someone tell me what I could be missing?
Here is the code snippet I trying:
use Log::Report mode => 'DEBUG';
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;
# EB-eye WSDL URL
my $WSDL = 'http://www.ebi.ac.uk/ebisearch/service.ebi?wsdl';
# Create service proxy for web service
my $wsdlXml = XML::LibXML->new->parse_file($WSDL);
my $soapSrv = XML::Compile::WSDL11->new($wsdlXml);
# Compile all service methods
my (%soapOps);
foreach my $soapOp ($soapSrv->operations) {
$soapOps{$soapOp->{operation}} =
$soapSrv->compileClient($soapOp->{operation});
}
This is the trace I get:
trace: using preparsed XML document with element
<{http://schemas.xmlsoap.org/wsdl/}definitions>
trace: using preparsed XML node
<{http://schemas.xmlsoap.org/wsdl/}definitions>
trace: cache parsed file wsdl.xsd-1242322401-11308
trace: parsing XML from file
C:\Perl\site\lib\XML\Compile\WSDL11\xsd\wsdl.xsd
trace: schema compile READER for
{http://schemas.xmlsoap.org/wsdl/}definitions
trace: using preparsed XML node
<{http://schemas.xmlsoap.org/wsdl/}definitions>
error: no definitions for `service' found
at C:/Perl/site/lib/XML/Compile/WSDL11.pm line 238
XML::Compile::WSDL11::find(XML::Compile::WSDL11=HASH(0x23a0b4),
"service") at C:/Perl/site/lib/XML/Compile/WSDL11.pm lin
e 265
XML::Compile::WSDL11::operations(XML::Compile::WSDL11=HASH(0x23a0b4)) at
C:\TEMP\test.pl line 12
Any help you can provide is greatly appreciated. Thank you.
More information about the Xml-compile
mailing list