Loading ...
Sorry, an error occurred while loading the content.

SOAP::Lite 0.69 / WSDL with Array

Expand Messages
  • Andrew Hicox
    Hello Everyone: I m going out of my mind here. I ve written a SOAP service with SOAP::Lite / apache / mod_perl which I m trying to publish a WSDL for. I m
    Message 1 of 1 , Aug 16, 2006
    • 0 Attachment
      Hello Everyone:

      I'm going out of my mind here.

      I've written a SOAP service with SOAP::Lite / apache / mod_perl which
      I'm trying to publish a WSDL for. I'm using Pod::WSDL, and that seems
      to be working okay. The function takes 4 strings and an array of integers.

      I'm calling the service also from SOAP::Lite on another machine.

      After updating to the fixed SOAP::Lite / 0.69 today, I'm able to load
      the WSDL with no problems (was previouslty getting the "ArrayOfInt
      can't be found in a schema class 'SOAP::Serializer'" type errors).

      Everything seems to work now except that I cannot specify values for
      the array of integers, no-way, no-how. The client serializes the
      preceding 4 strings just fine, but no matter what else I specify in
      the function's argument list, the client always serializes the array
      of integers as:

      <int_list xsi:nil="true" xsi:type="tns1:ArrayOfInt" />

      I don't know if this is my ignorance or perhaps a bug in SOAP::Lite
      (or Pod::WSDL).

      So ... What does it take to tell SOAP::Lite that I want to specify an
      argument to serialized as an array of integers (as specified in the WSDL?)

      For reference, this is the syntax I'm using in the SOAP client to make
      the call:

      my $soap = new SOAP::Lite->service('https://url.of.wsdl');

      my $result = $soap->function(

      that dosen't work.
      so I tried:

      my $result = $soap->function(

      still serializes the integer list as null so I tried to specify it
      manually as an array:

      my $result = $soap->function(
      SOAP::Data->name("int_list" => [ 1,2,3,4 ])->type("Array")

      Still no go
      also tried specifyign the last argument very explicitly:

      SOAP::Data->name('intval' => 1)->type("int"),
      SOAP::Data->name('device_id' => 2)->type("int"),
      SOAP::Data->name('device_id' => 3)->type("int")

      and also as

    Your message has been successfully submitted and would be delivered to recipients shortly.