How to call web service from java code?
I want to call a web service "gatewaedi" from java code.
I a开发者_Python百科m not getting how to call it, could someone please provide an example?
This is how you call a webservice with JAX-RPC
String wsdlURL = "http://localhost:6080/HelloWebService/services/Hello?wsdl"[1];
String namespace = "http://Hello.com"[2];
String serviceName = "GatewaediWebService";
QName serviceQN = new QName(namespace, serviceName);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service service = serviceFactory.createService(serviceQN);
Should be replaced by the gatewaedi webservice call, which I can not find now.
Should be replaced by the gatewaedi webservice corresponding namespace, that too I can't find.
If you want send me more information about this webservice and I will write you the complete code.
精彩评论