public class DefaultCxfBinding extends Object implements CxfBinding, org.apache.camel.spi.HeaderFilterStrategyAware
| Constructor and Description |
|---|
DefaultCxfBinding() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addNamespace(Element element,
Map<String,String> nsMap) |
void |
copyJaxWsContext(org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> context)
Copy the javax.xml.ws* headers into cxfExchange's outMessage,
if the cxfExchange has no outMessage, skip this copy
|
protected void |
extractInvocationContextFromCamel(org.apache.camel.Exchange camelExchange,
Map<String,Object> camelHeaders,
Map<String,Object> cxfContext,
String contextKey) |
void |
extractJaxWsContext(org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> context)
Extract the message headers which key are start from javax.xml.ws* from the
CXF exchange's inMessage, and put these headers into the context
|
static Object |
getBodyFromCamel(org.apache.camel.Message out,
DataFormat dataFormat) |
protected static Object |
getContentFromCxf(org.apache.cxf.message.Message message,
DataFormat dataFormat) |
protected String |
getContentTypeString(List<String> values) |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
protected static List<Source> |
getPayloadBodyElements(org.apache.cxf.message.Message message,
Map<String,String> nsMap) |
protected org.apache.cxf.message.MessageContentsList |
getResponsePayloadList(org.apache.cxf.message.Exchange exchange,
List<Source> elements) |
void |
populateCxfRequestFromExchange(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange,
Map<String,Object> requestContext)
This method is called by
CxfProducer.process(Exchange). |
void |
populateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange,
org.apache.cxf.message.Exchange cxfExchange)
This method is called by
CxfConsumer to populate a CXF response exchange
from a Camel exchange. |
void |
populateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange)
This method is called by
CxfConsumer. |
void |
populateExchangeFromCxfResponse(org.apache.camel.Exchange camelExchange,
org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> responseContext)
This method is called by
CxfProducer.process(Exchange). |
protected void |
propagateHeadersFromCamelToCxf(org.apache.camel.Exchange camelExchange,
Map<String,Object> camelHeaders,
org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> cxfContext) |
protected void |
propagateHeadersFromCxfToCamel(org.apache.cxf.message.Message cxfMessage,
org.apache.camel.Message camelMessage,
org.apache.camel.Exchange exchange) |
protected String |
replaceMultiPartContentType(String contentType) |
protected void |
setCharsetWithContentType(org.apache.camel.Exchange camelExchange) |
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy) |
public void populateCxfRequestFromExchange(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange,
Map<String,Object> requestContext)
CxfProducer.process(Exchange). It populates
the CXF exchange and invocation context (i.e. request/response) contexts, it
but does not create and populate a CXF message as a ClientImpl's invoke method
will create a new CXF Message. That method will put all properties from the
CXF exchange and request context to the CXF message.populateCxfRequestFromExchange in interface CxfBindingcxfExchange - exchange to be populatedcamelExchange - exchange that contains a requestrequestContext - a map contains request contexts. This parameter must not
be null. The Client.invoke() method does not allow caller to
pass in a CXF Message. The request context are copied to the CXF Message by the
Client.invoke() method. This is how caller can set properties on the CXF message.public void populateExchangeFromCxfResponse(org.apache.camel.Exchange camelExchange,
org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> responseContext)
CxfProducer.process(Exchange). It propagates
information from CXF Exchange to Camel Exchange. The CXF Exchange contains a
request from a CXF server.populateExchangeFromCxfResponse in interface CxfBindingcamelExchange - exchanged to be populatedcxfExchange - exchange that contains a responseresponseContext - map contains response context from CXFpublic void populateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange)
CxfConsumer.populateExchangeFromCxfRequest in interface CxfBindingcxfExchange - CXF exchange that contains a requestcamelExchange - Camel exchange to be populatedpublic void populateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange,
org.apache.cxf.message.Exchange cxfExchange)
CxfConsumer to populate a CXF response exchange
from a Camel exchange.populateCxfResponseFromExchange in interface CxfBindingcamelExchange - Camel exchange that contains an out messagecxfExchange - CXF exchange to be populatedprotected void setCharsetWithContentType(org.apache.camel.Exchange camelExchange)
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
setHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwareprotected org.apache.cxf.message.MessageContentsList getResponsePayloadList(org.apache.cxf.message.Exchange exchange,
List<Source> elements)
protected void extractInvocationContextFromCamel(org.apache.camel.Exchange camelExchange,
Map<String,Object> camelHeaders,
Map<String,Object> cxfContext,
String contextKey)
camelExchange - cxfContext - Request or Response contextcamelHeaders - contextKey - protected void propagateHeadersFromCxfToCamel(org.apache.cxf.message.Message cxfMessage,
org.apache.camel.Message camelMessage,
org.apache.camel.Exchange exchange)
cxfMessage - camelMessage - exchange - provides context for filteringprotected void propagateHeadersFromCamelToCxf(org.apache.camel.Exchange camelExchange,
Map<String,Object> camelHeaders,
org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> cxfContext)
protected static Object getContentFromCxf(org.apache.cxf.message.Message message, DataFormat dataFormat)
protected static List<Source> getPayloadBodyElements(org.apache.cxf.message.Message message, Map<String,String> nsMap)
public static Object getBodyFromCamel(org.apache.camel.Message out, DataFormat dataFormat)
public void copyJaxWsContext(org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> context)
CxfBindingCopy the javax.xml.ws* headers into cxfExchange's outMessage, if the cxfExchange has no outMessage, skip this copy
copyJaxWsContext in interface CxfBindingcxfExchange - CXF exchange to be populatedcontext - The map which used to store the message headerspublic void extractJaxWsContext(org.apache.cxf.message.Exchange cxfExchange,
Map<String,Object> context)
CxfBindingExtract the message headers which key are start from javax.xml.ws* from the CXF exchange's inMessage, and put these headers into the context
extractJaxWsContext in interface CxfBindingcxfExchange - CXF exchange to be populatedcontext - The map which used to store the message headersApache Camel