Creation and implementation of Web Service under MyEclipse 10

Source: Internet
Author: User

(i) WEB Service server development

1. Create a new Web service project, menu new, Web Service project,

2. Create a new Java Bean, which is a normal class, new-Class,
 Public string Sayhaha (String Suibian) {        return "My little Friends," + Suibian + ", isn't it amazing?" ";}

Adding a method to a class

3. Right click on the Web service project you built earlier, create a new Web service, menu new

Web Service, Web Services, MyEclipse,

(ii) Deployment of Web service services

1. Windows---Show View--Servers, deploying Tomcat

The following two packages must be imported

(iii) WEB service client Development

1. Create a new Web project,

2. Right-click the Web project you built earlier, create a new Web service client, new

Web Service Client, Web Services, MyEclipse, other,

Next go to the next step,

Next go to the next step,

Next enter the next step, and the class that appears after completion

3. Create a new test class to invoke the Hello

 Public Static void Main (string[] args) {        = "It's time to witness the miracle!" ;         New HelloService ();         = Hello.gethelloport ();         = Delegate.sayhaha (Suibian);        System.out.println (fan);}

The output shows the following diagram

Creation and implementation of Web Service under MyEclipse 10

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.