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