Did you ever get this problem solved?
I seem to have the same problem:
I have a problem in that my EJB jar deploys a web service, which uses the @WebContext annotation, but the context root points to the same context root of one defined in my war, both of which are packaged inside an EAR. If I deploy the EAR everything defined in the web.xml inside the war is accessible, but accessing the web service using the same context gets a 404 error.
For example, my webservice:
@WebContext(contextRoot = "/testWeb", urlPattern = "/SupplierAccessPort", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
In my jboss-web.xml (inside the war):
<jboss-web> <security-domain>java:/jaas/aipDBCheck</security-domain> <context-root>/testWeb</context-root> </jboss-web>
http://localhost:8080/testWeb/index.htm is found (as it is inside my war)
http://localhost:8080/testWeb/SupplierAccessPort gets a 404.
Here is my guess:
Web apps and web services are handled by two entirely different components. Once the decision is made to pass the incoming message to the web app component (based on the context), that component will not afterwards pass the message on to the web services component.
I have never tried to place information about a web app and web service into the same web.xml file, and bundle them together into the same WAR file. It that works, perhaps that would suffice for what you want to do.
Was any one able to solve this issue?