In this post SOAP web service in java using eclipse, we will create hello world SOAP web service example in eclipse.Eclipse provides good API for creating web services.Eclipse will do all work for you-creating WSDL,stub,endpoints etc.Steps for creating web services in eclipse:

1.Create new dynamic web project and name it “SimpleSOAPExample”.

 2.Create new package named “org.arpit.javapostsforlearning.webservices”

3.Create a simple java class named “”
  1. package org.arpit.javapostsforlearning.webservices;
  2. public class HelloWorld {
  3.     public String sayHelloWorld(String name)
  4.     {
  5.         return “Hello world from “+ name;
  6.     }
  7. }
4.Right click on project->new->web service
 5.Click on next.
In service implementation text box,write fully qualified class name of above created class( and move both above slider to maximum level (i.e. Test service and Test Client level) and click on finish.You are done!!A new project named “SimpleSOAPExampleClient” will be created in your work space.
Click on start server.
7.After clicking start server,eclipse will open test web service API.With this test API,you can test your web service.

You are done!!.But to understand more about web services,you need to explore more.You can explore above created “SimpleSOAPExampleClient” and learn more about web services.

Leave a Reply

Your email address will not be published. Required fields are marked *