Search code examples
javaweb-servicessoapwsdl

Web service integration in Java


I have created a web application, now i was asked by my professor to integrate it with another application using a provided web service.Given this is my first time working with web services, i read a lot about it(wsdl,SOAP..). But i still seem to be confused about the concept. I have 2 application mine and another one. The data saved in my application, needs to be saved in the second application, and i am given a wsdl file. I imported the file to eclipse and created the java classes of the wsdl file using Eclipse kepler. What i need is a bit clarification on how the concept in my case works? The same database should be on both sides? What do i need to do? Any help on clarifying this would be much appreciated.


Solution

  • Webservice can be thought of :

    1. A server serving up data for one or many clients (the data can come from a text file or a database or from any other service. There can be plenty of ways)
    2. A client getting the data from server (the client can save the data anyway they want).

    I am assuming that your webserver is up.

    1. You will need to build a client in Java (assuming that is the language you are using). That Java will consume the the data that is served by the SOAP web server.
    2. Once you get the data you can store it in the database.
    3. The database that you use on the client side can be anything and will not depend on the server. You can use POJO objects and simple JDBC to store the data in the database.