Reputation: 81
I need to run a webservice on a WebSphere Application Server (Liberty Profile) so I can get the wsdl and use it to make tests on SoapUI. I'm using WebSphere Developer Tools on Eclipse Luna.
I have the code for this webservice, as follows:
Communicate.java
package xpto;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface Communicate {
@WebMethod String initiate(String var);
}
CommunicateImpl.java
package xpto;
import javax.jws.WebService;
@WebService(endpointInterface = "xpto.Communicate")
public class CommunicateImpl implements Communicate {
@Override
public String initiate(String var){
System.out.println("Communicating");
return "S";
}
}
Now, what should I do to run the webservice and get the wsdl file?
Upvotes: 0
Views: 1546
Reputation: 27
CREATE a WAR file.DEPLOY it on WEBSPHERE.give context path name then access the webservice in url using Http:// ipadress:port/contextpath/webservice name?wsdl
Upvotes: 0
Reputation: 18020
You can check your web service name in the Eclipse. Expand your web project then JAX-WS Web Services > Web Services
. Your service is probably called CommunicateImplService
, so wsdl should be accessible by: http://host:port/context/serviceName?wsdl
in your case probably CommunicateImplService?wsdl
. Also make sure that your project is added to the server.
Upvotes: 2