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 Matthias Wessendorf <ma...@matthias-wessendorf.de> on 2004/09/27 14:38:57 UTC

[Axis error] No serializer found for class

Hi all,

I developed a simple WebService with Axis.
One method is used that returns a custom dataType.
Ok, deployment was successfully. WSDL-file contains:

<wsdl:types>
 <schema targetNamespace="http://ws.wessendorf.net">
 <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <complexType name="Data">
   <sequence/>
  </complexType>
 </schema>
</wsdl:types>

When I call my WebService for *testing* via HTTP-GET,
I got that message:
<snip>
AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is: 
	java.io.IOException: No serializer found for class
net.wessendorf.ws.Data in registry
org.apache.axis.encoding.TypeMappingImpl@11d45

AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.io.IOException: No serializer found for class
net.wessendorf.ws.Data in registry
org.apache.axis.encoding.TypeMappingImpl@11d45
 faultActor: 
 faultNode: 
 faultDetail: 
</snip>

Any ideas?
Btw. the clazz Data implements Serializable-Interface ...
(it is just an empty clazz for testing the use of *complex*-types)

Thanks for any advice.

Regards,
Matthias


Re: [Axis error] No serializer found for class

Posted by karim <k....@clipack.com>.
Matthias Wessendorf wrote:

>Karim,
>
>thanks for the fast replay.
>I used a POJO-class for the WebService and a ValueObject (Data)
>for Return-Statement. 
>If I use the Call-Object, now my WebServices depends on Axis.
>is there a more generic way for that?
>
>I have
>W3LService.java with:
>public Data getData(String name){
>return new Data();
>}
>
>and service.wsdd:
><deployment xmlns="http://xml.apache.org/axis/wsdd/"
>    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
><service name="W3LService" provider="java:RPC">
> <parameter name="className" value="net.wessendorf.ws.W3LService"/>
> <parameter name="allowedMethods" value="getData"/>
></service>
></deployment>
>
>Thanks,
>Matthias
>
>  
>
Look at this URL : http://www.osmoticweb.com/axis-wsdd/beanMapping.htm

It explains how to precise that you use a beanSerializer and a 
BeanDeserializer in a wsdd file.


If you don't use the bean serializer, look at 
http://www.osmoticweb.com/axis-wsdd/typeMapping.htm

Normally, it'll avoid to your client to register a type mapping

Karim


RE: [Axis error] No serializer found for class

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Karim,

thanks for the fast replay.
I used a POJO-class for the WebService and a ValueObject (Data)
for Return-Statement. 
If I use the Call-Object, now my WebServices depends on Axis.
is there a more generic way for that?

I have
W3LService.java with:
public Data getData(String name){
return new Data();
}

and service.wsdd:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="W3LService" provider="java:RPC">
 <parameter name="className" value="net.wessendorf.ws.W3LService"/>
 <parameter name="allowedMethods" value="getData"/>
</service>
</deployment>

Thanks,
Matthias


> I think that you need to register a type mapping.
> To do so, use the method registerTypeMapping of the Call object.
> 
> Create a QName ( new QName("http://ws.wessendorf.net", "Data")), 
> then call registerTypeMapping on (Data.class, qname, serializer, 
> deserializer);
> 
> the serializer and deserializer can be found at 
> org.apache.axis.encoding.ser.
> 
> Hope this helps
> Karim
> 


Re: [Axis error] No serializer found for class

Posted by karim <k....@clipack.com>.
Matthias Wessendorf wrote:

>Hi all,
>
>I developed a simple WebService with Axis.
>One method is used that returns a custom dataType.
>Ok, deployment was successfully. WSDL-file contains:
>
><wsdl:types>
> <schema targetNamespace="http://ws.wessendorf.net">
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>  <complexType name="Data">
>   <sequence/>
>  </complexType>
> </schema>
></wsdl:types>
>
>When I call my WebService for *testing* via HTTP-GET,
>I got that message:
><snip>
>AXIS error
>
>Sorry, something seems to have gone wrong... here are the details:
>
>Fault - ; nested exception is: 
>	java.io.IOException: No serializer found for class
>net.wessendorf.ws.Data in registry
>org.apache.axis.encoding.TypeMappingImpl@11d45
>
>AxisFault
> faultCode:
>{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode: 
> faultString: java.io.IOException: No serializer found for class
>net.wessendorf.ws.Data in registry
>org.apache.axis.encoding.TypeMappingImpl@11d45
> faultActor: 
> faultNode: 
> faultDetail: 
></snip>
>
>Any ideas?
>Btw. the clazz Data implements Serializable-Interface ...
>(it is just an empty clazz for testing the use of *complex*-types)
>
>Thanks for any advice.
>
>Regards,
>Matthias
>
>
>
>  
>
I think that you need to register a type mapping.
To do so, use the method registerTypeMapping of the Call object.

Create a QName ( new QName("http://ws.wessendorf.net", "Data")), 
then call registerTypeMapping on (Data.class, qname, serializer, 
deserializer);

the serializer and deserializer can be found at 
org.apache.axis.encoding.ser.

Hope this helps
Karim