2 Replies Latest reply on Oct 15, 2003 3:34 AM by Pedro Salazar

    deploying web service in WAR --> restart server and service

    Pedro Salazar Newbie

      Greetings,

      I'm trying to deploy a axis web service in JBOSS but I really want to use a standalone web service in a WAR file instead using the jboss-net service (that uses axis itself). In conclusion, I want to use standard features J2EE instead specific features of application servers, to permit independence of web services and of application servers.

      So, I created my web service and I deployed it a WAR file with the following structure:

      1- WEB-INF/lib/ --> axis.jar, jaxrpc.jar, saaj.jar, wsdl4j.jar
      2- WEB-INF/classes --> service classes
      3- WEB-INF/server-config.wsdd --> extracted from axis.jar
      4- WEB-INF/web.xml --> (configuration in attach)

      When I invoke http://localhost:8080/myapp/services, I saw only the services AdminService and Version. So, I run the ant task "axis-admin" (similar to org.apache.axis.client.AdminClient class) to deploy the service from the deploy.wsdd. The service is now listed.

      Now, I tested to restart the server (jboss) but my service is gone and I have to deploy it again!! There is no persistence on services deployed???

      thanks,
      Pedro Salazar

        • 1. Re: deploying web service in WAR --> restart server and serv
          Stephane Nicoll Master

          No, it is persistent.

          The problem is that you web-app has been customized this is quite difficult to give you standard solution.

          Why don't you use the default axis distro which is app server independent?

          Put axis in debug mode in the log4j config and checks what's wrong. I am guessing a file permission issue (jboss cannot write to the config file containing services)

          Regards,

          Stephane

          • 2. Re: deploying web service in WAR --> restart server and serv
            Pedro Salazar Newbie

            Greetings,

            Stephane,

            I have another solution that appears to be working. In axis.jar there exist a file org/apache/axis/server/server-config.wsdd. By default, axis service will read this file to know what are the default services available.

            I changed this file, and I put my service generated on deploy.wsdd, and included it inside my WEB-INF directory on my WAR file.

            Another thing, I customized my web.xml to have the following content:


            <servlet-name>AxisServlet</servlet-name>
            <display-name>Apache-Axis Servlet</display-name>
            <servlet-class>
            org.apache.axis.transport.http.AxisServlet
            </servlet-class>



            <servlet-name>AdminServlet</servlet-name>
            <display-name>Admin Servlet</display-name>
            <servlet-class>
            org.apache.axis.transport.http.AdminServlet
            </servlet-class>
            <load-on-startup>100</load-on-startup>


            <servlet-mapping>
            <servlet-name>AxisServlet</servlet-name>
            <url-pattern>/axis/*.jws</url-pattern>
            </servlet-mapping>
            <servlet-mapping>
            <servlet-name>AxisServlet</servlet-name>
            <url-pattern>/servlet/AxisServlet</url-pattern>
            </servlet-mapping>

            <servlet-mapping>
            <servlet-name>AxisServlet</servlet-name>
            <url-pattern>/services/*</url-pattern>
            </servlet-mapping>

            <servlet-mapping>
            <servlet-name>AdminServlet</servlet-name>
            <url-pattern>/servlet/AdminServlet</url-pattern>
            </servlet-mapping>

            Now, I have sure that my axis web service will run in every servlet container, at least it's working!!

            regards,
            Pedro Salazar.