Eclipse + Axis to write WebService

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

Enter image description

start server

Enter image description

3. Enter http://localhost:8080/axistest/services in the browser , you can see the published Web Service

Enter image description

Guess you like

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