views:

538

answers:

1

Hi everyone,

I’m trying to migrate a client side application from Axis to Axis 2. The application also supports connection through RMI so previously, we abstracted away the connection by using the stub and the locator file. For example, we did something like the following:

AddFunctionLocator locator = new AddFunctionLocator ();

AddFunction api = (AddFunctionSoapBindingStub) locator.getAddFunction()

api.addInt(5, 3);

And this worked because the locator class would return the stub class, which in addition to extending org.apache.axis.client.Stub, also implemented the AddFunction interface class.

However, in Axis 2, using WSDL2Java, I cannot figure out if this arrangement is possible since neither the locator class is generated nor does the Stub class implement the original AddFunction interface class. Does anyone have any advice on either the proper options to use with WSDL2Java or another way that I implement so I can keep this abstraction in our client code?

Thanks,

Richard

A: 

Unfortunately axis2 doesn't generate interfaces for client stubs. It does that for server with -ss and -ssi switches, so you could modify client to use these interfaces, though it is not that straight forward.

Gennady Shumakher