axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <maili...@matthias-wessendorf.de>
Subject RE: [Axis error] No serializer found for class
Date Mon, 27 Sep 2004 17:47:23 GMT
karim, paul

thanks! The call via HTTP.GET works now.
I just started to implement my java-client
and got an Exception during Deserializing.
(see below)

I have this in WSDD-file:
<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"/>
 <beanMapping qname="mwNS:Data" xmlns:mwNS="urn:W3LService"
languageSpecificType="java:net.wessendorf.ws.Data"/>
</service>
</deployment>

Something I am still missing.
But what? :)


Thanks for any advice.

Regards,
Matthias

<exception>
- Exception:
org.xml.sax.SAXException: Deserializing parameter 'getDataReturn':
could not find deserializer for type {urn:W3LService}Data
	at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
	at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:963)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
198)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
	at org.apache.axis.client.Call.invoke(Call.java:2272)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at net.wessendorf.ws.SOAPClient2.main(SOAPClient2.java:35)
AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: Deserializing parameter
&apos;getDataReturn&apos;:  could not find deserializer for type
{urn:W3LService}Data
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}stackTrace:
org.xml.sax.SAXException: Deserializing parameter 'getDataReturn':
could not find deserializer for type {urn:W3LService}Data
	at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
	at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:963)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
198)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
	at org.apache.axis.client.Call.invoke(Call.java:2272)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at net.wessendorf.ws.SOAPClient2.main(SOAPClient2.java:35)


org.xml.sax.SAXException: Deserializing parameter 'getDataReturn':
could not find deserializer for type {urn:W3LService}Data
	at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
	at org.apache.axis.client.Call.invoke(Call.java:2275)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at net.wessendorf.ws.SOAPClient2.main(SOAPClient2.java:35)
Caused by: org.xml.sax.SAXException: Deserializing parameter
'getDataReturn':  could not find deserializer for type
{urn:W3LService}Data
	at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
	at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:963)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
198)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
	at org.apache.axis.client.Call.invoke(Call.java:2272)
	... 3 more
</exception>

> -----Original Message-----
> From: Bouche Paul [mailto:Paul.Bouche@student.hpi.uni-potsdam.de] 
> Sent: Monday, September 27, 2004 3:24 PM
> To: axis-user@ws.apache.org
> Subject: RE: [Axis error] No serializer found for class
> 
> 
> Is there not to a way to register a type-mapping in the .wsdd file?
> I just looked in the axis-user guide and you can use:
> a <typMapping> element as child of <service> element in the 
> wsdd. Example from the dok:
> <typeMapping qname="ns:local" xmlns:ns="someNamespace"
>              languageSpecificType="java:my.java.thingy"
>              serializer="my.java.Serializer"
>              deserializer="my.java.DeserializerFactory"
>              
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> 
> Paul
> 
> > -----Original Message-----
> > From: Matthias Wessendorf [mailto:mailings@matthias-wessendorf.de]
> > Sent: Montag, 27. September 2004 14:59
> > To: axis-user@ws.apache.org
> > Subject: RE: [Axis error] No serializer found for class
> > 
> > 
> > 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
> > > 
> > 
> > 
> > .
> > 
> 
> .
> 


Mime
View raw message