|
I'm attempting to create a SOAP client leveraging a published WSDL.
I am however struggling. Any insight or guidance that can be offered would be very much appreciated.
Using wsdl2perl.pl I have created the webservice bindings. However whenever I attempt the query, faultstring "Array list index is out of bounds" is returned, specifically:
<Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapenv:Client</faultcode><faul
+tstring>Array list index out of bounds</faultstring></Fault>
Here's my request script:
use MyInterfaces::fwif::fwif;
my $service = MyInterfaces::fwif::fwif->new();
my $response = $service->VersionQuery();
print $response."\n";
and here's the relevant sections from the interfaces file:
sub VersionQuery {
my ($self, $body, $header) = @_;
die "VersionQuery must be called as object method (\$self is <$self>)" if not blessed($self);
return $self->SUPER::call({
operation => 'VersionQuery',
soap_action => 'http://endace.com/ninjaprobe/VersionQuery',
style => 'document',
body => {
'use' => 'literal',
namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
encodingStyle => '',
parts => [qw( MyElements::VersionQuery )],
},
header => {
},
headerfault => {
}
}, $body, $header);
}
...and the specific element that's being called:
{ # BLOCK to scope variables
sub get_xmlns { 'http://endace.com/ninjaprobe/' }
__PACKAGE__->__set_name('VersionQuery');
__PACKAGE__->__set_nillable(1);
__PACKAGE__->__set_minOccurs();
__PACKAGE__->__set_maxOccurs();
__PACKAGE__->__set_ref();
use base qw(
SOAP::WSDL::XSD::Typelib::Element
MyTypes::Empty
);
}
|