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

Re: [soaplite] How to return Array of Arrays from SOAP Lite

Expand Messages
  • Paul Kulchenko
    Hi Abbas, I don t know how to help in this case. SOAP 1.1 specification says: SOAP arrays are defined as having a type of SOAP-ENC:Array or a type derived
    Message 1 of 2 , Jan 8, 2003
    • 0 Attachment
      Hi Abbas,

      I don't know how to help in this case. SOAP 1.1 specification says:
      "SOAP arrays are defined as having a type of "SOAP-ENC:Array" or a
      type derived there from (see also rule 8)." and it seems to be
      correct to use arrayType="SOAP-ENC:Array[2]".

      I don't see anything wrong in the generated fragment and because
      Apache SOAP client doesn't have problems accepting one-dimensional
      array, it may be worth to raise the issue on apache soap list. Please
      let me know if my understanding is incorrect.

      Best wishes, Paul.

      --- "ayousafzai2002 <ayousafzai@...>"
      <ayousafzai@...> wrote:
      > Hello All,
      > Now that Paul kindly helped me out with returning single Array from
      >
      > a SOAP Lite server to Apache SOAP Client, I am having problems with
      >
      > returning Array of Arrays. After scouring the group I found a old
      > post which suggests that the following code should work:
      >
      > return [[1,2], [3,4]];
      >
      > However the java code is having the following problem:
      >
      > [SOAPException: faultCode=SOAP-ENV:Client; msg=No mapping found for
      >
      > 'http://schemas.xmlsoap.org/soap/encoding/:Array' using
      > encoding style
      > 'http://schemas.xmlsoap.org/soap/encoding/'.;
      > targetException=java.lang.IllegalArgumentException: No mapping
      > found
      > for 'http://schemas.xmlsoap.org/soap/encoding/:Array' using
      > encoding
      > style 'http://schemas.xmlsoap.org/soap/encoding/'.]
      >
      > Here is the dump of what the tunnel intercepted:
      >
      > HTTP/1.1 200 OK Date: Tue, 07 Jan 2003 06:13:51 GMT Server:
      > Apache/1.3.27 (Win32) mod_ssl/2.8.11 OpenSSL/0.9.6g
      > mod_perl/1.27_01-
      > dev PHP/4.2.3 SOAPServer: SOAP::Lite/Perl/0.52 Content-Length: 850
      > Connection: close Content-Type: text/xml; charset=utf-8 <?xml
      > version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
      > ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
      > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-
      > ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-
      > ENV:Body><namesp1:workResponse
      > xmlns:namesp1="urn:PCE/ComponentManager"><SOAP-ENC:Array SOAP-
      > ENC:arrayType="SOAP-ENC:Array[2]" xsi:type="SOAP-ENC:Array"><item
      > SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><item
      > xsi:type="xsd:int">1</item><item
      > xsi:type="xsd:int">2</item></item><item SOAP-ENC:arrayType="xsd:int
      > [2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:in
      > xsi:type="xsd:int">4</item></item></SOAP-
      > ENC:Array></namesp1:workResponse></SOAP-ENV:Body></SOAP-
      > ENV:Envelope>t">3</item><item
      >
      > Thanks for your help.
      >
      > Sincerely,
      > Abbas Yousafzai.
      >
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do you Yahoo!?
      Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
      http://mailplus.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.