JBoss Web Services
  1. JBoss Web Services
  2. JBWS-220

ServiceLifecycle init not called for webservice

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Rejected
    • Affects Version/s: jboss-ws4ee-4.0.2
    • Fix Version/s: jboss-ws4ee-4.0.3
    • Component/s: jbossws-native
    • Labels:
      None
    • Environment:
      Windows XP, JBoss-4.0.2, jdk1.5.0_02
    • Similar Issues:
      Show 9 results 

      Description

      The interface method init of ServiceLifeCycle is not called for a webservice on JBoss-4.0.2. Works fine on JBoss-4.0.1.

      Deployed on JBoss-4.0.1
      16:43:23,656 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorld, warUrl=file:/C:
      /jboss-4.0.1/server/default/tmp/deploy/tmp15816HelloWorld-exp.war/
      16:43:23,750 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.0.1/s
      erver/default/data/wsdl/HelloWorld.war/HelloWorld.wsdl
      16:43:23,812 INFO [AxisService] WSDD published to: C:\jboss-4.0.1\server\defaul
      t\data\wsdl\HelloWorld.war\PortComponent.wsdd
      16:43:23,812 INFO [AxisService] Web Service deployed: http://yoda:8080/HelloWor
      ld/HelloWorld
      16:43:24,109 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorldServlet, warUrl=f
      ile:/C:/jboss-4.0.1/server/default/tmp/deploy/tmp15817HelloWorldServlet-exp.war/

      16:43:38,015 INFO [STDOUT] In HelloWorld_Impl.init...
      16:43:38,015 INFO [STDOUT] context = org.apache.axis.transport.http.ServletEndp
      ointContextImpl@11f56a3
      16:43:38,031 INFO [STDOUT] In HelloWorld_Impl.destroy...

      Deployed on JBoss-4.0.2
      16:46:16,968 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorld, warUrl=file:/C:
      /jboss-4.0.2/server/default/tmp/deploy/tmp39991HelloWorld-exp.war/
      16:46:17,515 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.0.2/s
      erver/default/data/wsdl/HelloWorld.war/HelloWorld.wsdl
      16:46:17,625 INFO [AxisService] WSDD published to: C:\jboss-4.0.2\server\defaul
      t\data\wsdl\HelloWorld.war\PortComponent.wsdd
      16:46:17,984 INFO [AxisService] Web Service deployed: http://yoda:8080/HelloWor
      ld/HelloWorld
      16:46:18,250 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorldServlet, warUrl=f
      ile:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp39993HelloWorldServlet-exp.war/

      16:46:27,593 INFO [STDOUT] context = null

      HelloWorld_Impl.java
      package com.acme.webservices;

      import javax.xml.rpc.server.ServiceLifecycle;
      import javax.xml.rpc.server.ServletEndpointContext;
      import javax.xml.rpc.ServiceException;

      public class HelloWorld_Impl implements com.acme.webservices.HelloWorld, java.rmi.Remote, ServiceLifecycle
      {

      private ServletEndpointContext context;

      public java.lang.String echo() throws
      java.rmi.RemoteException

      { System.out.println("context = " + context); return "Hello World"; }

      public void init(Object context) throws ServiceException

      { this.context = (ServletEndpointContext) context; System.out.println("In HelloWorld_Impl.init..."); }

      public void destroy()

      { System.out.println("In HelloWorld_Impl.destroy..."); this.context = null; }

      }

        Activity

        Hide
        sirwio
        added a comment -

        The HelloWorld webservice

        Show
        sirwio
        added a comment - The HelloWorld webservice
        Hide
        sirwio
        added a comment -

        Servlet calling method of HelloWorld webservice.
        Service is called by browsing to:
        http://localhost:8080/HelloWorldServlet/HelloWorldServlet

        Show
        sirwio
        added a comment - Servlet calling method of HelloWorld webservice. Service is called by browsing to: http://localhost:8080/HelloWorldServlet/HelloWorldServlet
        Hide
        Thomas Diesler
        added a comment -

        Thanks for the good peport, I'll look at it

        Show
        Thomas Diesler
        added a comment - Thanks for the good peport, I'll look at it
        Hide
        Jason Greene
        added a comment -

        The problem is that you are including jboss-jaxrpc.jar in your war file. The reason that this did not fail on 4.0.1 is because the JBossWebClassloader parameter changed (for various support reasons). So 4.0.2 gives a new classloader for every war, which means you were overriding the webservices implementation with your own jar. Remove jboss-jaxrpc.jar and everything will work great. Also, the servlet war contains about 5 systems jars as well, in general don't package system jars in your deployments.

        Show
        Jason Greene
        added a comment - The problem is that you are including jboss-jaxrpc.jar in your war file. The reason that this did not fail on 4.0.1 is because the JBossWebClassloader parameter changed (for various support reasons). So 4.0.2 gives a new classloader for every war, which means you were overriding the webservices implementation with your own jar. Remove jboss-jaxrpc.jar and everything will work great. Also, the servlet war contains about 5 systems jars as well, in general don't package system jars in your deployments.
        Hide
        Alessio Soldano
        added a comment -

        Closing resolved issues for already released versions

        Show
        Alessio Soldano
        added a comment - Closing resolved issues for already released versions

          People

          • Assignee:
            Jason Greene
            Reporter:
            sirwio
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: