Hi
I have a very simple web service
public interface MyWebService { public String sayHello(String to); public Long add(MyClass e1); } @Stateless @WebService(name="MyService", serviceName="MyService") @Remote(MyWebService.class) @RemoteBinding @SOAPBinding(style=SOAPBinding.Style.RPC) public class MyWebServiceBean implements MyWebService { @WebMethod public String sayHello(String to) { return "Hello "+to; } @WebMethod public Long add(MyClass e1) { return e1.getL1()+e1.getL2(); } }
public class MyClass implements Serializable { private Long l1; private Long l2; public Long getL1() { return l1; } public void setL1(Long l1) { this.l1 = l1; } public Long getL2() { return l2; } public void setL2(Long l2) { this.l2 = l2; } }
wsconsume.sh -k http://fabocoxp:8080/MyWebServiceBeanService/MyWebServiceBean?wsdl -s src -p test.webServices.aux
MyService_Service myss = new MyService_Service(); MyService myService = myss.getMyServicePort(); System.out.println(myService.sayHello("Bob"));
myService.add(...);