org.apache.axis2.jaxws.core
Class MessageContext

java.lang.Object
  extended by org.apache.axis2.jaxws.core.MessageContext

public class MessageContext
extends java.lang.Object

The org.apache.axis2.jaxws.core.MessageContext is an interface that extends the JAX-WS 2.0 javax.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
MessageContext()
          Construct a MessageContext without a prior Axis2 MessageContext (usage outbound dispatch/proxy)
MessageContext(MessageContext mc)
          Construct a MessageContext with a prior MessageContext (usage inbound client/server or outbound server)
 
Method Summary
 boolean containsKey(java.lang.Object key)
           
 MessageContext getAxisMessageContext()
           
 AxisFault getCausedByException()
           
 java.lang.ClassLoader getClassLoader()
           
 EndpointDescription getEndpointDescription()
           
 InvocationContext getInvocationContext()
           
 java.lang.Throwable getLocalException()
          The local exception is the Throwable object held on the Message from a problem that occurred due to something other than the server.
 MEPContext getMEPContext()
           
 Message getMessage()
           
 Service.Mode getMode()
           
 OperationDescription getOperationDescription()
           
 QName getOperationName()
           
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 java.lang.Object getProperty(java.lang.String key)
           
 boolean isMaintainSession()
          Used to determine whether or not session state has been enabled.
 boolean isOutbound()
           
 boolean isServer()
           
 void setCausedByException(AxisFault t)
           
 void setEndpointDescription(EndpointDescription ed)
           
 void setInvocationContext(InvocationContext ic)
           
 void setLocalException(java.lang.Throwable t)
          The local exception is the Throwable object held on the Message from a problem that occurred due to something other than the server.
 void setMEPContext(MEPContext mepCtx)
          Set the wrapper MEPContext.
 void setMessage(Message msg)
           
 void setMode(Service.Mode m)
           
 void setOperationDescription(OperationDescription od)
           
 void setOperationName(QName op)
           
 void setOutbound(boolean isOutbound)
           
 void setProperties(java.util.Map<java.lang.String,java.lang.Object> _properties)
           
 java.lang.Object setProperty(java.lang.String key, java.lang.Object value)
           
 void setServer(boolean isServer)
          Indicate if server role
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageContext

public MessageContext()
Construct a MessageContext without a prior Axis2 MessageContext (usage outbound dispatch/proxy)


MessageContext

public MessageContext(MessageContext mc)
               throws WebServiceException
Construct a MessageContext with a prior MessageContext (usage inbound client/server or outbound server)

Parameters:
mc -
Throws:
WebServiceException
Method Detail

getInvocationContext

public InvocationContext getInvocationContext()

setInvocationContext

public void setInvocationContext(InvocationContext ic)

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.Object> _properties)

getProperty

public java.lang.Object getProperty(java.lang.String key)

containsKey

public boolean containsKey(java.lang.Object key)

setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.Object value)

getEndpointDescription

public EndpointDescription getEndpointDescription()

setEndpointDescription

public void setEndpointDescription(EndpointDescription ed)

getOperationDescription

public OperationDescription getOperationDescription()

setOperationDescription

public void setOperationDescription(OperationDescription od)

getMode

public Service.Mode getMode()

setMode

public void setMode(Service.Mode m)

getOperationName

public QName getOperationName()

setOperationName

public void setOperationName(QName op)

setMessage

public void setMessage(Message msg)

getMessage

public Message getMessage()

getAxisMessageContext

public MessageContext getAxisMessageContext()

getClassLoader

public java.lang.ClassLoader getClassLoader()

isMaintainSession

public boolean isMaintainSession()
Used to determine whether or not session state has been enabled.

Returns:

getLocalException

public java.lang.Throwable 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

public void setLocalException(java.lang.Throwable t)
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:
Throwable

setCausedByException

public void setCausedByException(AxisFault t)
Parameters:
t -

getCausedByException

public AxisFault getCausedByException()
Returns:

setMEPContext

public void setMEPContext(MEPContext mepCtx)
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

public MEPContext 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 -


Copyright © 2007 Apache Web Services Project. All Rights Reserved.