Re: Multidimensionality in SOAPLite
Eric Amick <[email protected]> Mon, 14 Jul 2003 14:49:26 -0400
| Newsgroups | gmane.comp.windows.devel.soap.general |
|---|---|
| Organization | Are you serious? |
| Message-ID | <[email protected]> |
On Mon, 14 Jul 2003 13:17:10 -0400, you wrote: >Hi Eric, > Thanks! Your recommendation worked, albeit I had to change a piece >of it. Here is what the XML output looks like (from the client) once I >passed references to the arrays instead: >It seems that the name SOAP-ENC:Array is causing >java.lang.ArrayStoreException on the server side (an Axis implementation >there)...so I changed the message manually (inside TCP Monitor, which lets >you change the raw message and test-send again) to: > >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: 1291 >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="SOAP-ENC:Array" >SOAP-ENC:arrayType="xsd:string[3]"> > <item xsi:type="xsd:string">First Name</item> > <item xsi:type="xsd:string">Middle Name</item> > <item xsi:type="xsd:string">Last Name</item> > </arg0> > <arg1 xsi:type="SOAP-ENC:Array" >SOAP-ENC:arrayType="xsd:string[1]"> > <item xsi:type="xsd:string"/> > </arg1> > <arg2 xsi:type="SOAP-ENC:Array" >SOAP-ENC:arrayType="xsd:string[1]"> > <item xsi:type="xsd:string">myApplication</item> > </arg2> > </namesp1:getPersonData> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > >So instead of <SOAP-ENC:Array... we have <arg0...> and so on. And this >worked! > >One more question though, how do I make SOAPLite to generate arg0, etc. for >that specific sub-element instead of SOAP-ENC:Array? I'm not 100% certain, but you might try changing the arguments from plain references like \@arrayname to SOAP::Data->name(arg0 => \@arrayname) instead. I haven't tried this, but it seems likely to work. -- Eric Amick Columbia, MD