开发者

How to change web service URL in JBoss 5.1

开发者 https://www.devze.com 2022-12-28 11:41 出处:网络
Environment: Windows 2003 JBoss 5.1 Code: @WebService @Stateless @SOAPBinding(style = Style.RPC) public class MyWebService {

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消