Class DefaultCxfBinding
java.lang.Object
org.apache.camel.component.cxf.jaxws.DefaultCxfBinding
- All Implemented Interfaces:
org.apache.camel.component.cxf.common.CxfBinding,org.apache.camel.spi.HeaderFilterStrategyAware
public class DefaultCxfBinding
extends Object
implements org.apache.camel.component.cxf.common.CxfBinding, org.apache.camel.spi.HeaderFilterStrategyAware
The Default CXF binding implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddNamespace(Element element, Map<String, String> nsMap) voidcopyJaxWsContext(org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> context) protected voidextractInvocationContextFromCamel(org.apache.camel.Exchange camelExchange, Map<String, Object> camelHeaders, Map<String, Object> cxfContext, String contextKey) voidextractJaxWsContext(org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> context) static MethodfindMethod(Class<?> cls, String name, Class<?>... params) static ObjectgetBodyFromCamel(org.apache.camel.Message out, org.apache.camel.component.cxf.common.DataFormat dataFormat) protected static ObjectgetContentFromCxf(org.apache.cxf.message.Message message, org.apache.camel.component.cxf.common.DataFormat dataFormat, String encoding) protected StringgetContentTypeString(List<String> values) org.apache.camel.spi.HeaderFilterStrategygetPayloadBodyElements(org.apache.cxf.message.Message message, Map<String, String> nsMap) protected org.apache.cxf.message.MessageContentsListgetResponsePayloadList(org.apache.cxf.message.Exchange exchange, List<Source> elements) voidpopulateCxfHeaderFromCamelExchangeBeforeCheckError(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) This method is called byCxfConsumerto populate a CXF response protocol headers from a Camel exchange headers before CheckError.voidpopulateCxfRequestFromExchange(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange, Map<String, Object> requestContext) This method is called byCxfProducer.process(Exchange).voidpopulateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) This method is called byCxfConsumerto populate a CXF response exchange from a Camel exchange.voidpopulateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange) This method is called byCxfConsumer.voidpopulateExchangeFromCxfResponse(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> responseContext) This method is called byCxfProducer.process(Exchange).protected voidpropagateHeadersFromCamelToCxf(org.apache.camel.Exchange camelExchange, Map<String, Object> camelHeaders, org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> cxfContext) protected voidpropagateHeadersFromCxfToCamel(org.apache.cxf.message.Message cxfMessage, org.apache.camel.Message camelMessage, org.apache.camel.Exchange exchange) protected StringreplaceMultiPartContentType(String contentType) protected voidsetCharsetWithContentType(org.apache.camel.Exchange camelExchange) voidsetHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
-
Constructor Details
-
DefaultCxfBinding
public DefaultCxfBinding()
-
-
Method Details
-
populateCxfRequestFromExchange
public void populateCxfRequestFromExchange(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange, Map<String, Object> requestContext) This method is called byCxfProducer.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.- Specified by:
populateCxfRequestFromExchangein interfaceorg.apache.camel.component.cxf.common.CxfBinding
-
populateExchangeFromCxfResponse
public void populateExchangeFromCxfResponse(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> responseContext) This method is called byCxfProducer.process(Exchange). It propagates information from CXF Exchange to Camel Exchange. The CXF Exchange contains a request from a CXF server.- Specified by:
populateExchangeFromCxfResponsein interfaceorg.apache.camel.component.cxf.common.CxfBinding
-
populateExchangeFromCxfRequest
public void populateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange) This method is called byCxfConsumer.- Specified by:
populateExchangeFromCxfRequestin interfaceorg.apache.camel.component.cxf.common.CxfBinding
-
populateCxfHeaderFromCamelExchangeBeforeCheckError
public void populateCxfHeaderFromCamelExchangeBeforeCheckError(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) This method is called byCxfConsumerto populate a CXF response protocol headers from a Camel exchange headers before CheckError. Ensure can send protocol headers back even error/exception thrown -
populateCxfResponseFromExchange
public void populateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) This method is called byCxfConsumerto populate a CXF response exchange from a Camel exchange.- Specified by:
populateCxfResponseFromExchangein interfaceorg.apache.camel.component.cxf.common.CxfBinding
-
setCharsetWithContentType
protected void setCharsetWithContentType(org.apache.camel.Exchange camelExchange) -
getHeaderFilterStrategy
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()- Specified by:
getHeaderFilterStrategyin interfaceorg.apache.camel.spi.HeaderFilterStrategyAware
-
setHeaderFilterStrategy
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy) - Specified by:
setHeaderFilterStrategyin interfaceorg.apache.camel.spi.HeaderFilterStrategyAware
-
getResponsePayloadList
-
extractInvocationContextFromCamel
protected void extractInvocationContextFromCamel(org.apache.camel.Exchange camelExchange, Map<String, Object> camelHeaders, Map<String, Object> cxfContext, String contextKey) - Parameters:
camelExchange-cxfContext- Request or Response contextcamelHeaders-contextKey-
-
propagateHeadersFromCxfToCamel
protected void propagateHeadersFromCxfToCamel(org.apache.cxf.message.Message cxfMessage, org.apache.camel.Message camelMessage, org.apache.camel.Exchange exchange) - Parameters:
cxfMessage-camelMessage-exchange- provides context for filtering
-
replaceMultiPartContentType
-
getContentTypeString
-
propagateHeadersFromCamelToCxf
-
getContentFromCxf
-
addNamespace
-
getPayloadBodyElements
-
getBodyFromCamel
public static Object getBodyFromCamel(org.apache.camel.Message out, org.apache.camel.component.cxf.common.DataFormat dataFormat) -
copyJaxWsContext
public void copyJaxWsContext(org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> context) - Specified by:
copyJaxWsContextin interfaceorg.apache.camel.component.cxf.common.CxfBinding
-
extractJaxWsContext
public void extractJaxWsContext(org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> context) - Specified by:
extractJaxWsContextin interfaceorg.apache.camel.component.cxf.common.CxfBinding
-
findMethod
-