|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.MessageContext
A MessageContext is the Axis implementation of the javax SOAPMessageContext class, and is core to message processing in handlers and other parts of the system.
This class also contains constants for accessing some well-known properties. Using a hierarchical namespace is strongly suggested in order to lower the chance for conflicts. (These constants should be viewed as an explicit list of well known and widely used context keys, there's nothing wrong with directly using the key strings. This is the reason for the hierarchical constant namespace. Actually I think we might just list the keys in the docs and provide no such constants since they create yet another namespace, but we'd have no compile-time checks then. Whaddya think? - todo by Jacek)
Field Summary | |
static String |
ACCEPTMISSINGPARAMS
A boolean param, to control whether we accept missing parameters as nulls or refuse to acknowledge them. |
static String |
ATTACHMENTS_DIR
The directory where in coming attachments are created. |
static String |
AUTHUSER
Place to store an AuthenticatedUser |
static String |
CALL
If on the client - this is the Call object |
static String |
ENGINE_HANDLER
Contains an instance of Handler, which is the ServiceContext and the entrypoint of this service. |
static String |
HTTP_TRANSPORT_VERSION
The value of the property is used by service WSDL generation (aka ?WSDL) Set this property to request a certain level of HTTP. |
static String |
IS_MSG
Are we doing Msg vs RPC? - For Java Binding |
static String |
QUIT_REQUESTED
Has a quit been requested? Hackish... |
static String |
SECURITY_PROVIDER
|
protected static String |
systemTempDir
temporary directory to store attachments |
static String |
TRANS_URL
This String is the URL that the message came to |
static String |
WSDLGEN_INTFNAMESPACE
The value of the property is used by service WSDL generation (aka ?WSDL) For the service's interface namespace if not set TRANS_URL property is used. |
static String |
WSDLGEN_RESOURCE
The value of the property is used by service WSDL generation (aka ?WSDL) If the wsdl documnet contains imports, this property is the relative path to the imported artifact. |
static String |
WSDLGEN_SERV_LOC_URL
The value of the property is used by service WSDL generation (aka ?WSDL) For the service's location if not set TRANS_URL property is used. |
Constructor Summary | |
MessageContext(AxisEngine engine)
Create a message context. |
Method Summary | |
boolean |
containsProperty(String name)
Returns true if the MessageContext contains a property with the specified name. |
AxisEngine |
getAxisEngine()
get the axis engine. |
ClassLoader |
getClassLoader()
get the classloader, implicitly binding to the thread context classloader if an override has not been supplied |
static MessageContext |
getCurrentContext()
Get the active message context. |
Message |
getCurrentMessage()
Return the current (i.e. |
String |
getEncodingStyle()
Returns the encoding style as a URI that should be used for the SOAP message. |
boolean |
getMaintainSession()
Are we maintaining session state? |
javax.xml.soap.SOAPMessage |
getMessage()
Gets the SOAPMessage from this message context |
OperationDesc |
getOperation()
the current operation |
OperationDesc |
getOperationByQName(javax.xml.namespace.QName qname)
get the first possible operation that could match a body containing an element of the given QName. |
Style |
getOperationStyle()
Get the operation style. |
Use |
getOperationUse()
Get the operation use. |
String |
getPassword()
Get the password |
boolean |
getPastPivot()
Determine when we've passed the pivot |
OperationDesc[] |
getPossibleOperationsByQName(javax.xml.namespace.QName qname)
getPossibleOperationsByQName Returns a list of operation descriptors that could may possibly match a body containing an element of the given QName. |
Object |
getProperty(String name)
Returns the value associated with the named property - or null if not defined/set. |
Iterator |
getPropertyNames()
Returns an Iterator view of the names of the properties in this MessageContext |
Message |
getRequestMessage()
Get the request message. |
Message |
getResponseMessage()
Get the response message. |
String[] |
getRoles()
Not (yet) implemented method in the SOAPMessageContext interface Gets the SOAP actor roles associated with an execution of the HandlerChain and its contained Handler instances. |
SchemaVersion |
getSchemaVersion()
Schema version information |
SOAPService |
getService()
|
Session |
getSession()
Sessions |
String |
getSOAPActionURI()
Get the soapAction URI. |
SOAPConstants |
getSOAPConstants()
SOAP constants |
String |
getStrProp(String propName)
Just a util so we don't have to cast the result |
String |
getTargetService()
|
int |
getTimeout()
Get timeout from our MessageContext. |
String |
getTransportName()
Transport |
TypeMapping |
getTypeMapping()
Return the type mapping currently in scope for our encoding style |
TypeMappingRegistry |
getTypeMappingRegistry()
Get the currently in-scope type mapping registry. |
String |
getUsername()
Get the user name |
boolean |
isClient()
Let us know whether this is the client or the server. |
boolean |
isEncoded()
Encoding |
boolean |
isHighFidelity()
|
boolean |
isPropertyTrue(String propName)
Tests to see if the named property is set in the 'bag'. |
boolean |
isPropertyTrue(String propName,
boolean defaultVal)
Tests to see if the named property is set in the 'bag'. |
void |
removeProperty(String propName)
|
void |
reset()
|
void |
setClassLoader(ClassLoader cl)
set a new classloader |
void |
setCurrentMessage(Message curMsg)
Set the current (i.e. |
void |
setEncodingStyle(String namespaceURI)
Sets the encoding style to the URI passed in. |
void |
setHighFidelity(boolean highFidelity)
|
void |
setMaintainSession(boolean yesno)
Set whether we are maintaining session state |
void |
setMessage(javax.xml.soap.SOAPMessage message)
Sets the SOAPMessage for this message context |
void |
setOperation(OperationDesc operation)
set the current operation |
void |
setPassword(String password)
Set the password. |
void |
setPastPivot(boolean pastPivot)
Indicate when we've passed the pivot |
void |
setProperty(String name,
Object value)
Allows you to set a named property to the passed in value. |
void |
setPropertyParent(Hashtable parent)
|
void |
setRequestMessage(Message reqMsg)
Set the request message, and make sure that message is associated with this MessageContext. |
void |
setResponseMessage(Message respMsg)
Set the response message, and make sure that message is associated with this MessageContext. |
void |
setSchemaVersion(SchemaVersion schemaVersion)
|
void |
setService(SOAPService sh)
|
void |
setSession(Session session)
|
void |
setSOAPActionURI(String SOAPActionURI)
Set the soapAction URI. |
void |
setSOAPConstants(SOAPConstants soapConstants)
|
void |
setTargetService(String tServ)
Set the target service for this message. |
void |
setTimeout(int value)
Set timeout in our MessageContext. |
void |
setTransportName(String transportName)
|
void |
setTypeMappingRegistry(TypeMappingRegistry reg)
replace the engine's type mapping registry with a local one |
void |
setUsername(String username)
Set the username. |
void |
setUseSOAPAction(boolean useSOAPAction)
Should soapAction be used? |
boolean |
useSOAPAction()
Are we using soapAction? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static String systemTempDir
public static final String ENGINE_HANDLER
public static final String TRANS_URL
public static final String QUIT_REQUESTED
public static final String AUTHUSER
public static final String CALL
public static final String IS_MSG
public static final String ATTACHMENTS_DIR
public static final String ACCEPTMISSINGPARAMS
public static final String WSDLGEN_INTFNAMESPACE
public static final String WSDLGEN_SERV_LOC_URL
public static final String WSDLGEN_RESOURCE
public static final String HTTP_TRANSPORT_VERSION
public static final String SECURITY_PROVIDER
Constructor Detail |
public MessageContext(AxisEngine engine)
engine
- the controlling axis engine. Null is actually accepted here,
though passing a null engine in is strongly discouraged as many of the methods
assume that it is in fact defined.Method Detail |
public OperationDesc getOperation()
public void setOperation(OperationDesc operation)
operation
- public OperationDesc[] getPossibleOperationsByQName(javax.xml.namespace.QName qname) throws AxisFault
qname
- of the first element in the body
AxisFault
public OperationDesc getOperationByQName(javax.xml.namespace.QName qname) throws AxisFault
qname
- name of the message body
AxisFault
public static MessageContext getCurrentContext()
public void setTypeMappingRegistry(TypeMappingRegistry reg)
reg
- public TypeMappingRegistry getTypeMappingRegistry()
public TypeMapping getTypeMapping()
public String getTransportName()
public void setTransportName(String transportName)
public SOAPConstants getSOAPConstants()
public void setSOAPConstants(SOAPConstants soapConstants)
public SchemaVersion getSchemaVersion()
public void setSchemaVersion(SchemaVersion schemaVersion)
public Session getSession()
public void setSession(Session session)
public boolean isEncoded()
public void setMaintainSession(boolean yesno)
yesno
- flag to set to true to maintain sessionspublic boolean getMaintainSession()
public Message getRequestMessage()
public void setRequestMessage(Message reqMsg)
reqMsg
- the new request Message.public Message getResponseMessage()
public void setResponseMessage(Message respMsg)
respMsg
- the new response Message.public Message getCurrentMessage()
public javax.xml.soap.SOAPMessage getMessage()
getMessage
in interface javax.xml.rpc.handler.soap.SOAPMessageContext
public void setCurrentMessage(Message curMsg)
public void setMessage(javax.xml.soap.SOAPMessage message)
setMessage
in interface javax.xml.rpc.handler.soap.SOAPMessageContext
message
- Request SOAP message
UnsupportedOperationException
- If this
operation is not supportedpublic boolean getPastPivot()
public void setPastPivot(boolean pastPivot)
public void setTimeout(int value)
value
- the maximum amount of time, in millisecondspublic int getTimeout()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader cl)
cl
- public String getTargetService()
public AxisEngine getAxisEngine()
public void setTargetService(String tServ) throws AxisFault
tServ
- the name of the target service.
AxisFault
public SOAPService getService()
public void setService(SOAPService sh) throws AxisFault
AxisFault
public boolean isClient()
public String getStrProp(String propName)
public boolean isPropertyTrue(String propName)
public boolean isPropertyTrue(String propName, boolean defaultVal)
public void setProperty(String name, Object value)
setProperty
in interface javax.xml.rpc.handler.MessageContext
name
- Name of the propertyvalue
- Value of the propertypublic boolean containsProperty(String name)
containsProperty
in interface javax.xml.rpc.handler.MessageContext
name
- Name of the property whose presense is to be tested
public Iterator getPropertyNames()
getPropertyNames
in interface javax.xml.rpc.handler.MessageContext
public Object getProperty(String name)
getProperty
in interface javax.xml.rpc.handler.MessageContext
public void setPropertyParent(Hashtable parent)
public void setUsername(String username)
public String getUsername()
public void setPassword(String password)
public String getPassword()
public Style getOperationStyle()
public Use getOperationUse()
public void setUseSOAPAction(boolean useSOAPAction)
public boolean useSOAPAction()
public void setSOAPActionURI(String SOAPActionURI) throws IllegalArgumentException
IllegalArgumentException
public String getSOAPActionURI()
public void setEncodingStyle(String namespaceURI)
namespaceURI
- URI of the encoding to use.public String getEncodingStyle()
public void removeProperty(String propName)
removeProperty
in interface javax.xml.rpc.handler.MessageContext
public void reset()
public boolean isHighFidelity()
public void setHighFidelity(boolean highFidelity)
public String[] getRoles()
getRoles
in interface javax.xml.rpc.handler.soap.SOAPMessageContext
HandlerChain.setRoles(java.lang.String[])
,
HandlerChain.getRoles()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |