How to change web service URL in JBoss 5.1
Environment: Windows 2003 JBoss 5.1
Code:
@WebService
@Stateless
@SOAPBinding(style = Style.RPC)
public class MyWebService {
public String sayHello() {
return "Hello";
}
}
wsdl is deployed in:
http://localhost:8080/ear-project-ejb-project/MyWebService?wsdl
I would like to define another path for开发者_运维知识库 this webservice, something like:
http://localhost:8080/MyApplication/MyWebService?wsdl
How to configure that in JBoss 5.1? Is there some kind of configuration that will work in any Java EE server?
Usually you set such Java EE configuration in the web.xml file of your web(service) project:
<display-name>MyApplication</display-name>
<servlet>
<servlet-name>MyWebService</servlet-name>
<servlet-class>com.my.company.my.package.MyWebServiceEndPoint</servlet-class>
</servlet>
精彩评论