Class JavaProvider

  • All Implemented Interfaces:
    java.io.Serializable, Handler
    Direct Known Subclasses:
    MsgProvider, RPCProvider

    public abstract class JavaProvider
    extends BasicProvider
    Base class for Java dispatching. Fetches various fields out of envelope, looks up service object (possibly using session state), and delegates envelope body processing to subclass via abstract processMessage method.
    Author:
    Doug Davis (dug@us.ibm.com), Carl Woolf (cwoolf@macromedia.com)
    See Also:
    Serialized Form
    • Field Detail

      • log

        protected static org.apache.commons.logging.Log log
      • entLog

        protected static org.apache.commons.logging.Log entLog
      • OPTION_CLASSNAME

        public static final java.lang.String OPTION_CLASSNAME
        See Also:
        Constant Field Values
      • OPTION_ALLOWEDMETHODS

        public static final java.lang.String OPTION_ALLOWEDMETHODS
        See Also:
        Constant Field Values
    • Constructor Detail

      • JavaProvider

        public JavaProvider()
    • Method Detail

      • getServiceObject

        public java.lang.Object getServiceObject​(MessageContext msgContext,
                                                 Handler service,
                                                 java.lang.String clsName,
                                                 IntHolder scopeHolder)
                                          throws java.lang.Exception
        Get the service object whose method actually provides the service. May look up in session table.
        Throws:
        java.lang.Exception
      • processMessage

        public abstract void processMessage​(MessageContext msgContext,
                                            SOAPEnvelope reqEnv,
                                            SOAPEnvelope resEnv,
                                            java.lang.Object obj)
                                     throws java.lang.Exception
        Process the current message. Side-effect resEnv to create return value.
        Parameters:
        msgContext - self-explanatory
        reqEnv - the request envelope
        resEnv - the response envelope
        obj - the service object itself
        Throws:
        java.lang.Exception
      • invoke

        public void invoke​(MessageContext msgContext)
                    throws AxisFault
        Invoke the message by obtaining various common fields, looking up the service object (via getServiceObject), and actually processing the message (via processMessage).
        Parameters:
        msgContext - the MessageContext to process with this Handler.
        Throws:
        AxisFault - if the handler encounters an error
      • makeNewServiceObject

        protected java.lang.Object makeNewServiceObject​(MessageContext msgContext,
                                                        java.lang.String clsName)
                                                 throws java.lang.Exception
        Default java service object comes from simply instantiating the class wrapped in jc
        Throws:
        java.lang.Exception
      • getServiceClassName

        protected java.lang.String getServiceClassName​(Handler service)
        Return the class name of the service
      • getServiceClassNameOptionName

        protected java.lang.String getServiceClassNameOptionName()
        Return the option in the configuration that contains the service class name
      • getServiceClass

        protected java.lang.Class getServiceClass​(java.lang.String clsName,
                                                  SOAPService service,
                                                  MessageContext msgContext)
                                           throws AxisFault
        Returns the Class info about the service class.
        Throws:
        AxisFault
      • initServiceDesc

        public void initServiceDesc​(SOAPService service,
                                    MessageContext msgContext)
                             throws AxisFault
        Fill in a service description with the correct impl class and typemapping set. This uses methods that can be overridden by other providers (like the EJBProvider) to get the class from the right place.
        Specified by:
        initServiceDesc in class BasicProvider
        Throws:
        AxisFault