Package org.apache.axis2.jaxws.core
Class MessageContext
java.lang.Object
org.apache.axis2.jaxws.core.MessageContext
The
org.apache.axis2.jaxws.core.MessageContext is an interface that extends the
JAX-WS 2.0 jakarta.xml.ws.handler.MessageContext defined in the spec. This
encapsulates all of the functionality needed of the MessageContext for the other JAX-WS spec
pieces (the handlers for example) and also provides the needed bits of contextual information for
the rest of the JAX-WS implementation.
Specifically, this is responsible for providing APIs so that the client and server implementation
portions can get to the Message, defined by the Message Model format and also any metadata that
is available.-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a MessageContext without a prior Axis2 MessageContext (usage outbound dispatch/proxy)MessageContext(org.apache.axis2.context.MessageContext mc) Construct a MessageContext with a prior MessageContext (usage inbound client/server or outbound server) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) voidFree the resources associated with the incoming input stream.org.apache.axis2.context.MessageContextorg.apache.axis2.AxisFaultorg.apache.axis2.jaxws.description.EndpointDescriptionThe local exception is the Throwable object held on the Message from a problem that occurred due to something other than the server.jakarta.xml.ws.Service.ModegetMode()org.apache.axis2.jaxws.description.OperationDescriptiongetProperty(String key) booleanUsed to determine whether or not session state has been enabled.booleanbooleanisServer()voidsetCausedByException(org.apache.axis2.AxisFault t) voidsetEndpointDescription(org.apache.axis2.jaxws.description.EndpointDescription ed) voidvoidThe local exception is the Throwable object held on the Message from a problem that occurred due to something other than the server.voidsetMEPContext(MEPContext mepCtx) Set the wrapper MEPContext.voidsetMessage(Message msg) voidsetMode(jakarta.xml.ws.Service.Mode m) voidsetOperationDescription(org.apache.axis2.jaxws.description.OperationDescription od) voidvoidsetOutbound(boolean isOutbound) voidsetProperties(Map<String, Object> _properties) setProperty(String key, Object value) voidsetPropertyNoReturn(String key, Object value) Like getProperty, but does not return prior value.voidsetServer(boolean isServer) Indicate if server role
-
Constructor Details
-
MessageContext
public MessageContext()Construct a MessageContext without a prior Axis2 MessageContext (usage outbound dispatch/proxy) -
MessageContext
public MessageContext(org.apache.axis2.context.MessageContext mc) throws jakarta.xml.ws.WebServiceException Construct a MessageContext with a prior MessageContext (usage inbound client/server or outbound server)- Parameters:
mc-- Throws:
jakarta.xml.ws.WebServiceException
-
-
Method Details
-
getInvocationContext
-
setInvocationContext
-
getProperties
-
setProperties
-
getProperty
-
containsKey
-
setProperty
-
setPropertyNoReturn
Like getProperty, but does not return prior value. This method should be used in scenarios where the prior value is not needed.- Parameters:
key- Stringvalue- Object
-
getEndpointDescription
public org.apache.axis2.jaxws.description.EndpointDescription getEndpointDescription() -
setEndpointDescription
public void setEndpointDescription(org.apache.axis2.jaxws.description.EndpointDescription ed) -
getOperationDescription
public org.apache.axis2.jaxws.description.OperationDescription getOperationDescription() -
setOperationDescription
public void setOperationDescription(org.apache.axis2.jaxws.description.OperationDescription od) -
getMode
public jakarta.xml.ws.Service.Mode getMode() -
setMode
public void setMode(jakarta.xml.ws.Service.Mode m) -
getOperationName
-
setOperationName
-
setMessage
-
getMessage
-
getAxisMessageContext
public org.apache.axis2.context.MessageContext getAxisMessageContext() -
getClassLoader
-
isMaintainSession
public boolean isMaintainSession()Used to determine whether or not session state has been enabled.- Returns:
-
getLocalException
The local exception is the Throwable object held on the Message from a problem that occurred due to something other than the server. In other words, no message ever travelled across the wire.- Returns:
- the Throwable object or null
-
setLocalException
The local exception is the Throwable object held on the Message from a problem that occurred due to something other than the server. In other words, no message ever travelled across the wire.- Parameters:
t-- See Also:
-
setCausedByException
public void setCausedByException(org.apache.axis2.AxisFault t) - Parameters:
t-
-
getCausedByException
public org.apache.axis2.AxisFault getCausedByException()- Returns:
-
setMEPContext
Set the wrapper MEPContext. Internally, this method also sets the MEPContext's children so the pointer is bi-directional; you can get the MEPContext from the MessageContext and vice-versa.- Parameters:
mepCtx-
-
getMEPContext
-
isOutbound
public boolean isOutbound()- Returns:
- if outbound MessageContext
-
setOutbound
public void setOutbound(boolean isOutbound) - Parameters:
isOutbound- true if outbound MessageContext
-
isServer
public boolean isServer()- Returns:
- true if server role
-
setServer
public void setServer(boolean isServer) Indicate if server role- Parameters:
isServer-
-
freeInputStream
Free the resources associated with the incoming input stream. (i.e. HTTPInputStream) This allows the transport layer to free resources and pool connections- Throws:
IOException
-