LibraryToggle FramesPrintFeedback

Table 20.1 lists the properties accessible through the context in a service implementation object.

Table 20.1. Properties Available in the Service Implementation Context

Base Class
Property NameDescription
org.apache.cxf.message.Message
PROTOCOL_HEADERS[a]Specifies the transport specific header information. The value is stored as a java.util.Map<String, List<String>>.
RESPONSE_CODE[a]Specifies the response code returned to the consumer. The value is stored as an Integer object.
ENDPOINT_ADDRESSSpecifies the address of the service provider. The value is stored as a String.
HTTP_REQUEST_METHOD[a]Specifies the HTTP verb sent with a request. The value is stored as a String.
PATH_INFO[a]

Specifies the path of the resource being requested. The value is stored as a String.

The path is the portion of the URI after the hostname and before any query string. For example, if an endpoint's URI is http://cxf.apache.org/demo/widgets the path is /demo/widgets.

QUERY_STRING[a]

Specifies the query, if any, attached to the URI used to invoke the request. The value is stored as a String.

Queries appear at the end of the URI after a ?. For example, if a request is made to http://cxf.apache.org/demo/widgets?color the query is color.

MTOM_ENABLEDSpecifies whether or not the service provider can use MTOM for SOAP attachments. The value is stored as a Boolean.
SCHEMA_VALIDATION_ENABLEDSpecifies whether or not the service provider validates messages against a schema. The value is stored as a Boolean.
FAULT_STACKTRACE_ENABLEDSpecifies if the runtime provides a stack trace along with a fault message. The value is stored as a Boolean.
CONTENT_TYPESpecifies the MIME type of the message. The value is stored as a String.
BASE_PATH

Specifies the path of the resource being requested. The value is stored as a java.net.URL.

The path is the portion of the URI after the hostname and before any query string. For example, if an endpoint's URL is http://cxf.apache.org/demo/widgets the base path is /demo/widgets.

ENCODINGSpecifies the encoding of the message. The value is stored as a String.
FIXED_PARAMETER_ORDERSpecifies whether the parameters must appear in the message in a particular order. The value is stored as a Boolean.
MAINTAIN_SESSIONSpecifies if the consumer wants to maintain the current session for future requests. The value is stored as a Boolean.
WSDL_DESCRIPTION[a]Specifies the WSDL document that defines the service being implemented. The value is stored as a org.xml.sax.InputSource object.
WSDL_SERVICE[a]Specifies the qualified name of the wsdl:service element that defines the service being implemented. The value is stored as a QName.
WSDL_PORT[a]Specifies the qualified name of the wsdl:port element that defines the endpoint used to access the service. The value is stored as a QName.
WSDL_INTERFACE[a]Specifies the qualified name of the wsdl:portType element that defines the service being implemented. The value is stored as a QName.
WSDL_OPERATION[a]Specifies the qualified name of the wsdl:operation element that corresponds to the operation invoked by the consumer. The value is stored as a QName.
javax.xml.ws.handler.MessageContext
MESSAGE_OUTBOUND_PROPERTYSpecifies if a message is outbound. The value is stored as a Boolean. true specifies that a message is outbound.
INBOUND_MESSAGE_ATTACHMENTS

Contains any attachments included in the request message. The value is stored as a java.util.Map<String, DataHandler>.

The key value for the map is the MIME Content-ID for the header.

OUTBOUND_MESSAGE_ATTACHMENTS

Contains any attachments for the response message. The value is stored as a java.util.Map<String, DataHandler>.

The key value for the map is the MIME Content-ID for the header.

WSDL_DESCRIPTIONSpecifies the WSDL document that defines the service being implemented. The value is stored as a org.xml.sax.InputSource object.
WSDL_SERVICESpecifies the qualified name of the wsdl:service element that defines the service being implemented. The value is stored as a QName.
WSDL_PORTSpecifies the qualified name of the wsdl:port element that defines the endpoint used to access the service. The value is stored as a QName.
WSDL_INTERFACESpecifies the qualified name of the wsdl:portType element that defines the service being implemented. The value is stored as a QName.
WSDL_OPERATIONSpecifies the qualified name of the wsdl:operation element that corresponds to the operation invoked by the consumer. The value is stored as a QName.
HTTP_RESPONSE_CODESpecifies the response code returned to the consumer. The value is stored as an Integer object.
HTTP_REQUEST_HEADERSSpecifies the HTTP headers on a request. The value is stored as a java.util.Map<String, List<String>>.
HTTP_RESPONSE_HEADERSSpecifies the HTTP headers for the response. The value is stored as a java.util.Map<String, List<String>>.
HTTP_REQUEST_METHODSpecifies the HTTP verb sent with a request. The value is stored as a String.
SERVLET_REQUESTContains the servlet's request object. The value is stored as a javax.servlet.http.HttpServletRequest.
SERVLET_RESPONSEContains the servlet's response object. The value is stored as a javax.servlet.http.HttpResponse.
SERVLET_CONTEXTContains the servlet's context object. The value is stored as a javax.servlet.ServletContext.
PATH_INFO

Specifies the path of the resource being requested. The value is stored as a String.

The path is the portion of the URI after the hostname and before any query string. For example, if an endpoint's URL is http://cxf.apache.org/demo/widgets the path is /demo/widgets.

QUERY_STRING

Specifies the query, if any, attached to the URI used to invoke the request. The value is stored as a String.

Queries appear at the end of the URI after a ?. For example, if a request is made to http://cxf.apache.org/demo/widgets?color the query string is color.

REFERENCE_PARAMETERSSpecifies the WS-Addressing reference parameters. This includes all of the SOAP headers whose wsa:IsReferenceParameter attribute is set to true. The value is stored as a java.util.List.
org.apache.cxf.transport.jms.JMSConstants
JMS_SERVER_HEADERSContains the JMS message headers. For more information see Working with JMS Message Properties.

[a] When using HTTP this property is the same as the standard JAX-WS defined property.


Comments powered by Disqus
loading table of contents...