You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jarek Gawor (JIRA)" <ax...@ws.apache.org> on 2004/11/15 19:19:24 UTC

[jira] Commented: (AXIS-1657) Custom Serializer is invoked twice for a single web service call

     [ http://nagoya.apache.org/jira/browse/AXIS-1657?page=comments#action_55513 ]
     
Jarek Gawor commented on AXIS-1657:
-----------------------------------

You have logging enabled for org.apache.axis package. If debugging is enabled, the Call object will serialize the request into a string and log the message. If you disable the logging, the second serialization should disappear.


> Custom Serializer is invoked twice for a single web service call
> ----------------------------------------------------------------
>
>          Key: AXIS-1657
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1657
>      Project: Axis
>         Type: Bug
>     Versions: 1.2 Beta
>  Environment: Windows 2000
>     Reporter: Tom O Neil
>     Priority: Minor
>  Attachments: AxisCustomSerializerExample-1.zip
>
> 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(SerializationContextImpl.java:1229)
> at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:750)
> at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.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(SerializationContextImpl.java:1229)
> at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:750)
> at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.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 behaviour. 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.
> I created a simple example to test this scenario. I have attached a zip file which contains the code to execute a test of this scenario. To run the test first update the WSTEST_ServiceLocator source file so that you set your own IP address and then recompile this class into the classes
> directory. Start the test server by executing the runTestServer batch file. This must be executed in the base directory so that the server can load the server-config.wsdd file. This will start a SimpleAxisServer on port 8200.
> Then execute the TestCustomSerializer client (after updating your classpath to include the Axis jars and the classes directory).
> These tests were executed using Axis1_2beta

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira