I don't have an option here as the web service is created using a SOAP server. I would have preferred a normal form based submission service, but the service provider insists on SOAP.
NB: This is Activestate perl 5.12, on Windows 7 (but when I finish my tests it will be deployed on a web version of Windows server).
Here is what I ran to get the types I need in order to use their service, and the output I received:
C:\Projects\SOAP>perl wsdl2perl.pl https://merchant.paytoo.info/api/merchant/?wsdl found unrecognised attribute {http://schemas.xmlsoap.org/wsdl/} arrayType (ignored) at C:/Perl64/site/lib/SOAP/WSDL/Base.pm line 130. Creating complexType class MyTypes/PaytooTransactionType.pm Creating complexType class MyTypes/PaytooRequestType.pm Creating complexType class MyTypes/PaytooDocumentType.pm Creating complexType class MyTypes/PaytooAccountType.pm Creating complexType class MyTypes/MerchantApiResponse.pm Creating complexType class MyTypes/PaytooRequestSearchCriterias.pm Creating complexType class MyTypes/ArrayOfPaytooRequestType.pm
C:/Perl64/site/lib/SOAP/WSDL/Generator/Template/XSD\complexType.tt undef error - no node at C:/Perl64/site/lib/SOAP/WSDL/Generator/ Template/Plugin/XSD.pm line 55
SOAP::WSDL::Generator::Template:
lugin::XSD::create_xsd_name('SOAP::WSDL::Generator::Template:
lugin::XSD=SCALAR(0x4de64b0)', '') called at C:\Perl64\site\lib\SOAP\WSDL\Generator\Template\XS D\complexType\attributeSet.tt line 42 eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType\attributeSet.tt line 42 eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType\attributeSet.tt line 6 eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType\attributeSet.tt line 7
Template:
ocument::__ANON__('Template::Context=HASH(0x4f9a838)') called at C:/Perl64/site/lib/Template/Document.pm line 151 eval {...} called at C:/Perl64/site/lib/Template/Document.pm line 149
Template:
ocument:
rocess('Template:
ocument=HASH(0x4f98d30)', 'Template::Context=HASH(0x4f9a838)') called at C:/Perl64/site/lib/ Template/Context.pm line 347 eval {...} called at C:/Perl64/site/lib/Template/Context.pm line 321
Template::Context:
rocess('Template::Context=HASH(0x4f9a838)', 'complexType/attributeSet.tt', undef, 'localize me!') called at C:/ Perl64/site/lib/Template/Context.pm line 409
Template::Context::include('Template::Context=HASH(0x4f9a838)', 'complexType/attributeSet.tt') called at C:\Perl64\site\lib\SOAP\WSDL \Generator\Template\XSD\complexType\contentModel.tt line 19
eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType\contentModel.tt line 7
Template:
ocument::__ANON__('Template::Context=HASH(0x4f9a838)') called at C:/Perl64/site/lib/Template/Document.pm line 151 eval {...} called at C:/Perl64/site/lib/Template/Document.pm line 149
Template:
ocument:
rocess('Template:
ocument=HASH(0x4fa00b8)', 'Template::Context=HASH(0x4f9a838)') called at C:/Perl64/site/lib/ Template/Context.pm line 347 eval {...} called at C:/Perl64/site/lib/Template/Context.pm line 321
Template::Context:
rocess('Template::Context=HASH(0x4f9a838)', 'complexType/contentModel.tt', undef, 'localize me!') called at C:/ Perl64/site/lib/Template/Context.pm line 409
Template::Context::include('Template::Context=HASH(0x4f9a838)', 'complexType/contentModel.tt') called at C:\Perl64\site\lib\SOAP\WSDL \Generator\Template\XSD\complexType.tt line 18 eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType.tt line 7
Template:
ocument::__ANON__('Template::Context=HASH(0x4f9a838)') called at C:/Perl64/site/lib/Template/Document.pm line 151 eval {...} called at C:/Perl64/site/lib/Template/Document.pm line 149
Template:
ocument:
rocess('Template:
ocument=HASH(0x4fb9140)', 'Template::Context=HASH(0x4f9a838)') called at C:/Perl64/site/lib/ Template/Context.pm line 347 eval {...} called at C:/Perl64/site/lib/Template/Context.pm line 321
Template::Context:
rocess('Template::Context=HASH(0x4f9a838)', 'Template:
ocument=HASH(0x4fb9140)') called at C:/Perl64/site/lib/ Template/Service.pm line 94 eval {...} called at C:/Perl64/site/lib/Template/Service.pm line 91
Template::Service:
rocess('Template::Service=HASH(0x4fb9cb8)', 'complexType.tt', 'HASH(0x4f985a8)') called at C:/Perl64/site/lib/ Template.pm line 66
Template:
rocess('Template=HASH(0x4f9d400)',
'complexType.tt', 'HASH(0x4f985a8)', 'MyTypes/
ArrayOfPaytooRequestType.pm') called at C:/Perl64/site/lib/SOAP/WSDL/ Generator/Template.pm line 66
SOAP::WSDL::Generator::Template::_process('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)', 'complexType.tt', 'HASH(0x4dbcac8)', 'MyTypes/ ArrayOfPaytooRequestType.pm') called at C:/Per l64/site/lib/SOAP/WSDL/Generator/Template/XSD.pm line 232
SOAP::WSDL::Generator::Template::XSD::visit_XSD_ComplexType('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)', 'SOAP::WSDL::XSD::ComplexType=SCALAR(0x49d77a8)') called at C:/Perl64/ site /lib/SOAP/WSDL/Base.pm line 62
SOAP::WSDL::Base::_accept('SOAP::WSDL::XSD::ComplexType=SCALAR(0x49d77a8)', 'SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)') called at C:/ Perl64/site/lib/SOAP/WSDL/Generator/Template/ XSD.pm line 90
SOAP::WSDL::Generator::Template::XSD::generate_typelib('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)', undef) called at :/Perl64/site/lib/SOAP/WSDL/Generator/Template/XSD.pm line 76
SOAP::WSDL::Generator::Template::XSD::generate('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)') called at wsdl2perl.pl line 148 at C:/Perl64/site/lib/SOAP/WSDL/ Base.pm line 62
Sorry about the messy format of the output. I just copied and pasted from the console I ran the command in. I have no idea what most of that output means, except it is clear that wsdl2perl.pl properly processed the first half dozen classes defined in that wsdl file and then died a nasty death.
I appear to be able to function using SOAP::Lite, at least with the functin calls that take only simple strings. But I do not know how to proceed in order to pass data to those functions that take complex data types.
I have never worked with SOAP or WSDL before, so forgive me if this seems a bit simple. I guess there's a couple questions to ask that would get me functional.
1) can you point your browser to that wsdl file specified on the command I show above and tell me if there is a simple way to get wsdl2perl.pl to parse it completely and correctly?
2) failing that, on looking at the files it did create, it looks like those classes are primarily hashes (sometimes with certain values being hashes themselves). Hence the question: If I can infer the structure of the hash required, can I simply create a hash, with all the keys expected for the type in question, and then just pass a reference to that hash as the argument for it in the functions I access through SOAP::Lite?
NB: This is Activestate perl 5.12, on Windows 7 (but when I finish my tests it will be deployed on a web version of Windows server).
Here is what I ran to get the types I need in order to use their service, and the output I received:
C:\Projects\SOAP>perl wsdl2perl.pl https://merchant.paytoo.info/api/merchant/?wsdl found unrecognised attribute {http://schemas.xmlsoap.org/wsdl/} arrayType (ignored) at C:/Perl64/site/lib/SOAP/WSDL/Base.pm line 130. Creating complexType class MyTypes/PaytooTransactionType.pm Creating complexType class MyTypes/PaytooRequestType.pm Creating complexType class MyTypes/PaytooDocumentType.pm Creating complexType class MyTypes/PaytooAccountType.pm Creating complexType class MyTypes/MerchantApiResponse.pm Creating complexType class MyTypes/PaytooRequestSearchCriterias.pm Creating complexType class MyTypes/ArrayOfPaytooRequestType.pm
C:/Perl64/site/lib/SOAP/WSDL/Generator/Template/XSD\complexType.tt undef error - no node at C:/Perl64/site/lib/SOAP/WSDL/Generator/ Template/Plugin/XSD.pm line 55
SOAP::WSDL::Generator::Template:
Template:
Template:
Template::Context:
Template::Context::include('Template::Context=HASH(0x4f9a838)', 'complexType/attributeSet.tt') called at C:\Perl64\site\lib\SOAP\WSDL \Generator\Template\XSD\complexType\contentModel.tt line 19
eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType\contentModel.tt line 7
Template:
Template:
Template::Context:
Template::Context::include('Template::Context=HASH(0x4f9a838)', 'complexType/contentModel.tt') called at C:\Perl64\site\lib\SOAP\WSDL \Generator\Template\XSD\complexType.tt line 18 eval {...} called at C:\Perl64\site\lib\SOAP\WSDL\Generator \Template\XSD\complexType.tt line 7
Template:
Template:
Template::Context:
Template::Service:
Template:
'complexType.tt', 'HASH(0x4f985a8)', 'MyTypes/
ArrayOfPaytooRequestType.pm') called at C:/Perl64/site/lib/SOAP/WSDL/ Generator/Template.pm line 66
SOAP::WSDL::Generator::Template::_process('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)', 'complexType.tt', 'HASH(0x4dbcac8)', 'MyTypes/ ArrayOfPaytooRequestType.pm') called at C:/Per l64/site/lib/SOAP/WSDL/Generator/Template/XSD.pm line 232
SOAP::WSDL::Generator::Template::XSD::visit_XSD_ComplexType('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)', 'SOAP::WSDL::XSD::ComplexType=SCALAR(0x49d77a8)') called at C:/Perl64/ site /lib/SOAP/WSDL/Base.pm line 62
SOAP::WSDL::Base::_accept('SOAP::WSDL::XSD::ComplexType=SCALAR(0x49d77a8)', 'SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)') called at C:/ Perl64/site/lib/SOAP/WSDL/Generator/Template/ XSD.pm line 90
SOAP::WSDL::Generator::Template::XSD::generate_typelib('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)', undef) called at :/Perl64/site/lib/SOAP/WSDL/Generator/Template/XSD.pm line 76
SOAP::WSDL::Generator::Template::XSD::generate('SOAP::WSDL::Generator::Template::XSD=SCALAR(0x4471b48)') called at wsdl2perl.pl line 148 at C:/Perl64/site/lib/SOAP/WSDL/ Base.pm line 62
Sorry about the messy format of the output. I just copied and pasted from the console I ran the command in. I have no idea what most of that output means, except it is clear that wsdl2perl.pl properly processed the first half dozen classes defined in that wsdl file and then died a nasty death.
I appear to be able to function using SOAP::Lite, at least with the functin calls that take only simple strings. But I do not know how to proceed in order to pass data to those functions that take complex data types.
I have never worked with SOAP or WSDL before, so forgive me if this seems a bit simple. I guess there's a couple questions to ask that would get me functional.
1) can you point your browser to that wsdl file specified on the command I show above and tell me if there is a simple way to get wsdl2perl.pl to parse it completely and correctly?
2) failing that, on looking at the files it did create, it looks like those classes are primarily hashes (sometimes with certain values being hashes themselves). Hence the question: If I can infer the structure of the hash required, can I simply create a hash, with all the keys expected for the type in question, and then just pass a reference to that hash as the argument for it in the functions I access through SOAP::Lite?