axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wille Faler <wfa...@gmail.com>
Subject No serializer found for return-type
Date Wed, 22 Jun 2005 06:13:46 GMT
Hi, I am getting the following exception:

java.io.IOException: No serializer found for class
com.somecompany.stockquote.Quote in registry
org.apache.axis.encoding.TypeMappingDelegate@16c79d7

Basically, the Service gets invoked (I see this from the log), but for
some reason it cannot find a serializer even though a serializer is
set in the .wsdd!

	    <typeMapping
	      xmlns:ns="http://www.somecompany.com/schemas/services/stockquote"
	      qname="ns:quote"
	      type="java:com.somecompany.stockquote.Quote"
	      serializer="org.apache.axis.encoding.ser.castor.CastorSerializerFactory"
	      deserializer="org.apache.axis.encoding.ser.castor.CastorDeserializerFactory"
	      encodingStyle=""
	    />

To give a bit more detail: I am using castor for serialization and
deserialization on a document-service (style="wrapped" use="literal")
for which I have provided a WSDL myself.
It all works perfectly fine when deploying the exact same code into a
web-container, but when I try to create my own "jvm"-based transport
it throws this Exception.
And yes, I do have to make my own transport, as once I get this spike
working I need to elaborate the transport and do some routing and
other stuff with the requests and responses (but that is not in there
now).

What could be the problem when it throws this Exception when a service
has been invoked and it works in one transport but not the other?

This is the code used to invoke the Service (some other methods omitted):
			AxisEngine engine = getAxisEngine();
			MessageContext ctx = new MessageContext(engine);
			Message serverRequest = new Message(soapRequest);
			ctx.setRequestMessage(serverRequest);
			
                        ctx.setTargetService(cls);
	                engine.invoke( ctx );
	  	
			Message responseMsg = ctx.getResponseMessage();
			SOAPEnvelope envelope = responseMsg.getSOAPEnvelope();
			Element envElement = envelope.getAsDOM();
			String strSOAPBody = XMLUtils.ElementToString(envElement);
			return strSOAPBody;



Any help would be greatly appreciated!

regards
Wille Faler

Mime
View raw message