I've created a sample web service as
package com.faisal.webservices.register;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService()
public class RegisterService {
@WebMethod()
public String sayHello(String name) {
System.out.println("Hello: " + name);
return "Hello " + name + "!";
}
}
web.xml
<servlet>
<display-name>RegisterService</display-name>
<servlet-name>RegisterService</servlet-name>
<servlet-class>com.faisal.webservices.register.RegisterService</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RegisterService</servlet-name>
<url-pattern>/RegisterService</url-pattern>
</servlet-mapping>
when I'm trying to access the wsdl
url http://osdbconn-faisal.rhcloud.com/RegisterService?WSDL
(as mentioned here) it returned an exception
How could I obtain the endpoint?
After lot of searching on google this question pointed me towards
In order to be able to access the WSDL file I had to create a file jboss-web.xml
.So, I've created
jboss-web.xml
underWEB-INF
as (found here)