0 Replies Latest reply on Oct 22, 2008 2:58 AM by Dominic Lovell

    Mapping @WebContext in ejb jar to context path in war (singl

    Dominic Lovell Newbie

      I am using JBoss 4.2.3, with Java 1.5.

      I have a war that is bundled inside an EAR, this context path is: /testWeb

      This is defined in the jboss-web.xml under the WEB-INF directory of the war.


      However, I also have a web service I would like to be accessible via the same context path. I have the @WebContext annotation specifying the same context path as defined below.

       targetNamespace =
       serviceName =
       portName =
       ,wsdlLocation = "META-INF/wsdl/SupplierAccessService.wsdl"
       @WebContext(contextRoot = "/testWeb", urlPattern = "/SupplierAccessPort", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
      public class SupplierAccessDelegate implements SupplierAccessDelegateLocal,
       SupplierAccessDelegateRemote {

      However, if I access http://localhost:8080/testWeb/SupplierAccessPort I get a 404 error, presumably because the WAR has received precedence over the context in the EJB.

      I can see that the EJB creates its own deployment, and a new jboss-web.xml and web.xml file is created and exploded into the tmp directory as if it were a new web app.

      Even though both these exploded web apps have the same context path there are no errors during start up.

      I can only get my web service to work if I define a separate context in the annotation.

      Can someone please let me know if this is possible, or do I need to define two different context paths in order for my web service to be accessible?