Before making a patch for Dynamic Proxy, I would like to know what you think
about what I am doing, if it is interesting or not etc ....
(consider included code as very experimental)


Currently, our implementation of DynamicProxy (AxisClientProxy) is very
simple. It does not handle in/out and out parameters. No serializers and
deserializers are registered and so beans cannot be given as parameters (and
probably arrays too).
What I am trying to do is to solve these limitations and still stay fully
JAXRPC compliant.
Note that JAXRPC specification does not say much about Dynamic Proxy (at
least concerning inout parameters ...)

Changes concern AxisClientProxy. See attachment.

invoke method :
============
it first calls a method named proxyParams2CallParams(objects) which
translate proxy parameters to Call object parameters (the number of
parameters can be different if there are out or inout parameters)
It then calls registerSerializers
And finally callOutputParams2proxyParams is called. This function updates
holder parameters (out and inout).

Note that I do a call.setOperation(method.getName());
call object has been partially filled from Service object (port name and
targetEndPoint do not change between invocations). So I have splitted
setOperation in two functions (one that just take a method name as parameter
and one that take also the portName).

registerSerializers
=============
I have problems with this function (that I wrote).

We have : the qname of the parameters types, the classes for each parameter
We want : register serializers and deserializers which will associate a
qname with a class (only beans, arrays and enums ?)
I test if the class represents an array, a bean or an enum and then I
register this class with the qname 
(that I get from ParamDesc). 

But :
A bean can have a property that is a bean or an array.
I can get the name and the class of a property from a bean but obtaining the
qname of the type is much more difficult.
This information is be available (this information is present in wsdl) but
it cannot be easily obtained.
I think I can use some functions from
org.apache.axis.wsdl.symbolTable.ShemaUtils :
SchemaUtils.getContainedElementDeclarations
SchemaUtils.getContainedAttributeTypes
Any ideas ?

I think that I have successfully solved inout parameters issue. This is not
the case for serializers and deserializers.

Cédric Chabanois

Attachment: AxisClientProxy.java
Description: Binary data

Reply via email to