Why is @WebContext annotation ignored in JBoss EAP 6?

Solution Verified - Updated -

Issue

  • The following web service is exposed from an EJB3 :
@Stateless
@WebService
@WebContext(contextRoot = "Greetings", authMethod = "BASIC")
public class HelloBean implements HelloLocal {

    public String sayHello() {
        return "Hello ";
    }
}
  • Following can be seen in the logs :
1:08:06,664 INFO  [org.jboss.ws.cxf.metadata] (MSC service thread 1-16) JBWS024061: Adding service endpoint metadata: id=HelloBean
address=http://DEVXXXXX:5002/HelloWS/HelloBean
implementor=com.xxxxx.test.HelloBean
serviceName={http://test.xxxxx.com/}HelloBeanService
portName={http://test.xxxxx.com/}HelloBeanPort
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false

where the contextRoot value "Greetings" is ignored. Also the deployed web service can be accessed without any authentication.Why is the @WebContext is ignored?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.