http://wiki.apache.org/ws/DotNetInteropArrays 
 

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 9:51 AM
To: [email protected]
Subject: Re: Simple array datatype as argument in rpc/literal

Note that Axis doesn't really support rpc/literal particularly well.
Also, because .NET doesn't support rpc/literal, it generally a bad idea
to use it. (Indigo will support rpc/literal, but until it's widely used,
it's a much better idea to use wrapped.)

Anne


On Mon, 14 Mar 2005 19:23:18 -0800 (PST), song xiaofei
<[EMAIL PROTECTED]> wrote:
> Hi experts,
> 
> I have a simple method which takes short[] as argument. And as I am 
> exposing it as a webservice I found the wsdl generated by Java2WSDL 
> (1.2 rc3)like
> below:
> 
>    <import
> namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="ArrayOf_xsd_short">
>     <sequence>
>      <element maxOccurs="unbounded" minOccurs="0"
> name="item" type="xsd:short"/>
>     </sequence>
>    </complexType>
>   </schema>
>  </wsdl:types>
> 
>    <wsdl:message name="ArrayTestResponse">
> 
>    </wsdl:message>
> 
>    <wsdl:message name="ArrayTestRequest">
> 
>       <wsdl:part name="in0"
> type="impl:ArrayOf_xsd_short"/>
> 
>    </wsdl:message>
> 
> And if I want to generate the wsdd and the java file using WSDL2Java 
> and I found that the wsdd is like :
>       <operation name="arrayTest"
> qname="operNS:ArrayTest"
> xmlns:operNS="http://p11115693"; soapAction="" >
>         <parameter qname="in0"
> type="tns:ArrayOf_xsd_short"
> xmlns:tns="http://p11115693"/>
>       </operation>
>       <parameter name="allowedMethods"
> value="arrayTest"/>
> 
>       <typeMapping
>         xmlns:ns="http://p11115693";
>         qname="ns:ArrayOf_xsd_short"
>         type="java:p11115693.ArrayOf_xsd_short"
> 
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> 
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         encodingStyle=""
>       />
> 
> That is axis is generating a bean wrapper rather than the simple 
> short[], and additional wrapper class :
> 
> public class ArrayOf_xsd_short  implements java.io.Serializable {
>     private short[] item;
> 
>     public ArrayOf_xsd_short() {
>     }
> 
>     public ArrayOf_xsd_short(
>            short[] item) {
>            this.item = item;
>     }
> ...
> 
> is also generated as above.
> 
> So, is there any way that I can control AXIS to make it generate an 
> simple short[] rather than bean wrapper style service. The 
> document/literal and rpc/encoded are both fine.
> 
> Thanks,
> 
> Xiaofei
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
>

Reply via email to