[Xml-compile] error parsing WSDL (smaller send)
David McMath
mcdave at stanford.edu
Thu Aug 23 18:49:23 GMT 2012
On 8/23/12 10:49 AM, gstewart wrote:
> Any guidance very much appreciated (other than; turn off the machine
> and send back to manufacturer).
>
> I'm making pathetic attempts to leverage a SOAP/WSDL interface to a
> 3rd party system using Perl and XML::Compile.
>
> Here's my initial attempt (clearly ripped from the examples).
>
> <code>
> use XML::Compile::WSDL11; # use WSDL version 1.1
> use XML::Compile::SOAP11; # use SOAP version 1.1
> use XML::Compile::Transport::SOAPHTTP;
> use LWP::UserAgent;
> my $browser = LWP::UserAgent->new();
> my $wsdl_data = $browser->get("https://1.2.3.4/services/fwif?wsdl");
> my $schema_data =
> $browser->get("https://1.2.3.4/services/ninjaprobe.xsd");
> my $wsdl = XML::Compile::WSDL11->new($wsdl_data->content);
> $wsdl->importDefinitions($schema_data->content);
>
> my $call = $wsdl->compileCalls;
> </code>
>
> This returns errors
>
> <code>
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> Use of uninitialized value in join or string at
> /Library/Perl/5.12/XML/Compile/Translate/Writer.pm line 514.
> </code>
>
I got the WSDL and XSD from your comments on the #xml-compile IRC and
about all I can usefully say is that the errors are in the following
particular instances:
problem with ens:VersionQuery at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:SystemInfoQuery at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:FilterListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:DagListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:NicListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:NetAddrListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:VDAGListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:NetSourceListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
problem with ens:HLBListAll at
/Library/Perl/5.10.0/XML/Compile/Translate/Writer.pm line 515.
I got that by adding in
local $SIG{__WARN__} = sub { warn "problem with $tag" ; } ;
down in the method of Writer.pm. I don't know enough about how these
things are supposed to work to say much more, but the "enc:Empty" type
seems suspicious to me somehow.
I hope that's helpful,
dave
More information about the Xml-compile
mailing list