[jboss-user] [JBossWS] - Mapping @WebContext in ejb jar to context path in war (singl
kr8m3r_78
do-not-reply at jboss.com
Wed Oct 22 02:58:23 EDT 2008
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.
<jboss-web>
| <security-domain>java:/jaas/aipDBCheck</security-domain>
| <context-root>/testWeb</context-root>
| </jboss-web>
|
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.
| @javax.jws.WebService(
| targetNamespace =
| "http://xxx.xxx.xxx.com/"
| ,
| serviceName =
| "SupplierAccessService"
| ,
| portName =
| "SupplierAccessPort"
| ,wsdlLocation = "META-INF/wsdl/SupplierAccessService.wsdl"
| )
| @Stateless
| @WebContext(contextRoot = "/testWeb", urlPattern = "/SupplierAccessPort", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
| @RolesAllowed("supplier")
| @SecurityDomain("aipDBCheck")
|
| 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?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183716#4183716
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183716
More information about the jboss-user
mailing list