How can webservice be called through postman after it is released?

the service has been generated

clipboard.png

@ 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);

    }

}

how can I call my sayHello method in postman

May.19,2022

you have to encapsulate the request information into the xml format specified by the soap protocol before you can call through postman . Instead of doing this, you might as well directly use the soap test tool.

Menu