axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Gauwin <gau...@campus.dtrd.de>
Subject Re: simple "simpleType" redefinition
Date Mon, 20 Jan 2003 14:35:34 GMT
If it can help someone :
The solution was to use a Simple(De)SerializerFactory instead of a 
Bean(De)SerializerFactory, with the first signature I've tested on the 
server side.


Olivier Gauwin wrote:

> Hi,
>
> This problem seems really easy but I can't find a solution...
>
> I try to use this WSDL type :
> <xsd:simpleType name="Interop.Number">
>    <xsd:restriction base="xsd:int"/>
> </xsd:simpleType>
>
> I use this Typemapping :
> <typeMapping
>       xmlns:ns="http://Interop/xsd"
>       qname="ns:Interop.Number"
>        type="java:Interop.Number"
>        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>        
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> />
>
> The SOAP request looks like :
> <multiRef xsi:type="ns2:Interop.Number" ...>12</multiRef>
>
> I've tried  to use (on the server side) these 2 methods :
>
> - public Interop.Number echo(Interop.Number nb) {...}
> raises:
> AxisFault
> faultCode: {http://xml.apache.org/axis/}Server.userException
> faultString: java.lang.NullPointerException
> faultActor: null
> faultDetail:
>        stackTrace: java.lang.NullPointerException
>        at 
> org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:223)

>
>        at 
> org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:495) 
>
>        ...
> This NullPointerException is raised by Axis, not by the method code 
> (it is not executed at all).
>
> and
>
> - public int echo(int nb) {...}
> raises:
> AxisFault
> faultCode: {http://xml.apache.org/axis/}Server.userException
> faultString: org.xml.sax.SAXException: Bad types (class Interop.Number 
> -> int)
> faultActor: null
> faultDetail:
>        stackTrace: org.xml.sax.SAXException: Bad types (class 
> Interop.Number -&gt; int)
>        at 
> org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:285)
>        ...
> which is quite logical.
>
> Any pointer would be apprecated...
> Thanks,
>
> Olivier.
>
>
>




Mime
View raw message