You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by song xiaofei <so...@yahoo.com> on 2005/03/15 04:23:18 UTC

Simple array datatype as argument in rpc/literal

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 

Http authentication for my Axis client...

Posted by Adam Landefeld <al...@corda.com>.
Hi All,

I am trying to program my axis client to go through an authenticated 
http proxy server.

I set these properties and am partially successful.

         System.setProperty("http.proxyHost", "proxy");
         System.setProperty("http.proxyPort", "8005");
         System.setProperty("http.proxyUser", "user");
         System.setProperty("http.proxyPassword", "pass");

The host and port are respected every time... however... the username 
and password seem to never be used. I have verified that these creds 
work with the proxy server, but whenever my client runs I get the 
error:

(407)Proxy Authentication Required

What am I doing wrong setting the proxy user and password that is 
screwing this up? Anyone?

Does anyone know of another way to set these credentials for the client?

Thank you, hopefully someone knows... I am not sure anyone even gets my 
messages as I have never had a response of any kind :-)
-Adam


Re: Simple array datatype as argument in rpc/literal

Posted by Anne Thomas Manes <at...@gmail.com>.
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
<so...@yahoo.com> 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
>