dcsimg
www.webdeveloper.com
Results 1 to 9 of 9

Thread: Remote Web Services

  1. #1
    Join Date
    Jun 2010
    Posts
    7

    Remote Web Services

    Hi All,

    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.
    Question:-
    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..

  2. #2
    Join Date
    Mar 2010
    Location
    Singapore
    Posts
    367
    Quote Originally Posted by freemind76 View Post
    Hi All,
    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.
    Question:-
    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?
    I assume you intend to use Java since you post in Java.

    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.

    Thanks.

  3. #3
    Join Date
    Jan 2009
    Posts
    3,346
    Quote Originally Posted by sohguanh View Post
    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.

  4. #4
    Join Date
    Jun 2010
    Posts
    7
    Thanks Guys.
    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?

  5. #5
    Join Date
    Jan 2009
    Posts
    3,346
    I usually look to the creator's site:

    http://java.sun.com/docs/books/tutorial/uiswing/

  6. #6
    Join Date
    Jun 2010
    Posts
    7
    Thanks criterion9. However, I am looking for a web Service client. Can you please advice?

  7. #7
    Join Date
    Mar 2010
    Location
    Singapore
    Posts
    367
    Quote Originally Posted by freemind76 View Post
    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.

  8. #8
    Join Date
    Mar 2010
    Location
    Singapore
    Posts
    367
    Quote Originally Posted by criterion9 View Post
    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.
    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 ?

    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.

  9. #9
    Join Date
    Jan 2009
    Posts
    3,346

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles