From https://www6.software.ibm.com/developerworks/cn/education/webservices/ws-eclipse-javase1/section2.html
1. New Java Project
Make sure JRE is Java SE 6
2. Create pojo
Package COM. myfirst. wsserver; import javax. JWS. webService; @ webservicepublic class sayhello {Private Static final string salutation = "hello"; Public String getgreeting (string name) {return salutation + "" + name ;}}
3. Use wsgen to generate intermediate files
Wsgen-CP./bin-keep-S./src-D./bin com. myfirst. wsserver. sayhello
4. Web Service publish
Package COM. myfirst. wsserver; import javax. XML. WS. endpoint; public class runservice {/*** @ Param ARGs */public static void main (string [] ARGs) {system. out. println ("sayhello Web Service started. "); endpoint. publish ("http: // localhost: 8080/wsserverexample", new sayhello ());}}
5. Run as Java applicaiton startup Service
6. http: // localhost: 8080/wsserverexample? View the content of a wsdl file in WSDL
7. Eclipse provides run> launch the Web Services explorer to test the web service. You can use the WSDL file.