How to change web service url in jboss 5.1

Environment: Windows 2003 JBoss 5.1

the code:

@WebService
@Stateless
@SOAPBinding(style = Style.RPC)
public class MyWebService {
public String sayHello() {
return "Hello";
}
}

wsdl is deployed to: http://localhost:8080/ear-project-ejb-project/MyWebService?wsdl

I would like to define a different path for this web service, for example:

http://localhost:8080/MyApplication/MyWebService?wsdl

How to configure this in JBoss 5.1? Is there some kind of configuration that will work on any Java EE server?

+3
source share
1 answer

Typically, you install this configuration of Java EE in the web.xml file of your web project (service):

<display-name>MyApplication</display-name>

<servlet>  
    <servlet-name>MyWebService</servlet-name>
    <servlet-class>com.my.company.my.package.MyWebServiceEndPoint</servlet-class>
</servlet>
+1
source

Source: https://habr.com/ru/post/1742475/


All Articles