2 Replies Latest reply on Jul 29, 2008 8:51 AM by ropalka

    Web Service not being deployed as Service on server restart

    jeffrho

      I'm using JBoss 4.2.2.GA with JBossWS Metro 3.0.2, and I'm having a strange problem.

      When I first deploy a Web Service, JBoss deploys the Web Service WAR as a service. I can see in the container window that it's deploying it as a service endpoint, and I can see the service endpoint at http://localhost:8080/jbossws.

      However, when I stop JBoss and then restart it, JBoss is deploying the Web Service WAR as a regular Web application. It does not show up in the list of endpoints at http://localhost:8080/jbossws, however it shows up in the JBoss web-console as a Web Application.

      As a temporary workaround, I have to delete the existing WAR directory (I'm deploying an exploded WAR) out of the deploy subdirectory, and copy the original WAR directory back into the deploy directory before restarting the server.

      I reinstalled JBoss 4.2.2.GA and installed JBossWS Metro 3.0.1 and this problem does not occur.

        • 1. Re: Web Service not being deployed as Service on server rest
          jeffrho

          From comparing behavior between JBossWS Metro 3.0.1 and 3.0.2, I think I've identified the problem.

          When JBossWS Metro deploys a Web Service, it saves a copy of the original web.xml file in a file named "web.xml.org", then modifies the web.xml and adds some JBossWS-specific entries. It also creates a sun-jaxws.xml file in the server's "tmp/jbossws" directory.

          In JBossWS Metro 3.0.1, when the container is undeploying a Web service, it deletes the modified web.xml file and then restores the original web.xml file by renaming the "web.xml.org" file to "web.xml". It also deletes the sun-jaxws.xml file in the tmp directory.

          However, in JBossWS Metro 3.0.2, the modified web.xml is not deleted, and the "web.xml.org" file is not renamed back to "web.xml". (It does delete the sun-jaxws.xml file from the tmp directory). This causes the Web service to be deployed as a regular servlet on subsequent server starts.
          In order to get the service to deploy again as a Web service endpoint, one must manually go into the war directory and delete the "web.xml" file, then rename the "web.xml.org" file back to "web.xml" before starting the server.

          • 2. Re: Web Service not being deployed as Service on server rest
            ropalka

            The associated issue is JBWS-2243. The fix will be available with next JBossWS 3.0.3 release, but it will be applicable to JBoss AS 4.2.3 or above.