MyEclipse 2013 Development WebService

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.