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

Re: Sending an Empty Integer Array

Expand Messages
  • eric-amick@comcast.net
    ... I haven t tested this, but I suspect something like $soap- function(SOAP::Data- type(integer = [])); should work. The type might need to be integer[]
    Message 1 of 1 , Jul 30 6:56 AM
      > I have a perl soap::lite client that communicates with a java
      > web service. The java web service is expecting an array of integers
      > (int[]) as an argument. However, for my purposes, I do not have
      > anything to place in the argument. Therefore, I wish to send an
      > empty or null array.
      > The problem is that perl does not type variables or arrays
      > unless something is in them. If I send a blank array:
      > $soap->function([]); - soap::lite encodes the array as
      > an "anytype" array. Since this does not match the java prototype, an
      > exception is thrown. If I place anything in the array,
      > $soap->function([0]); , then it sends and array of integers, but with
      > one item. I cannot have any items sent. The array must be an
      > integer array of size 0.
      > I have tried many different approaches to this, but nothing has
      > worked. Can someone please tell me how to send an empty integer
      > array in soap::lite?

      I haven't tested this, but I suspect something like

      $soap->function(SOAP::Data->type(integer => []));

      should work. The type might need to be "integer[]" (in quotes) instead.

      Eric Amick
      Columbia, MD
    Your message has been successfully submitted and would be delivered to recipients shortly.