I'm new to webservice client code calling from external service in different machine with given ipaddress. I would need to generate a client call and call one service and add logic to it using axis2 ,eclipse galilio.
Please provide me steps and how to deploy it if the service is not in our local axis2 server.
Thank you very much for your reply. I have read this article before and I have questions in it.
1. My service which I call is not in my local axis server. It a remote service running in external server.
2. I have to get connected to that remote server through its IP and then make a call to that service.
3. The question related to this tutorial is it generated 2 classes called stub and callbackhandler. Both java classes. How do I code the call to make to the service.
Do I edit the stub class or just make an instance of stub and call the service and its method in a different java class just for calling the service? Some examples online gave service client calls instance some examples gave servicelocator class instance. When do we use which in my eclipse with the generated classes (stub and callbackhandler) how do i make a call to the service?
There are different services implementations as I understand (I’m novice in ws to0 ) , at least Axis, and Axis2.
I have worked only with Axis2 and probably will be able to explain how to create client for it.
If you will give me that wsdl url (something like http://somecompany.com/services/SomeService?wsdl) I could try to
create client if there is no special credentials (password, user_name).
Thank you very much for your reply. I have the wsdl but its not a url as its given as .wsdl to me. Yes we definitly need credentials for username and password.
We need to connect to that external server through username and password then call the service and its method.
I installed axis2 as plugin to eclipse galilio with axis2 code gen and axis2 service archiver.
So far what I did is I created a dynamic project and tomcat 6.0.20 server added to it and pasted the wsdl under webcontent by creating wsdl folder. Then by right clicking the wsdl file->new->Web service client and it generated 2 java classes. stub and callbackhandler(I choose both for sync and async for client).
Now my question is how do I make a call to the service with a url is it by using the stub instance?Shall I create new java class and call a method in
my wsdl I have a request method with parameters for username/password,url.
Is that the way we have to work with axis and eclipse galilio with the autogenerated stub and callbackhandler?
I'm not able to send my wsdl?
Here are the dependent xsds for the wsdl.
Transfermanagement.xsd there are 2 more dependent xsd not giving here and you may not be able to generate the client as this message is getting too bigger.
if you have the mailid I can send to you.
wsdl is xml file which contains all descriptions about web service.
Base on that wsdl eclipse generated classes what you will need to work with this particular web service
(in your case stub and callbackhandler).
Now you can use them from any other class.
Thank you very much for your reply. Its very helpful to me. I'm working on the code. I will post the resply soon after testing it. Because it being the external server may take some time to get connection as wen have to notify the server to be up ahead of time.
Still the question aI have is for this to be build and deploy do I need just axis and tomcat any ant/maven?
Can you please explain me the deployment steps.
If it is handed over to thirdparty what dependencies can I tell them to use?
But this reply from you is very much understandable.