1. In the Package Explorer window, right-click File to create a new WebService project, my name is: TestWebService
2.WebService Framework Select Jax-ws,target Runtime Select Tomcat, following the same as creating normal Web project, click Next to create the complete.
3. Create a new class class such as:
public class Hello {
public string SayHello (string name) {
Return "Hello" +name;
}
}
4. Select the project right-click-new-other, create a new webservice, as follows
5. Double-click to see the following interface: Strategy option select Create Web service from Java class option
6. Click Next,java Class: Select the Class (Hello) you just created, and check the Generate WSDL in Project option. Click Finish
7. Publish to Tomcat and start.
Enter: In the browser, the following interface appears to indicate success:
8. Then create a new generic Java project to test WebService
9. After the normal Java project is created, select the project right--new-other, create a new webserviceclient, pay attention to the wording.
10. Create a new class and write the Main method test WebService
Operation Result:
MyEclipse 2013 Development WebService