Reputation: 8042
This is a pretty basic question but I don't really see an answer anywhere. I created a webservice using wsimport and a wsdl.
It created a large number of files. Most of them appear to be beans representing the methods of the webservice. There are also classes called Gateway, Gateway SOAP, and ObjectFactory. How exactly do you go about actually calling the web-service with these methods?
Upvotes: 0
Views: 1066
Reputation: 4653
You should do something like this:
Gateway svc = new Gateway();
GatewaySOAP port = svc.getGatewaySOAP();
MyRequestClass rq = new MyRequestClass();
rq.setSomething(2);
MyResponseClass rs = port.doMyVeryOwnJob(rq);
System.out.println("Result is: " + rs.getSomethingElse());
Upvotes: 1