服务已经生成了
@WebService
public class HelloWorld {
@WebMethod
public String sayHello(String str){
System.out.println("get Message...");
String result = "Hello World, "+str;
return result;
}
public static void main(String[] args) {
System.out.println("server is running");
String address="http://localhost:8888/HelloWorld";
Object implementor =new HelloWorld();
Endpoint.publish(address, implementor);
}
}
怎么样才能在postman调我的sayHello方法
你得把请求信息封装成
soap
协议规定的xml
格式才能通过postman
调用,与其这样,还不如直接用soap
测试工具。