axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinh Nguyen (vinguye2)" <vingu...@cisco.com>
Subject RE: Does Axis2 support 2D/2D object array as return type?
Date Fri, 04 Apr 2008 03:29:37 GMT
Hi,
Please see the attached email where I tried to address your question:)
 
The idea with web services is that you can pass/return any type of
object as long as you define an XML schema for it.  The schema
definition tells the data binding tooling (i.e. ADB, XmlBeans, etc) how
to convert your type to/from XML.
 
So if you want to return a multi-dimension array, you need to define an
object schema that has such a data structure.  For example, the
following might work for you if you want to pass a 2D string[].
 
    <xs:complexType name="StringArrayType">
        <xs:sequence>
            <xs:element name="Item" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StringArray" type="tns:StringArrayType"/>
 
    <xs:complexType name="2DStringArrayType">
        <xs:sequence>
            <xs:element ref="StringArray" minOccurs="0"
maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="2DStringArray" type="tns:2DStringArrayType"/>

 
 

________________________________

From: Chinmoy Chakraborty [mailto:cchinu@gmail.com] 
Sent: Thursday, April 03, 2008 1:24 AM
To: axis-user@ws.apache.org
Subject: Does Axis2 support 2D/2D object array as return type?


Hello,
 
Does Axis2 support 2D/2D object array as return type?
 
Chinmoy

Mime
View raw message