D
dustyg99
I've successfully been able to consume a .NET webservice using Perl and
SOAP::Lite. I use stubmaker.pl on the .net WSDL to generate my service
classes and methods. However, I have to manually edit all the methods
to set the method paramter name and types since this is required by the
..net service. Is there a way to make stubmaker specify this in the
paramter description for you since it is located in the WSDL?
Example
Code generated by stubmaker:
package HelloWorld;
# -- generated by SOAP::Lite (v0.60) for Perl -- soaplite.com --
Copyright (C) 2000-2001 Paul Kulchenko --
# -- generated from http://localhost/helloservice/hellosrvc.asmx?WSDL
[Thu Oct 6 17:50:48 2005]
my %methods = (
Hello => {
endpoint => 'http://localhost/helloservice/hellosrvc.asmx',
soapaction => 'http://localhost/helloservice/Hello',
uri => '',
parameters => [
SOAP:ata->new(name => 'parameters', type => '', attr => {}),
],
},
);
use SOAP::Lite;
use Exporter;
use Carp ();
....
And the modified code for it to work properly:
package HelloWorld;
# -- generated by SOAP::Lite (v0.60) for Perl -- soaplite.com --
Copyright (C) 2000-2001 Paul Kulchenko --
# -- generated from http://localhost/helloservice/hellosrvc.asmx?WSDL
[Thu Oct 6 17:50:48 2005]
my %methods = (
Hello => {
endpoint => 'http://localhost/helloservice/hellosrvc.asmx',
soapaction => 'http://localhost/helloservice/Hello',
uri => '',
parameters => [
SOAP:ata->new(name => 'ParamterName', type => 'string', attr =>
{'urn:http://mynamespace/'}),
],
},
);
use SOAP::Lite;
use Exporter;
use Carp ();
The important modification being:
SOAP:ata->new(name => 'ParamterName', type => 'string', attr =>
{'urn:http://mynamespace/'}),
I havn't been able to find any easy solution to this and I'm not that
famliar with perl or webservice to be able to modify the stubmaker
myself.
Thank you
SOAP::Lite. I use stubmaker.pl on the .net WSDL to generate my service
classes and methods. However, I have to manually edit all the methods
to set the method paramter name and types since this is required by the
..net service. Is there a way to make stubmaker specify this in the
paramter description for you since it is located in the WSDL?
Example
Code generated by stubmaker:
package HelloWorld;
# -- generated by SOAP::Lite (v0.60) for Perl -- soaplite.com --
Copyright (C) 2000-2001 Paul Kulchenko --
# -- generated from http://localhost/helloservice/hellosrvc.asmx?WSDL
[Thu Oct 6 17:50:48 2005]
my %methods = (
Hello => {
endpoint => 'http://localhost/helloservice/hellosrvc.asmx',
soapaction => 'http://localhost/helloservice/Hello',
uri => '',
parameters => [
SOAP:ata->new(name => 'parameters', type => '', attr => {}),
],
},
);
use SOAP::Lite;
use Exporter;
use Carp ();
....
And the modified code for it to work properly:
package HelloWorld;
# -- generated by SOAP::Lite (v0.60) for Perl -- soaplite.com --
Copyright (C) 2000-2001 Paul Kulchenko --
# -- generated from http://localhost/helloservice/hellosrvc.asmx?WSDL
[Thu Oct 6 17:50:48 2005]
my %methods = (
Hello => {
endpoint => 'http://localhost/helloservice/hellosrvc.asmx',
soapaction => 'http://localhost/helloservice/Hello',
uri => '',
parameters => [
SOAP:ata->new(name => 'ParamterName', type => 'string', attr =>
{'urn:http://mynamespace/'}),
],
},
);
use SOAP::Lite;
use Exporter;
use Carp ();
The important modification being:
SOAP:ata->new(name => 'ParamterName', type => 'string', attr =>
{'urn:http://mynamespace/'}),
I havn't been able to find any easy solution to this and I'm not that
famliar with perl or webservice to be able to modify the stubmaker
myself.
Thank you