站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 jaxrpc API Documentation 英文版文档

JavaProvider (JAXRPC API) - JBoss 3.2.7 jaxrpc API Documentation 英文版文档


org.apache.axis.providers.java
Class JavaProvider

java.lang.Object
  extended byorg.apache.axis.handlers.BasicHandler
      extended byorg.apache.axis.providers.BasicProvider
          extended byorg.apache.axis.providers.java.JavaProvider
All Implemented Interfaces:
Handler, 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 String OPTION_ALLOWEDMETHODS
           
static String OPTION_CLASSNAME
           
static String OPTION_CLASSPATH
           
static String OPTION_IS_STATIC
           
static String OPTION_SCOPE
           
static String OPTION_WSDL_INPUTSCHEMA
           
static String OPTION_WSDL_PORTTYPE
           
static String OPTION_WSDL_SERVICEELEMENT
           
static String OPTION_WSDL_SERVICEPORT
           
static String OPTION_WSDL_TARGETNAMESPACE
           
 
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
 
Constructor Summary
JavaProvider()
           
 
Method Summary
 void generateWSDL(MessageContext msgContext)
          Generate the WSDL for this service.
protected  Class getServiceClass(String clsName, SOAPService service, MessageContext msgContext)
          Returns the Class info about the service class.
protected  String getServiceClassName(Handler service)
          Return the class name of the service
protected  String getServiceClassNameOptionName()
          Return the option in the configuration that contains the service class name
 Object getServiceObject(MessageContext msgContext, Handler service, String clsName, javax.xml.rpc.holders.IntHolder scopeHolder)
          Get the service object whose method actually provides the service.
 void initServiceDesc(SOAPService service, MessageContext msgContext)
          Fill in a service description with the correct impl class and typemapping set.
 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).
protected  Object makeNewServiceObject(MessageContext msgContext, String clsName)
          Default java service object comes from simply instantiating the class wrapped in jc
protected  void processException(Exception ex)
          Externalize exception handling
abstract  void processMessage(MessageContext msgContext, SOAPEnvelopeAxisImpl reqEnv, SOAPEnvelopeAxisImpl resEnv, Object obj)
          Process the current message.
 
Methods inherited from class org.apache.axis.providers.BasicProvider
addOperation, getOperationName, getOperationNames, getOperationQNames
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
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 String OPTION_CLASSNAME
See Also:
Constant Field Values

OPTION_ALLOWEDMETHODS

public static final String OPTION_ALLOWEDMETHODS
See Also:
Constant Field Values

OPTION_IS_STATIC

public static final String OPTION_IS_STATIC
See Also:
Constant Field Values

OPTION_CLASSPATH

public static final String OPTION_CLASSPATH
See Also:
Constant Field Values

OPTION_WSDL_PORTTYPE

public static final String OPTION_WSDL_PORTTYPE
See Also:
Constant Field Values

OPTION_WSDL_SERVICEELEMENT

public static final String OPTION_WSDL_SERVICEELEMENT
See Also:
Constant Field Values

OPTION_WSDL_SERVICEPORT

public static final String OPTION_WSDL_SERVICEPORT
See Also:
Constant Field Values

OPTION_WSDL_TARGETNAMESPACE

public static final String OPTION_WSDL_TARGETNAMESPACE
See Also:
Constant Field Values

OPTION_WSDL_INPUTSCHEMA

public static final String OPTION_WSDL_INPUTSCHEMA
See Also:
Constant Field Values

OPTION_SCOPE

public static final String OPTION_SCOPE
See Also:
Constant Field Values
Constructor Detail

JavaProvider

public JavaProvider()
Method Detail

getServiceObject

public Object getServiceObject(MessageContext msgContext,
                               Handler service,
                               String clsName,
                               javax.xml.rpc.holders.IntHolder scopeHolder)
                        throws Exception
Get the service object whose method actually provides the service. May look up in session table.

Throws:
Exception

processMessage

public abstract void processMessage(MessageContext msgContext,
                                    SOAPEnvelopeAxisImpl reqEnv,
                                    SOAPEnvelopeAxisImpl resEnv,
                                    Object obj)
                             throws 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:
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).

Specified by:
invoke in interface Handler
Specified by:
invoke in class BasicHandler
Throws:
AxisFault

processException

protected void processException(Exception ex)
                         throws AxisFault
Externalize exception handling

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

generateWSDL

public void generateWSDL(MessageContext msgContext)
                  throws AxisFault
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
Overrides:
generateWSDL in class BasicProvider
Throws:
AxisFault

makeNewServiceObject

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

Throws:
Exception

getServiceClassName

protected String getServiceClassName(Handler service)
Return the class name of the service


getServiceClassNameOptionName

protected String getServiceClassNameOptionName()
Return the option in the configuration that contains the service class name


getServiceClass

protected Class getServiceClass(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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.