Remote Web Services
I am new to web services. I have a requirement in my project. I have to consume the web services of our vendor in my project. All he has shared with me is a WSDL file and a document about the description of the the different operations.
1: What do I need to do consume these web services in my java project? I have been advised to use axis2, eclipse with tomcat6.
2: Do I need to ask for some other files/information from WS vendor OR wsdl file is enough to consume these web services?
3: Do I need to write a java WS client (using axis2 plugin) or another webservice which will talk to vendor web service?
Please suggest the best possible way.
I am sorry if the question sounds like a naive..
I assume you intend to use Java since you post in Java.
Originally Posted by freemind76
1. Apache Axis2 (please note get the version 2 for performance) is the library that "talk" SOAP. Eclipse is the IDE you write code. Tomcat is the web server to host the Axis2 war so I was wondering if you intend to let other ppl "call" you ?
2. WSDL is enough information. You maybe can get from the vendor some sample SOAP request and their corresponding SOAP response for reference.
3. It depend on your design. Do you want your Web Service to "talk" to the vendor Web Service ? Or you want others to "call" your Web Service? If not you can just have a Java client that uses Axis2 libraries to "talk" to the vendor Web Service.
Please note nowadays ppl are into REST-ful web services already. You do not need those SOAP headers, SOAP body etc format.
It is much more difficult to secure a web service through REST rather than SOAP. Public web services I agree are usually REST based rather than SOAP for ease of use, however in the private sector (B2B or otherwise) SOAP is still reigning king.
Originally Posted by sohguanh
This is what I did.
I used axis2, eclipse and tomcat6. Downloaded the eclipse plugin and generated the Stubs based on WSDL.
Now I have to write the final java client that will leverage these stubs to make the web services. I did not find any good article on internet that teaches writing the Java clients.
Can you please suggest any good link OR tips on writing the java client?
Thanks criterion9. However, I am looking for a web Service client. Can you please advice?
If you have used Apache Axis2, then most likely the examples are given. There are a few ways in Axis2 to build a Web Service client. I like to use the AXIOM API for low level manipulation though.
Originally Posted by freemind76
Hmm... when you say secure a Web Service are you referring to encryption or some other level of security? If it is encryption, then activating HTTPS will secure the bytes that are in the transport layer correct? If you say build some application specific security information using the SOAP header then it is easy to build it in a REST-ful Web Service isn't it ?
Originally Posted by criterion9
Since REST is not a technology so as to speak, I can transfer JSON and other kind of data format from the web service to the client. In contrast, SOAP make it almost mandatory to use XML since that is specified in the standard.
I am not against SOAP but I see a trend in web services going the REST-ful way. I believe the next version of Java SDK would incorporate REST-API in it's SDK.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)