5 Replies Latest reply on Sep 21, 2007 11:19 AM by patrickmadden

    web.xml modified to web.xml.org - Subsequent runs fail

    patrickmadden

      Hi,

      On July 7, we download the SVN version of JBossWS 2.0.0.0.GA and also JBoss-4.2.1.GA version of application server. I also believe this problem occurred with JBossWS 1.2.1GA and JBoss-4.2.0.GA of the application server.

      We could deploy our exploded EAR file the first time and our web services would run just fine. However, the second time we ran the application server we would get errors saying failed to find endpoint for service etc. Finally we figured out that our web.xml in the WEB-INF directory was being overwritten and a copy was placed to web.xml.org.

      The original web.xml contains something like this:

       <servlet>
       <servlet-name>DBService</servlet-name>
       <servlet-class>com.clooster.web.services.db.EJB3RemoteDBServiceBean</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>DBService</servlet-name>
       <url-pattern>/common/services/DBService</url-pattern>
       </servlet-mapping>
      


      At runtime this is modified to be:

       <servlet>
       <servlet-name>DBService</servlet-name>
       <servlet-class>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</servlet-class>
       <init-param>
       <param-name>jboss.ws.endpoint</param-name>
       <param-value>com.clooster.web.services.db.EJB3RemoteDBServiceBean</param-value>
       </init-param>
       </servlet>
       <servlet-mapping>
       <servlet-name>DBService</servlet-name>
       <url-pattern>/common/services/DBService</url-pattern>
       </servlet-mapping>
      


      I'm thinking the correct behaviour would be that this web.xml.org gets copied back to web.xml on shutdown of application server. Is this correct because if so its not happening - we have verified this on like 5 windows machines.

      We have now modified our run.bat to check for existence of web.xml.org and if it exists copy it to web.xml. Once we do this our web services seem to always deploy correctly.

      Can someone please advise?

      Thanks in advance,

      PVM

        • 1. Re: web.xml modified to web.xml.org - Subsequent runs fail
          01012003

          having the same problem.

          • 2. Re: web.xml modified to web.xml.org - Subsequent runs fail
            heiko.braun

             

            we ran the application server


            Do you mean 'reboot' the AS without touching the deplyment?



            • 3. Re: web.xml modified to web.xml.org - Subsequent runs fail
              vitarius

              I have the same problem with an exploded WAR, when restarting the application server, my web services get lost. The JBossWS implementation simply overlooks the servlet definitions that have already been modified.

              Rewriting the web.xml is okay, but it should be changed back to the original on shutdown. It could be an even better solution to perform this change in memory only.

              • 4. Re: web.xml modified to web.xml.org - Subsequent runs fail
                heiko.braun

                I did create an issue for this:
                http://jira.jboss.com/jira/browse/JBWS-1762

                • 5. Re: web.xml modified to web.xml.org - Subsequent runs fail
                  patrickmadden

                  Hi, I noticed that this was fixed in JBossWS 2.0.1.GA but then recently re-opened. I'm using JBossAS 4.2.1.GA and JBossWS 2.0.1.GA plus JBoss Seam 2.0.CR1 and RichRaces 3.1.1.SNAPSHOT, with exploded/unpacked EAR.

                  I'm still seeing some strange behavior here. Of course its possible I'm doing something wrong.

                  First time I run, everything is OK (I think). I have two web services defined and when I look at http://localhost:8080/jbossws/services I see 4 Registered Service Endpoints. For simplicity, I'll only describe one of the service definitiions.

                  @WebService(name = "FlashServiceEndpointInterface", targetNamespace = "http://clooster.com/web/services/flash", serviceName = "FlashService")
                  @SOAPBinding(style = SOAPBinding.Style.RPC)
                  @Remote(EJB3RemoteFlashService.class)
                  @RemoteBinding(jndiBinding = "/ejb3/EJB3FlashService")
                  @Stateless
                  @WebContext(transportGuarantee = "NONE", contextRoot = "/Clooster", urlPattern = "/common/services/FlashService")
                  public class EJB3RemoteFlashServiceBean implements
                   EJB3RemoteFlashService
                  {
                  ...
                  }
                  


                  First time I run I see endpoints as follows:

                  http://MillGatewayFX:8080/Clooster/common/services/FlashService?wsdl
                  
                  AND
                  
                  http://MillGatewayFX:8080/CloosterRichWeb2-CloosterRichWeb2/EJB3RemoteFlashServiceBean?wsdl
                  
                  


                  This works and in my client code I access using the first one defined as it is in my EJB mentioned above.

                  However the second time I run I only see:

                  http://MillGatewayFX:8080/CloosterRichWeb2-CloosterRichWeb2/EJB3RemoteFlashServiceBean?wsdl
                  


                  and my client side code fails. So I'm back to square one and am forced to modify the run.bat to replace web.xml with web.xml.org for it to work correctly. Its not a major deal but for me I still consider it a bug.

                  Just giving you a heads up and thanks for all your hard work!

                  PVM