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

passing array of integer

Expand Messages
  • Tiago Pedroso
    Hello, I m having problems passing an array of integer to a function... Looking at the service logs, an empty array is being received on the other end. Which
    Message 1 of 1 , May 29, 2003
    • 0 Attachment
      Hello,

      I'm having problems passing an array of integer to a function...

      Looking at the service logs, an empty array is being received on the
      other end. Which is not what we expected..

      I've looked at several examples that mencioned array passing to
      functions and don't quite understand what i'm doing wrong...

      Can anyone help me ?

      Many thanks

      Tiago Pedroso

      This is the client code:

      use SOAP::Lite;

      my $service = SOAP::Lite
      -> service('http://my.webservice.com/service/x.wsdl'),
      -> uri('the_correct_uri');

      my $s = $service->SendCampaign(
      SOAP::Data->type(boolean => 0)->name('bolHasList'),
      SOAP::Data->type(int => 1410)->name('intListId'),
      SOAP::Data->type(string => "XXX")->name('strName'),
      SOAP::Data->type(string => "122")->name('strCode'),

      SOAP::Data->type('Array' =>
      [
      SOAP::Data->type(int => 939653116),
      SOAP::Data->type(int => 939653159),

      ] )->name('intMSISDN'),

      SOAP::Data->type(boolean => 1)->name('bolNow'),
      SOAP::Data->type(string => "isto é um teste, valha-nos o
      PERL!!!")->name('strMessage'),
      SOAP::Data->type(boolean => 0)->name('bolReply'),
      );

      The WSDL declaration is:

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tns="XXXXXXXXXXXX"
      xmlns:types="XXXXXXXXXXXXXXXXX"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <tns:SendCampaign>
      <strUsername xsi:type="xsd:string">string</strUsername>
      <strPassword xsi:type="xsd:string">string</strPassword>
      <bolHasList xsi:type="xsd:boolean">boolean</bolHasList>
      <strName xsi:type="xsd:string">string</strName>
      <strCode xsi:type="xsd:string">string</strCode>
      <intListId xsi:type="xsd:int">int</intListId>
      <intMSISDN href="#id1" />
      <bolNow xsi:type="xsd:boolean">boolean</bolNow>
      <strScheduleDate xsi:type="xsd:string">string</strScheduleDate>
      <strScheduleTime xsi:type="xsd:string">string</strScheduleTime>
      <strMessage xsi:type="xsd:string">string</strMessage>
      <bolReply xsi:type="xsd:boolean">boolean</bolReply>
      <strEndScheduleDate
      xsi:type="xsd:string">string</strEndScheduleDate>
      <strEndScheduleTime
      xsi:type="xsd:string">string</strEndScheduleTime>
      <bolConfirmation xsi:type="xsd:boolean">boolean</bolConfirmation>
      <strConfirmationMessage
      xsi:type="xsd:string">string</strConfirmationMessage>
      <bolPays xsi:type="xsd:boolean">boolean</bolPays>
      <bolOverCharged xsi:type="xsd:boolean">boolean</bolOverCharged>
      <bolAcceptsAll xsi:type="xsd:boolean">boolean</bolAcceptsAll>
      </tns:SendCampaign>
      <soapenc:Array id="id1" soapenc:arrayType="xsd:int[2]">
      <Item>int</Item>
      <Item>int</Item>
      </soapenc:Array>
      </soap:Body>
      </soap:Envelope>

      --
      Tiago Faro Pedroso - <tfp@...>
    Your message has been successfully submitted and would be delivered to recipients shortly.