I am using axis beta 1.1. My old document style service has a method: outObject
method1(inObject in);
I use WSDL2Java tool to generate the server side classes. Everything is working fine.
Now I need to add an extra element to both inObject and outObject(in the type
definition in wsdl) and create a new service method: outObject method2(inObject in);
for a new client to use, but I don't want to break the client who has the old type
definitions and who is still calling method1.
The two operations are defined in wsdl in this order:
<wsdl:operation name="method1">
.....
</wsdl:operation>
<wsdl:operation name="method2">
.....
</wsdl:operation>
The problem is when my new client calls method2(inObject) the server always invokes
method1(inObject). If I put operation method2 before method1 in wsdl and re-generate
the server classes, the new client works. But the old client breaks because it is
calling method2 which contains an unrecognizable extra element.
It seems that axis doesn't use method name to find an operation. It always finds the
first operation whose parameters match the one passed in, in this case the first
operation defined in the wsdl file. Is this a bug? If not, does anyone know what could
be a workaround?
Thanks in advance.