I am trying to develop a simple web service using Axis2 as the server.
I am placing the folder with required classes, META-INF and lib in the repository/services directory in Axis. The service is visible when the server is started and the WSDL file is generated automatically. I am using the eclipse plugin - WSDL2Java to get the stub and callbackhandler programs at the client side. I am using the following code to create synchronous web service:
MyServiceStub stub=new MyServiceStub("http://...");
MyServiceStub.AddNumbers request=new MyServiceStub.AddNumbers();
request.setParam0(10);
request.serParam1(15);
System.out.println("The response from server is: "+stub.addNumbers(request).get_return());
It is working fine. But how do I implement the same asynchronously.
Also where should the WSDL file created by Java2WSDL eclipse plugin with custom settings be placed to be available to clients, instead of using the one that Axis2 generates automatically using defaults.
Message was edited by:
Javanator_prime
I got it. I wrote a class that extends the abstract class - callbackhandler and implemented the methods in it. Whenever the server sends the response the corresponding methods in the class are automatically called.
But I still couldn't figure out where the WSDL file should be places if Axis is used a server where the webservice is located.
Thanks in advance...