Multidimensionality in SOAPLite

"Chen, Li (Research, YOH)" <[email protected]> Fri, 11 Jul 2003 13:46:56 -0400
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <[email protected]>
Hi all,
I am a user of SOAPLite (from the client side), and would like to know the
following: how do I make SOAPLite web services engine create request
messages with parameters consisting of multidimensional arrays? (I know
there are mentions of SOAPLite having no such native support -- even if so,
how can I "force" it to do so with some work-around?) The web service I am
accessing within the company requires multidimensional array parameters,
with header in Java:

public static String[][] getPersonData(String[] attributes, String[]
restrictions, String[] appName)

Currently, my code:

 @attributes= ("First Name", "Middle Name", "Last Name");
  @restrictions= ("");
  @app_name= ("myApp");

  print SOAP::Lite
    -> uri('MyService')
    -> proxy('http://localhost:8082/axis/services/')
    -> getPersonData(@attributes, @restrictions, @app_name)
    -> result;

produces the following SOAP message:

POST /axis/services/ HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close
Accept: text/xml Accept: multipart/* Host: localhost User-Agent:
SOAP::Lite/Perl/0.55 Content-Length: 903 Content-Type: text/xml;
charset=utf-8 SOAPAction: "myService#getPersonData"  <?xml version="1.0"
encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Body>
<namesp1:getPersonData xmlns:namesp1="myService">
        <c-gensym3 xsi:type="xsd:string">First Name</c-gensym3>
        <c-gensym5 xsi:type="xsd:string">Middle Name</c-gensym5>
        <c-gensym7 xsi:type="xsd:string">Last Name</c-gensym7>
        <c-gensym15 xsi:type="xsd:string"/>
        <c-gensym17 xsi:type="xsd:string">myApp</c-gensym17>
</namesp1:getPersonData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

How do I make SOAPLite say something like that (instead):

POST /axis/services/ HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close
Accept: text/xml Accept: multipart/* Host: localhost User-Agent:
SOAP::Lite/Perl/0.55 Content-Length: 903 Content-Type: text/xml;
charset=utf-8 SOAPAction: "myService#getPersonData"  <?xml version="1.0"
encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Body>
<namesp1:getPersonData xmlns:namesp1="myService">
   <arg0 xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[3]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <c-gensym3 xsi:type="xsd:string">First Name</c-gensym3>
        <c-gensym5 xsi:type="xsd:string">Middle Name</c-gensym5>
        <c-gensym7 xsi:type="xsd:string">Last Name</c-gensym7>
</arg0>
 <arg1 xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[0]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
<arg2 xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[1]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <c-gensym17 xsi:type="xsd:string">myApp</c-gensym17>
</arg2>
</namesp1:getPersonData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thanks!


        g                                     GE Global Research

____________________________________________________________________________
______________________________________________
        Li (Lee) Ye Chen
        Intern - Information Technology Management Services
        One Research Circle, KWC-255D
        Niskayuna, NY 12309
        (518) 387-4556