MyEclipse 10 Simple method of adding webservice

Source: Internet
Author: User

Need to use to WebService, recall a half-day how directly with MyEclipse generation.

First of all, my project is already existing, can not create a new WebService project to migrate.

Then, write the class method object that you want to use for publishing (no difference from the normal class).

The key is here, let's create a new Web service

Select your item and choose a red box as shown here

Select the class you want to release into Webservcie

This is done.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/Java/

Find the "Xxxxport" in your web,xml, where the XXXX should be your class name, then start your service, enter the http://localhost:port/project name/xxxxport in the browser, What should appear is a WebService list page, as shown in the following figure:

The red box on the picture is the legendary WSDL, record the address, this time can be opened, myeclipse with the WebService test browser for testing, the following figure:

Figure 1: Click to use WEBSERVICEEXPLORER;2: fill in the WebService input parameter value, 3: The return result after you webservice processing.

By the way, another very important thing is to join the WebService-related jar pack, this is not a matter of my environment, MyEclipse did not automatically add to me, need to join the jar package as follows:

Websrevice-api.jar;webservice-extra.jar;webservices-extra-api.jar;webservices-rt.jar;webservices-tools.jar. A total of 5.

Author: csdn Blog Yueritian

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.