SOAP-WSDL - Re: import schema within the wsdl

Posted on Mon May 26 23:09:00 2008 by babzog in response to 5375 (See the whole thread of 4)
Re: import schema within the wsdl
Something old, is new again. :) My script, based on a lightly modified weather_wsdl.pl:
use lib 'lib/'; use lib '../lib'; # SOAP::WSDL variant use SOAP::WSDL; my $soap = SOAP::WSDL->new(); my $som = $soap->wsdl("http://192.168.2.39/NetManagerServicesBinding.wsdl") ->call('getSoftwareVersion',NULL ); die "Error" if $som->fault(); print $som->result();
results in:
cannot import document for namespace >http://schemas.xmlsoap.org/soap/encoding/< without location a +t /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Expat/WSDLParser.pm line 71. Can't locate object method "set_arrayType" via package "SOAP::WSDL::XSD::Attribute" at /usr/lib/per +l5/site_perl/5.8.8/SOAP/WSDL/Base.pm line 123 at line 239 at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Expat/Base.pm line 76
and that seems to be because of the following:
<schema targetNamespace="http://NM2WebServices/NM2Soap" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:NetManager="http://NM2WebServices/NM2Soap" xmlns:NetManager2="http://NetManager/NetManager2" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <simpleType name=...
This WSDL file is generated by gSoap (http://www.cs.fsu.edu/~engelen/soap.html) and it imports fine into soapUI so I'm assuming it's fine. If I go to http://schemas.xmlsoap.org/soap/encoding/, cut&paste the whole thing in place of the <import ... /> blocks, I then get:
unbound prefix at line 61, column 4, byte 4064 at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Expat/Ba +se.pm line 73 at line 61 at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Expat/Base.pm line 76
Any thoughts?
Write a response