Hi,
I have investigated a little further and it seems to me that the methods of
my TestService implementation cause the problem described in my first mail.
My service exports three methods:
1) String testSimple(String argument)
2) String testComplex(String argument, /* out */ StringHolder
outParameter)
3) String testBuffer(Buffer buffer)
Calling the last two methods work fine, so I guess that my custom serializer
and deserializer got deployed correctly. But calling the first method
results in an exception:
INFO: Mapping Exception to AxisFault
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXException: Bad types (class java.lang.String ->
class axistest.Buffer)
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXException: Bad types (class
java.lang.String-> class axistest.Buffer)
at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:285)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
tionContextImpl.java:893)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
684)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
...
It seems to me that this is a bug in Axis. Has anybody experienced the same
strange behaviour or what is wrong with my service.
Thanks,
Thomas
-----Urspr�ngliche Nachricht-----
Von: Haug Thomas [mailto:thomas.haug@;siemens.com]
Gesendet am: Donnerstag, 24. Oktober 2002 16:36
An: '[EMAIL PROTECTED]'
Betreff: Registration of custom (de/)serializers
Hi everybody,
how do I register custom Serializer and Deserializer classes in axis. I used
the following wsdd configuration, but in does not work:
--- wsdd file ----
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="TestService" provider="java:RPC">
<parameter name="className" value="axistest.TestService"/>
<parameter name="allowedMethods" value="*"/>
<typeMapping
xmlns:ns="http://localhost:8080/axis/services/TestService"
qname="ns:ItemBuffer"
languageSpecificType="axistest.Buffer"
serializer="axistest.BufferSerializerFactory"
deserializer="axistest.BufferDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</service>
</deployment>
--------
I am able to deploy my service but when I am calling the service my client
receives the following exception:
INFO: Mapping Exception to AxisFault
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXException: Bad types (class java.lang.String
-> class axistest.Buffer)
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXException: Bad types (class
java.lang.String -> class axistest.Buffer)
at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:285)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
tionContextImpl.java:893)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
684)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:1
90)
...
The interesting part is that the service mothod doesn't need to
(de-)serialize a Buffer object because it works on String objects only. Only
another method uses the Buffer class but that method has not been called
yet.
Can anybody tell me what I am doing wrong because I don't find a solution in
the documentation of axis nor in the samples provided with axis.
Thank you very much,
Thomas