I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-09-01 13:17:02.825489-07 by baergaj
wsdl2perl and the UPS shipping API
Hello, UPS distributes their wsdl files inside a zip file and makes use of multiple <import>'s. For example, their Ship Web Service is defined in a file named Ship.wsdl which imports 3 other files: UPSSecurity.xsd, Error1.1.xsd, ShipWebServiceSchema.xsd using the following xml.
<wsdl:types> <xsd:schema> <!-- This schema defines the UPS Security header used for authorization pur +poses --> <xsd:import namespace="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" schem +aLocation="UPSSecurity.xsd"/> <!-- This schema defines the error detail data types returned within SOAPF +aults to provide more specific information pertaining to the problem. --> <xsd:import namespace="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1" sche +maLocation="Error1.1.xsd"/> <!-- This schema defines the Ship service data types --> <xsd:import namespace="http://www.ups.com/XMLSchema/XOLTWS/Ship/v1.0" schem +aLocation="ShipWebServiceSchema.xsd"/> </xsd:schema> </wsdl:types><wsdl:types> <xsd:schema> <!-- This schema defines the UPS Security header used for authorization pur +poses --> <xsd:import namespace="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" schem +aLocation="UPSSecurity.xsd"/> <!-- This schema defines the error detail data types returned within SOAPF +aults to provide more specific information pertaining to the problem. --> <xsd:import namespace="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1" sche +maLocation="Error1.1.xsd"/> <!-- This schema defines the Ship service data types --> <xsd:import namespace="http://www.ups.com/XMLSchema/XOLTWS/Ship/v1.0" schem +aLocation="ShipWebServiceSchema.xsd"/> </xsd:schema> </wsdl:types>
Since wsdl2perl does not accept a local path to the wsdl file, I have copied Ship.wsdl to my web server. If there is a better way of doing this, please let me know. My problem is that the import's fail even if I copy them to my web server. Is there some way of getting this to work? As a workaround, I have simply copy/pasted the contents of the import files into the wsdl file which seems to have done the trick. Thanks in advance for any help. Andrew
Direct Responses: 12908 | Write a response
Posted on 2010-09-01 13:21:41.09865-07 by baergaj in response to 12907
Re: wsdl2perl and the UPS shipping API
I've already answered my own question. If I specify the uri using the following, it works perfectly:
$ wsdl2perl.pl file:/path/to/Ship.wsdl
Direct Responses: Write a response