Web Services Beginner Guide
1) Create dynamic project as below.
3) Eclispe window -> preferences should be set as below.Becuase first run we are going to do using Apache Axis.
The tomcat server should have been added as below.
If tomcat is running, then it should show 'server' open in navigator. Else start the server in 'server' console by right clicking on shown server in console.
4) Have the tomcat server running within eclipse. Right clik project -> new -> web service and then browse the service class and give location and modify as below screen shot.
Sometimes when doing next we may get error.But click back and do next again.Then sometimes errors will dissapear.
4) when above is done, there will be separate client project created to test this.It will open up as below.
5)When we click on our service method, which is getRank, then we get below form to test the service.
result section will show string only if the web service is returning a string.else if it is only a sys out, it will show the output in console.
Test-WS-1Client= generated client project name
sampleTestServiceRankingProxy = here 'TestServiceRanking' is the class name including the service method which we have defined
7) Below is how to access the wsdl on diferent browser.
Test-WS-1 = server project name
services = this is a must to include
TestServiceRanking = class name including the service method which we have defined