[jboss-user] [JBoss Web Services] - JBoss AS 7 @WebContext EJB deployed in a WAR

Joshua Davis do-not-reply at jboss.com
Mon Oct 3 11:16:23 EDT 2011


Joshua Davis [http://community.jboss.org/people/pgmjsd] created the discussion

"JBoss AS 7 @WebContext EJB deployed in a WAR"

To view the discussion, visit: http://community.jboss.org/message/629882#629882

--------------------------------------------------------------
I've tried deploying a SOAP endpoint EJB in a WAR, as EJB3.1 allows.   When I added @WebContext (from the org.jboss.ws.api.annotation package), the rest of the web application stopped working.   I got The White Page Of Death for every single URL in the rest of the web UI.   I tried using WEB-INF/jboss-web.xml to specify the context as well, but that didn't work either.

The EJB is deployed in WEB-INF/classes, and it looks like this:

@Stateless(name = "ExampleBean")
@WebService(name = "ExampleWS", targetNamespace = "http://ws.fooco.com/2011/10")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebContext(contextRoot = "/api")
public class ExampleBean implements ExampleWS
{
...
}


WEB-INF/jboss-web.xml looks like this:

<?xml version="1.0"?>
<!DOCTYPE jboss-web PUBLIC
   -//JBoss//DTD Web Application 5.0//EN
   http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd>
<jboss-web>
    <context-root>/</context-root>
</jboss-web>



Is this not supported?  That would make sense to me, as it is possible to have conflicting web contexts in the same WAR.    However, I think it would be reasonable to issue a warning or an error message.   If the contexts are the same, then maybe this could be supported?

Not sure what I'm going to do to work around this issue.  I suppose I could deploy the app as an EAR, and put the web service endpoint in an ejb-jar.   That way the web UI would be in a separate web context.   That's probably a better design anyway.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/629882#629882]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111003/d9b4b178/attachment-0001.html 


More information about the jboss-user mailing list