I have noticed some weird behaviors when dealing with the ServiceLifecycle. On a generated java framework using WSDL2java the class managed by the JavaProvider class is the SOAPBindingSkeleton. The "real" implementation is in the SOAPBiningImpl. This is the one implementing the ServiceLifecycle.
The skeleton is just adapting the SOAP calls to the java calls, bridging the 2 classes.

Now in the JavaProvider, the following method cannot work since it is testing that the skelton class implement the ServiceLifecycle:

    private Object getNewServiceObject(MessageContext msgContext,
                                       String clsName) throws Exception
    {
        System.out.println("++++++++++++++++++ IN AXIS CREATION OF THE SERVICE: " + clsName);
        Object serviceObject = makeNewServiceObject(msgContext, clsName);
        System.out.println("OBJECT REF: " + serviceObject);

        if (serviceObject != null &&
                serviceObject instanceof ServiceLifecycle) {
                    System.out.println("IMPLEMENTING SERVICELIFECYCLE !!!!!");
            ((ServiceLifecycle)serviceObject).init(null);
        }
        else
            System.out.println("NOT IMPLEMENTING SERVICELIFECYCLE !!!!!");
        return serviceObject;
    }

Olivier

Reply via email to