Hi,

I want to call a doc/lit service with a method returning void. In the client
I have to use addParameter, so JAX-RPC forces me to specify also a return
type:

call.setReturnType( XMLType.AXIS_VOID);

This works pretty well with RPC/Encoded services. With a doc/lit I got the
following exception:


org.xml.sax.SAXException: Deserializing parameter 'movieResponse':  could
not find deserializer for type {http://xml.apache.org/axis/}Void
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
        at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
tionContextImpl.java:963)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
722)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
        at org.apache.axis.client.Call.invoke(Call.java:2272)


the service returns an empty response and the client tries to deserialize it
as AXIS_VOID:

<soapenv:Body>
  <movieResponse xmlns="http://store.javamagazin.de"/>
</soapenv:Body>


If I use call.setReturnType( XMLType.XSD_ANYTYPE) everything works fine. Is
it ok to use ANYTYPE for void? Is there a better solution or is it a bug?

thanx,
Thomas


Orientation in Objects GmbH
http://www.oio.de

Reply via email to