eclipse creates a webservice instance


1.Eclipse creates a webservice service
1.1 Create a web project






1.2 Create a new package com.bill.ws, and create a new simple class HelloWorld
package com.bill.ws;

public class HelloWorld {  
    public String sayHello(String name) {  
        return "Hello " + name;  
    }  
}


The structure diagram is as follows:



1.3 Deploy the application to tomcat and start



1.4 Create a webservice for HelloWorld.java











1.5 Test whether the webservice is created successfully


Click the sayHello link



Enter the name and click go to test



Return success


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326104932&siteId=291194637