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

2881Re: Sending an empty integer array

Expand Messages
  • jpeyser
    Jul 30, 2003
      There are a couple of ways to do it.

      First, you can redefine the schema subroutine anyTypeValue so that
      the default will be integer

      sub SOAP::XMLSchema1999::Serializer::anyTypeValue {'int'};

      Or, you can 'hardcode' the type using the attr switch.

      -> createTR(SOAP::Data->value([])->attr({'SOAP-ENC:arrayType'
      => 'xsd:int[0]'}))


      --- In soaplite@yahoogroups.com, "fairview902" <jakem01@a...> wrote:
      > I have a perl soap::lite client that communicates with a java
      > web service. The java web service is expecting an array of
      > (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,
      > exception is thrown. If I place anything in the array,
      > $soap->function([0]); , then it sends and array of integers, but
      > 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
      > worked. Can someone please tell me how to send an empty integer
      > array in soap::lite?
      > Thank you very much...
    • Show all 2 messages in this topic