title: Locator and stub class while migrating client side application from Axis to Axis 2
body: <p>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:</p>
  
  <p>AddFunctionLocator locator = new AddFunctionLocator ();</p>
  
  <p>AddFunction api = (AddFunctionSoapBindingStub) locator.getAddFunction()</p>
  
  <p>api.addInt(5, 3);</p>
  
  <p>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.  </p>
  
  <p>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?</p>
  
  <p>Thanks,</p>
  
  <p>Richard</p>