Environment: Eclipse 4.7 + Axis + Tomcat8.5
1. Create Dynamic Web Project and write HelloService.java
package com.demo.axistest.service;
public class HelloService {
public String sayHello(String name) {
return "Hello, " + name;
}
}
Second, right-click the project - New-Others, select Web Service
Fill in the path of HelloService in Service Implementation, as shown below
start server
3. Enter http://localhost:8080/axistest/services in the browser , you can see the published Web Service