axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tom ONeill" <beagleboythefi...@hotmail.com>
Subject Custom Serializer is invoked twice for a single web service call
Date Wed, 10 Nov 2004 12:14:20 GMT
Hi all,

I have written a custom serializer and deserializer for one of my complex 
types and I have configured my client to use these custom serializers using 
a client-config.wsdd file.

I have added some debug output to the serialize method of my custom 
Serializer and I have noticed that this method seems to be invoked twice for 
a single invocation of a web service method (I expect that the serializtion 
of my datatype to XML needs only to be done once to invoke the web service).

I added a stack dump to the serialize method of my custom serializer and the 
result is that I got the following two stack dumps upon a single web service 
invocation

java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1071)
        at com.mycompany.www.type.MyDataSer.serialize(Unknown Source)
        at 
org.apache.axis.encoding.SerializationContextImpl.serializeActual(Serialization
ContextImpl.java:1229)
        at 
org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContex
tImpl.java:750)
        at 
org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(Serialization
ContextImpl.java:821)
        at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:144)
        at 
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:470)
        at 
org.apache.axis.message.MessageElement.output(MessageElement.java:1111)
        at org.apache.axis.client.Call.invoke(Call.java:2661)
        at org.apache.axis.client.Call.invoke(Call.java:2357)
        at org.apache.axis.client.Call.invoke(Call.java:2280)
        at org.apache.axis.client.Call.invoke(Call.java:1741)
        at com.mycompany.www.MyStub.testService(Unknown Source)
        at com.mycompany.www.Test.run(AbstractMessageHandler.java
        at java.lang.Thread.run(Thread.java:536)

java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1071)
        at com.mycompany.www.type.MyDataSer.serialize(Unknown Source)
        at 
org.apache.axis.encoding.SerializationContextImpl.serializeActual(Serialization
ContextImpl.java:1229)
        at 
org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContex
tImpl.java:750)
        at 
org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(Serialization
ContextImpl.java:821)
        at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:144)
        at 
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:470)
        at 
org.apache.axis.message.MessageElement.output(MessageElement.java:1111)
        at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:268)
        at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:499)
        at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:386)
        at org.apache.axis.Message.getContentType(Message.java:465)
        at 
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:307)
        at 
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:87)
        at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:144)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2688)
        at org.apache.axis.client.Call.invoke(Call.java:2671)
        at org.apache.axis.client.Call.invoke(Call.java:2357)
        at org.apache.axis.client.Call.invoke(Call.java:2280)
        at org.apache.axis.client.Call.invoke(Call.java:1741)
        at com.mycompany.www.MyStub.testService(Unknown Source)
        at com.mycompany.www.Test.run(AbstractMessageHandler.java
:89)
        at java.lang.Thread.run(Thread.java:536)


Does anyone have any idea why this happens. Is there somthing in the 
internals of Axis that leads to this behavious. My web service invocation is 
successful so its not causing any problems for me but I am just curious as 
to why this might occur.

Cheers,
Tom

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


Mime
View raw message