JBoss AS 7 context-root manipulation for web services

I recently had a requirement for web service availability at root context level on JBoss AS 7. Without any configuration, a web service URL (as the rest of the web application) contains the jars’ name like http://localhost:8080/MyJar/MyService/MyEndpoint whereas my desired URL looked like http://localhost:8080/MyService/MyEndpoint without the jars’ name. Adding the jboss-webservices.xml file to the META-INF folder of the web service project with the following content was only have the story:

<?xml version="1.0" encoding="UTF-8"?>
<webservices version="1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.jboss.com/xml/ns/javaee"
  xsi:schemalocation="http://www.jboss.com/xml/ns/javaee
  http://www.jboss.org/schema/jbossas/jbossws-web-services_1_0.xsd">
  <context-root>/</context-root>
</webservices>

Now JBoss Management Console showed service availability at the desired URL, but the service was unreachable (404). The final part was to modify standalone.xml and set the value of the enable-welcome-root attribute to false (attribute belongs to the virtual-server element), which made the web service reachable on context root.

JBoss AS 7 context-root manipulation for web services auf Twitter teilen
JBoss AS 7 context-root manipulation for web services flattrn
JBoss AS 7 context-root manipulation for web services auf Digg teilen
JBoss AS 7 context-root manipulation for web services auf Delicious teilen
JBoss AS 7 context-root manipulation for web services auf Xing teilen
JBoss AS 7 context-root manipulation for web services auf LinkedIn teilen
JBoss AS 7 context-root manipulation for web services auf Pinterest teilen
JBoss AS 7 context-root manipulation for web services auf StumbleUpon teilen
JBoss AS 7 context-root manipulation for web services auf Tumblr. teilen
JBoss AS 7 context-root manipulation for web services auf Pocket weiterlesen
Dominik Schadow auf Feedly abonnieren