Saturday, July 29, 2017

Creating Web Service in Java Using Eclipse

Open Eclipse and create new Dynamic Web Project









































Setup the Target runtime to Tomcat 7 


































After updating the Tomcat 7 server










































Click Finish and after that create a new class HelloWorldService







































Add new method sayHello(String name)
















Right click on project and create a new WebService and add the above class at the creation of new webservice






























and select the Test service and Test Client and check the Publish the web Service checkbox










































Click Next









































Click Next and Click on Start Server button








































Once the server will start..Click on Next and Launch WebService Explorer








































It will open the  HelloWorld WebService sayHello web method. You can test the same.






























































Click Next Test WebService









































Click Next





































Click Next




































Click Finish. You will see the 

http://localhost:7534/HelloWorldWebServiceClient/sampleHelloWorldServiceProxy/TestClient.jsp




No comments:

Post a Comment