Generating the web services: Java web services part 5


The series so far has been as follows:

In this tutorial we are going to do a simple thing; generate the web service and make sure it is working fine. We therefore don’t need to install anything as we have all we need.

Steps

1.      Navigate to your project folder in Eclipse and right click on the java file you created that has the login code. For my case the file is Login.java.

2.      Select the “Web Services” tab and click on “Create Web Service”. You should be presented with an interface similar to the screenshot below

Creating the web service

Creating the web service

 

3.      All the configurations should be set correctly before you can proceed to the next step i.e. Server: Tomcat <your version>, Web service runtime: Apache Axis, Service project: <your project name>.

4.      Check on “Publish the Web Service” and “Monitor the web Service” checkboxes and then click on “Finish”.

5.       If all goes well you will be presented with a screen similar to the one shown in the screenshot below. It shows the operations your web service is exposing and how they are accessed.

Successful generation of the web services

Successful generation of the web services

 

6.       To test the web service we are going to see the WSDL file which was generated by the web service. Right click on the project folder and select “Run As” and then click on “Run On Server”. You will be presented with a screen similar to the screenshot below;

Results of running on server

Results of running on server

 

7.       Click on the “wsdl/” link and you will be presented with the available WSDL files, for my case I have Login.wsdl. On clicking it you should be presented with the wsdl file which is similar to the screenshot below;

The generated wsdl file

The generated wsdl file

 

8.       As you can see it is basically an XML document specifying the services our web services is exposing.

Downloads

That will be all for today, in the next tutorial we are going to consume the web services we have just created. Till then cheers!!

Advertisements

2 thoughts on “Generating the web services: Java web services part 5

  1. Pingback: Tweets that mention Generating the web services: Java web services part 5 « KiruinC -- Topsy.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s