org.jboss.axis.providers.java
Class JavaProvider

java.lang.Object
  extended byorg.jboss.axis.handlers.BasicHandler (src) 
      extended byorg.jboss.axis.providers.BasicProvider (src) 
          extended byorg.jboss.axis.providers.java.JavaProvider
All Implemented Interfaces:
Handler (src)
Direct Known Subclasses:
MsgProvider (src) , RPCProvider (src)

public abstract class JavaProvider
extends BasicProvider (src)

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.


Field Summary
static java.lang.String OPTION_ALLOWEDMETHODS
           
static java.lang.String OPTION_CLASSNAME
           
static java.lang.String OPTION_CLASSPATH
           
static java.lang.String OPTION_IS_STATIC
           
static java.lang.String OPTION_SCOPE
           
static java.lang.String OPTION_WSDL_INPUTSCHEMA
           
static java.lang.String OPTION_WSDL_PORTTYPE
           
static java.lang.String OPTION_WSDL_SERVICEELEMENT
           
static java.lang.String OPTION_WSDL_SERVICEPORT
           
static java.lang.String OPTION_WSDL_TARGETNAMESPACE
           
 
Fields inherited from class org.jboss.axis.handlers.BasicHandler (src)
makeLockable, name, options
 
Constructor Summary
JavaProvider()
           
 
Method Summary
 void generateWSDL(MessageContext (src)  msgContext)
          Generate the WSDL for this service.
protected  java.lang.Class getServiceClass(java.lang.String clsName, SOAPService (src)  service, MessageContext (src)  msgContext)
          Returns the Class info about the service class.
protected  java.lang.String getServiceClassName(Handler (src)  service)
          Return the class name of the service
protected  java.lang.String getServiceClassNameOptionName()
          Return the option in the configuration that contains the service class name
 java.lang.Object getServiceObject(MessageContext (src)  msgContext, Handler (src)  service, java.lang.String clsName, IntHolder (src)  scopeHolder)
          Get the service object whose method actually provides the service.
 void initServiceDesc(SOAPService (src)  service, MessageContext (src)  msgContext)
          Fill in a service description with the correct impl class and typemapping set.
 void invoke(MessageContext (src)  msgContext)
          Invoke the message by obtaining various common fields, looking up the service object (via getServiceObject), and actually processing the message (via processMessage).
protected  java.lang.Object makeNewServiceObject(MessageContext (src)  msgContext, java.lang.String clsName)
          Default java service object comes from simply instantiating the class wrapped in jc
protected  void processException(java.lang.Exception ex)
          Externalize exception handling
abstract  void processMessage(MessageContext (src)  msgContext, SOAPEnvelopeAxisImpl (src)  reqEnv, SOAPEnvelopeAxisImpl (src)  resEnv, java.lang.Object obj)
          Process the current message.
 
Methods inherited from class org.jboss.axis.providers.BasicProvider (src)
addOperation, getOperationName, getOperationNames, getOperationQNames
 
Methods inherited from class org.jboss.axis.handlers.BasicHandler (src)
canHandleBlock, cleanup, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
 
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
See Also:
Constant Field Values (src)

OPTION_ALLOWEDMETHODS

public static final java.lang.String OPTION_ALLOWEDMETHODS
See Also:
Constant Field Values (src)

OPTION_IS_STATIC

public static final java.lang.String OPTION_IS_STATIC
See Also:
Constant Field Values (src)

OPTION_CLASSPATH

public static final java.lang.String OPTION_CLASSPATH
See Also:
Constant Field Values (src)

OPTION_WSDL_PORTTYPE

public static final java.lang.String OPTION_WSDL_PORTTYPE
See Also:
Constant Field Values (src)

OPTION_WSDL_SERVICEELEMENT

public static final java.lang.String OPTION_WSDL_SERVICEELEMENT
See Also:
Constant Field Values (src)

OPTION_WSDL_SERVICEPORT

public static final java.lang.String OPTION_WSDL_SERVICEPORT
See Also:
Constant Field Values (src)

OPTION_WSDL_TARGETNAMESPACE

public static final java.lang.String OPTION_WSDL_TARGETNAMESPACE
See Also:
Constant Field Values (src)

OPTION_WSDL_INPUTSCHEMA

public static final java.lang.String OPTION_WSDL_INPUTSCHEMA
See Also:
Constant Field Values (src)

OPTION_SCOPE

public static final java.lang.String OPTION_SCOPE
See Also:
Constant Field Values (src)
Constructor Detail

JavaProvider

public JavaProvider()
Method Detail

getServiceObject

public java.lang.Object getServiceObject(MessageContext (src)  msgContext,
                                         Handler (src)  service,
                                         java.lang.String clsName,
                                         IntHolder (src)  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 (src)  msgContext,
                                    SOAPEnvelopeAxisImpl (src)  reqEnv,
                                    SOAPEnvelopeAxisImpl (src)  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 (src)  msgContext)
            throws AxisFault (src) 
Invoke the message by obtaining various common fields, looking up the service object (via getServiceObject), and actually processing the message (via processMessage).

Specified by:
invoke in interface Handler (src)
Specified by:
invoke in class BasicHandler (src)
Throws:
AxisFault (src)

processException

protected void processException(java.lang.Exception ex)
                         throws AxisFault (src) 
Externalize exception handling

Parameters:
ex - Exception during message processing
Throws:
AxisFault (src) - The generated Axis fault

generateWSDL

public void generateWSDL(MessageContext (src)  msgContext)
                  throws AxisFault (src) 
Generate the WSDL for this service.

Put in the "WSDL" property of the message context as a org.w3c.dom.Document

Specified by:
generateWSDL in interface Handler (src)
Overrides:
generateWSDL in class BasicProvider (src)
Throws:
AxisFault (src)

makeNewServiceObject

protected java.lang.Object makeNewServiceObject(MessageContext (src)  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 (src)  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 (src)  service,
                                          MessageContext (src)  msgContext)
                                   throws AxisFault (src) 
Returns the Class info about the service class.

Throws:
AxisFault (src)

initServiceDesc

public void initServiceDesc(SOAPService (src)  service,
                            MessageContext (src)  msgContext)
                     throws AxisFault (src) 
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 (src)
Throws:
AxisFault (src)