user506518
user506518

Reputation: 271

How to call web service from java code?

I want to call a web service "gatewaedi" from java code.

I am not getting how to call it, could someone please provide an example?

Upvotes: 0

Views: 16901

Answers (1)

mariana soffer
mariana soffer

Reputation: 1853

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);
  1. Should be replaced by the gatewaedi webservice call, which I can not find now.

  2. 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.

Upvotes: 1

Related Questions