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 2012-08-23 07:08:28.023856-07 by trakz
Array list index out of bounds
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 ); }
Direct Responses: 13784 | Write a response