Package org.apache.axis.providers.java
Class RPCProvider
- java.lang.Object
-
- org.apache.axis.handlers.BasicHandler
-
- org.apache.axis.providers.BasicProvider
-
- org.apache.axis.providers.java.JavaProvider
-
- org.apache.axis.providers.java.RPCProvider
-
- All Implemented Interfaces:
java.io.Serializable
,Handler
- Direct Known Subclasses:
CORBAProvider
,EJBProvider
,RMIProvider
public class RPCProvider extends JavaProvider
Implement message processing by walking over RPCElements of the envelope body, invoking the appropriate methods on the service object.- Author:
- Doug Davis (dug@us.ibm.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
log
-
Fields inherited from class org.apache.axis.providers.java.JavaProvider
entLog, OPTION_ALLOWEDMETHODS, OPTION_CLASSNAME, OPTION_SCOPE
-
Fields inherited from class org.apache.axis.providers.BasicProvider
OPTION_EXTRACLASSES, OPTION_WSDL_INPUTSCHEMA, OPTION_WSDL_PORTTYPE, OPTION_WSDL_SERVICEELEMENT, OPTION_WSDL_SERVICEPORT, OPTION_WSDL_SOAPACTION_MODE, OPTION_WSDL_TARGETNAMESPACE
-
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
-
-
Constructor Summary
Constructors Constructor Description RPCProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkMethodName(MessageContext msgContext, java.lang.String allowedMethods, java.lang.String methodName)
Throw an AxisFault if the requested method is not allowed.protected RPCElement
createResponseBody(RPCElement body, MessageContext msgContext, OperationDesc operation, ServiceDesc serviceDesc, java.lang.Object objRes, SOAPEnvelope resEnv, java.util.ArrayList outs)
protected RPCElement
getBody(SOAPEnvelope reqEnv, MessageContext msgContext)
protected OperationDesc
getOperationDesc(MessageContext msgContext, RPCElement body)
protected java.lang.Object
invokeMethod(MessageContext msgContext, java.lang.reflect.Method method, java.lang.Object obj, java.lang.Object[] argValues)
This method encapsulates the method invocation.void
processMessage(MessageContext msgContext, SOAPEnvelope reqEnv, SOAPEnvelope resEnv, java.lang.Object obj)
Process the current message.-
Methods inherited from class org.apache.axis.providers.java.JavaProvider
getServiceClass, getServiceClassName, getServiceClassNameOptionName, getServiceObject, initServiceDesc, invoke, makeNewServiceObject
-
Methods inherited from class org.apache.axis.providers.BasicProvider
addOperation, generateWSDL, 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
-
-
-
-
Method Detail
-
processMessage
public void processMessage(MessageContext msgContext, SOAPEnvelope reqEnv, SOAPEnvelope resEnv, java.lang.Object obj) throws java.lang.Exception
Process the current message. Result in resEnv.- Specified by:
processMessage
in classJavaProvider
- Parameters:
msgContext
- self-explanatoryreqEnv
- the request enveloperesEnv
- the response envelopeobj
- the service object itself- Throws:
java.lang.Exception
-
getBody
protected RPCElement getBody(SOAPEnvelope reqEnv, MessageContext msgContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getOperationDesc
protected OperationDesc getOperationDesc(MessageContext msgContext, RPCElement body) throws org.xml.sax.SAXException, AxisFault
- Throws:
org.xml.sax.SAXException
AxisFault
-
createResponseBody
protected RPCElement createResponseBody(RPCElement body, MessageContext msgContext, OperationDesc operation, ServiceDesc serviceDesc, java.lang.Object objRes, SOAPEnvelope resEnv, java.util.ArrayList outs) throws java.lang.Exception
- Throws:
java.lang.Exception
-
invokeMethod
protected java.lang.Object invokeMethod(MessageContext msgContext, java.lang.reflect.Method method, java.lang.Object obj, java.lang.Object[] argValues) throws java.lang.Exception
This method encapsulates the method invocation.- Parameters:
msgContext
- MessageContextmethod
- the target method.obj
- the target objectargValues
- the method arguments- Throws:
java.lang.Exception
-
checkMethodName
protected void checkMethodName(MessageContext msgContext, java.lang.String allowedMethods, java.lang.String methodName) throws java.lang.Exception
Throw an AxisFault if the requested method is not allowed.- Parameters:
msgContext
- MessageContextallowedMethods
- list of allowed methodsmethodName
- name of target method- Throws:
java.lang.Exception
-
-