|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CallContext represents context valid through one call. There can be stored any
data in given call context. For instance, a server header processor can pass
some data to the service or a client application can pass some data to given
interceptor or header processor which is valid for the current call only.
An additional data associated with the this context is accessible using the
method getContextData()
. On the client side there are accessible also
all values of the ServiceClientContext
data map and on the server side
there are accessible also all values of the ServiceEndpointContext
data map.
ServiceClient client = ServiceClient.create(serviceURL); client.getInterceptors().insert(new MyInterceptor(), Interceptors.DIRECTION_INOUT); MyServiceIface proxy = (MyServiceIface)client.createProxy(MyServiceIface.class); client.getCallContext().getContextData().put("mykey", ...); proxy.hello("Hello world!"); public class MyInterceptor implements TransportInterceptor { public void intercept(Connection connection, InterceptorChain chain, int position) throws StopProcessingException, IOException { ... = Current.getCallContext().getContextData().get("mykey"); ... }
Field Summary | |
static java.lang.String |
ADDRESSING_HEADERS_INPUT
Parsed AddressingHeaders of the input message. |
static java.lang.String |
ADDRESSING_HEADERS_OUTPUT
AddressingHeaders that will be attached to the
output message. |
static java.lang.String |
DEFAULT_MIME_CONTENT_TRANSFER_ENCODING
Default Content-Transfer-Encoding for MIME messages (attachments). |
static java.lang.String |
HTTP_PROXY_PASSWORD
The key associated with the HTTP proxy password is used to proxy authenticate. |
static java.lang.String |
HTTP_PROXY_USER_NAME
The key associated with the HTTP proxy username is used to proxy authenticate. |
static java.lang.String |
HTTP_REQUEST_CHUNKING
The key associated with HTTP chunging of client requests. |
static java.lang.String |
INSTANCE_ID
This key holds the actual instance ID in the service client context (on the client side) or in the call context (on the server side). |
static java.lang.String |
LAZY_INPUT_PROCESSING
Services that do not process input within the thread in which they were invoked (e.g. |
static java.lang.String |
MAIL_INPUT_PASSWORD
The key associated with the MAIL input password. |
static java.lang.String |
MAIL_OUTPUT_FROM
The key associated with the MAIL output reverse path. |
static java.lang.String |
MAIL_OUTPUT_SERVER
The key associated with the MAIL output server. |
static java.lang.String |
MTOM_ATTACHMENT_SIZE_TRESHOLD
An non-negative Integer values representing the treshold in bytes. |
static java.lang.String |
MTOM_MAX_ATTACHMENT_PARTS
An non-negative Integer value representing maximal number of MIME attachments parts used in XOP. |
static java.lang.String |
POLICY_INPUT
Effective EffectivePolicy of the input message. |
static java.lang.String |
POLICY_OUTPUT
Effective EffectivePolicy of the output message. |
static java.lang.String |
SEND_RESPONSE_BEFORE_REQUEST_READ_COMPLETE
Allows or disallows to start sending response before complete request is received. |
static java.lang.String |
SEQUENCE_INPUT
Sequence used in input processing. |
static java.lang.String |
SEQUENCE_OUTPUT
A ThreadLocal containing the Sequence
used in output processing. |
static java.lang.String |
SERVLET
This constant is a key to context data for active Servlet . |
static java.lang.String |
SERVLET_REQUEST
This constant is a key to context data for active ServeltRequest . |
static java.lang.String |
SERVLET_RESPONSE
This constant is a key to context data for active ServletResponse . |
static java.lang.String |
TRANSPORT_CONNECTION
This constant is a key to context data for active transport connection. |
static java.lang.String |
TRANSPORT_CONNECTION_TIMEOUT
This constant is a key to context data for transport connection timout. |
static java.lang.String |
UNWRAPPED_PROXY_INTERFACE
Instruct invocation framework how to parse WSDL. |
static java.lang.String |
USE_HREF_IN_BODY_FOR_MIME
Allows to override default value of useHrefInBodyForMime . |
static java.lang.String |
USE_MTOM
Overrides default value of useMtomXop element in clientconf.xml and serverconf.xml. |
static java.lang.String |
WSDL_BINDING_STYLE
This key holds the actual style. |
static java.lang.String |
WSDL_ENCODING_URI
This key holds the actual encoding. |
static java.lang.String |
WSDL_GET_USE_HTTP_BASIC_IN_FIRST_ATTEMP
This key indicates that when getting WSDL (and included files, either WSDL or XML Schemas from the same host), the first attempt should use HTTP Basic Authentification. |
static java.lang.String |
XML_PROTOCOL
This key holds the actual XML protocol version in the call context (on the client side and also on the server side). |
Method Summary | |
java.util.Map |
getContextData()
Returns map of additional data associated with this context. |
Field Detail |
public static final java.lang.String TRANSPORT_CONNECTION
On the client side you can obtain ClientConnection
.
This connection is the connection from client (you) to target server
on which you are invoking a service.
On the server side you obtain ServerConnection
. This
connection is the connection which has cause invocation.
public static final java.lang.String TRANSPORT_CONNECTION_TIMEOUT
It's valid for the client side only, value type is Integer
and
timeout is in milliseconds.
See ClientConnection.setTimeout(int)
for
more information.
public static final java.lang.String SERVLET_REQUEST
ServeltRequest
.
On server side if you are using servlet transport (you have deployed WSO2 SOA Enablement Server
in some Servlet container), you obtain HttpServletRequest
for current
invocation else you obtain null.
On client side, returns null.
public static final java.lang.String SERVLET_RESPONSE
ServletResponse
.
On server side if you are using servlet transport (you have deployed WSO2 SOA Enablement Server
in some Servlet container), you obtain HttpServletResponse
for current
invocation else you obtain null.
On client side, returns null.
public static final java.lang.String SERVLET
Servlet
.
On server side if you are using servlet transport (you have deployed WSO2 SOA Enablement Server
in some Servlet container), you obtain HttpServlet
for current
invocation else you obtain null.
On client side, returns null.
public static final java.lang.String INSTANCE_ID
This key holds the actual instance ID in the service client context (on the client side) or in the call context (on the server side).
INSTANCE_ID
is mainly used by stateful web services or remote references.
You can also use INSTANCE_ID
to control sessions (on both client and server side).
If service sets INSTANCE_ID
firt time it is relayed to the client and stored in
service client context. If client calls a service and INSTANCE_ID
is set
in service client context it is relayed to the called service (and stored in call context).
public static final java.lang.String XML_PROTOCOL
WaspSOAPMessage.XML_PROTOCOL_SOAP11
,
WaspSOAPMessage.XML_PROTOCOL_SOAP12
,
Constant Field Valuespublic static final java.lang.String WSDL_ENCODING_URI
null
literal use
is assumed. If set to Constants.SOAP_ENC_NS
SOAP 1.1
encoding is assumed and if set to Constants.SOAP12_ENC_NS
SOAP 1.2 encoding is used.
public static final java.lang.String WSDL_BINDING_STYLE
null
document style
is assumed. If set to Constants.WSDL_BINDING_STYLE_DOCUMENT
WSDL document style is assumed and if set to Constants.WSDL_BINDING_STYLE_RPC
,
RPC style is used.
public static final java.lang.String HTTP_REQUEST_CHUNKING
true
if there is
a request chunking required. The default value is false
-
no request chunking.
public static final java.lang.String HTTP_PROXY_USER_NAME
public static final java.lang.String HTTP_PROXY_PASSWORD
public static final java.lang.String WSDL_GET_USE_HTTP_BASIC_IN_FIRST_ATTEMP
public static final java.lang.String MAIL_OUTPUT_SERVER
smtp://smtp.idoox.com
.
public static final java.lang.String MAIL_OUTPUT_FROM
wasp@idoox.com
.
public static final java.lang.String MAIL_INPUT_PASSWORD
Transport.newConnection(org.idoox.transport.URI, org.idoox.transport.TransportMethod, java.util.Map)
.
public static final java.lang.String LAZY_INPUT_PROCESSING
Services that do not process input within the thread in which they were invoked
(e.g. OnewayListener
that processes request in special "worker" thread)
need to set this property to Boolean.TRUE
. Such services MUST also
release input soap message (WaspSOAPMessage.release()
) after
input message was processed (whole input was read).
Warning: If service sets this key to Boolean.TRUE
and does not
release input soap message then server resources will be blocked.
public static final java.lang.String UNWRAPPED_PROXY_INTERFACE
CallContext
to Boolean.TRUE
, else set it to
Boolean.FALSE
.
public static final java.lang.String ADDRESSING_HEADERS_INPUT
AddressingHeaders
of the input message.
They are put to the CallContext
by the active addressing headers
provider
(i.e. the WS-Addressing handler).
public static final java.lang.String ADDRESSING_HEADERS_OUTPUT
AddressingHeaders
that will be attached to the
output message. When found in the CallContext
by the active
addressing headers provider
(i.e. the WS-Addressing handler), they
are attached to the outgoing message.
public static final java.lang.String SEQUENCE_INPUT
Sequence
used in input processing. It is stored
to the context by active WS-RM implementation.
public static final java.lang.String SEQUENCE_OUTPUT
ThreadLocal
containing the Sequence
used in output processing. It is stored to the context by the Sequence API implementation
on applications demand and is used by the WS-RM implementation to manage
the sequence related data.
public static final java.lang.String POLICY_INPUT
EffectivePolicy
of the input message.
It is put to the CallContext
when the processing of an input message is started
and can be used by arbitrary message processing unit to check appropriate assertions.
public static final java.lang.String POLICY_OUTPUT
EffectivePolicy
of the output message.
It is put to the CallContext
when the processing of an output message is started
and can be used by arbitrary message processing unit to check appropriate assertions.
public static final java.lang.String DEFAULT_MIME_CONTENT_TRANSFER_ENCODING
public static final java.lang.String USE_HREF_IN_BODY_FOR_MIME
useHrefInBodyForMime
. Register
an instance of IWasp.UseHrefInBodyValue
IWasp.UseHrefInBodyValue
,
Constant Field Valuespublic static final java.lang.String USE_MTOM
useMtomXop
element in clientconf.xml and serverconf.xml.
Acceptable values are never, always and auto
public static final java.lang.String MTOM_MAX_ATTACHMENT_PARTS
Integer
value representing maximal number of MIME attachments parts used in XOP.
In other works max number of xop:Includes in the root part.
public static final java.lang.String MTOM_ATTACHMENT_SIZE_TRESHOLD
Integer
values representing the treshold in bytes.
Should some attachment part in XOP package contain less bytes than specified by this value,
xop:Include is not used and the value is inlined into the root part.
public static final java.lang.String SEND_RESPONSE_BEFORE_REQUEST_READ_COMPLETE
Should be disabled if the service acts as a filter processing the input and the client does not receive until the complete message is send. In this case the system could fall into a silent deadlock.
A key is asociated with a Boolean
value.
Method Detail |
public java.util.Map getContextData()
Map
of additional data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |