org.apache.axis.providers.java
Class JavaProvider

java.lang.Object
  |
  +--org.apache.axis.handlers.BasicHandler
        |
        +--org.apache.axis.providers.BasicProvider
              |
              +--org.apache.axis.providers.java.JavaProvider
All Implemented Interfaces:
Handler, java.io.Serializable
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 Summary
static java.lang.String OPTION_CLASSNAME
           
static java.lang.String OPTION_CLASSPATH
           
static java.lang.String OPTION_IS_STATIC
           
 
Fields inherited from class org.apache.axis.handlers.BasicHandler
name, options
 
Constructor Summary
JavaProvider()
           
 
Method Summary
 void generateWSDL(MessageContext msgContext)
          Obtain WSDL information.
protected  java.lang.Object getNewServiceObject(MessageContext msgContext, java.lang.String clsName)
          Default java service object comes from simply instantiating the class wrapped in jc
protected  java.lang.String getServiceAllowedMethods(Handler service)
           
protected  java.lang.String getServiceAllowedMethodsOptionName()
           
protected  java.lang.String getServiceClassName(Handler service)
           
protected  java.lang.String getServiceClassNameOptionName()
           
 java.lang.Object getServiceObject(MessageContext msgContext, Handler service, java.lang.String clsName)
          Get the service object whose method actually provides the service.
 void invoke(MessageContext msgContext)
          Invoke the message by obtaining various common fields, looking up the service object (via getServiceObject), and actually processing the message (via processMessage).
abstract  void processMessage(MessageContext msgContext, java.lang.String serviceName, java.lang.String allowedMethods, SOAPEnvelope reqEnv, SOAPEnvelope resEnv, JavaClass jc, java.lang.Object obj)
          Process the current message.
 void undo(MessageContext msgContext)
          Must implement this in subclasses.
 
Methods inherited from class org.apache.axis.providers.BasicProvider
addOperation, getOperationName, getOperationNames, getOperationQNames
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
addOption, canHandleBlock, cleanup, getDeploymentData, getName, getOption, getOptions, init, setName, setOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_CLASSNAME

public static final java.lang.String OPTION_CLASSNAME

OPTION_IS_STATIC

public static final java.lang.String OPTION_IS_STATIC

OPTION_CLASSPATH

public static final java.lang.String OPTION_CLASSPATH
Constructor Detail

JavaProvider

public JavaProvider()
Method Detail

getServiceObject

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

processMessage

public abstract void processMessage(MessageContext msgContext,
                                    java.lang.String serviceName,
                                    java.lang.String allowedMethods,
                                    SOAPEnvelope reqEnv,
                                    SOAPEnvelope resEnv,
                                    JavaClass jc,
                                    java.lang.Object obj)
                             throws java.lang.Exception
Process the current message. Side-effect resEnv to create return value.
Parameters:
msgContext - self-explanatory
clsName - the class name of the ServiceHandler
allowedMethods - the 'method name' of ditto
reqEnv - the request envelope
resEnv - the response envelope
jc - the JavaClass of the service object
obj - the service object itself

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).
Overrides:
invoke in class BasicHandler

generateWSDL

public void generateWSDL(MessageContext msgContext)
                  throws AxisFault
Description copied from interface: Handler
Obtain WSDL information. Some Handlers will implement this by merely setting properties in the MessageContext, others (providers) will take responsibility for doing the "real work" of generating WSDL for a given service.
Overrides:
generateWSDL in class BasicHandler

undo

public void undo(MessageContext msgContext)
Description copied from class: BasicHandler
Must implement this in subclasses.
Overrides:
undo in class BasicHandler

getNewServiceObject

protected java.lang.Object getNewServiceObject(MessageContext msgContext,
                                               java.lang.String clsName)
                                        throws java.lang.Exception
Default java service object comes from simply instantiating the class wrapped in jc

getServiceClassName

protected java.lang.String getServiceClassName(Handler service)

getServiceAllowedMethods

protected java.lang.String getServiceAllowedMethods(Handler service)

getServiceClassNameOptionName

protected java.lang.String getServiceClassNameOptionName()

getServiceAllowedMethodsOptionName

protected java.lang.String getServiceAllowedMethodsOptionName()


Copyright © 2001 Apache XML Project. All Rights Reserved.