0 Replies Latest reply on Sep 10, 2014 11:55 AM by Matt Drees

    webservices in ROOT.war deployments don't work as expected

    Matt Drees Master

      I'm working on porting an app to Jboss EAP, and as part of that I'm switching from the jax-ws RI to JBoss's built-in CXF ws stack.


      However, my app didn't specify a context-root in jboss-web.xml; it just was named ROOT.war. JBoss EAP handles this just fine, except that webservices fail when invoked. (The message is "JBWS024032: Cannot obtain endpoint jboss.ws:context=,endpoint=MyService". It looks like JBossWS is acting as if the context root is not '/' but literally '/ROOT'. See this boot-up log line:


      21:50:22,901 INFO  [org.jboss.ws.cxf.metadata] (MSC service thread 1-4) JBWS024061: Adding service endpoint metadata: id=MyService

      (Note especially the "...localhost:8080/ROOT/api/v1..." part)


      I can solve this by adding <context-root>/</context-root> to my jboss-web.xml, but I feel like this shouldn't be necessary. It was a little inconvenient for me, because I usually use a non-root context when I'm developing locally, and I don't really want to have to put in a maven parameter in jboss-web.xml. So going forward I'll probably just use the root context while developing, but it irks me a little bit.


      This seems like the sort of thing that could be fixed by adding two lines of code in the JbossWS project, so I just thought I'd voice my frustration.