Interface CxfBinding
Exchange and Camel
Exchange.
Assumptions: CxfProducer and CxfConsumer set DataFormat and
BindingOperationInfo in Camel Exchange property before calling into these
methods.- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidcopyJaxWsContext(org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> context) Copy the jakarta.xml.ws* headers into cxfExchange's outMessage, if the cxfExchange has no outMessage, skip this copyvoidextractJaxWsContext(org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> context) Extract the message headers which key are start from jakarta.xml.ws* from the CXF exchange's inMessage, and put these headers into the contextvoidpopulateCxfRequestFromExchange(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange, Map<String, Object> requestContext) Populate a CXF Exchange from a Camel Exchange.voidpopulateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) Populate a CXF Exchange from a Camel Exchange.voidpopulateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange) Populate a Camel Exchange from a CXF Exchange, which is an incoming request from a CXF client.voidpopulateExchangeFromCxfResponse(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> responseContext) Populate a Camel Exchange from a CXF Exchange, which is a an incoming response from a CXF server.
-
Method Details
-
populateCxfRequestFromExchange
void populateCxfRequestFromExchange(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange, Map<String, Object> requestContext) Populate a CXF Exchange from a Camel Exchange. The resulted CXF Exchange is an outgoing request to be sent to CXF server. This method is called by
to process a Camel Exchange for invoking an CXF web service operation. Note that information is populated to CXF Exchange and the request context, which are passed as arguments to the CXF API's Client.invoke() method. The arguments to the web service operation are extracted from the Camel IN message body by CxfProducer.invalid reference
CxfProducer#process(org.apache.camel.Exchange)Exchange is passed in this direction: Camel route => CxfProducer => apply this binding method => CXF server
- Parameters:
cxfExchange- 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.
-
populateExchangeFromCxfResponse
void populateExchangeFromCxfResponse(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange, Map<String, Object> responseContext) Populate a Camel Exchange from a CXF Exchange, which is a an incoming response from a CXF server. This method is called by
after it makes an invocation to the Client.invoke() method. It calls this method to translate the CXF response message to Camel message.invalid reference
CxfProducerExchange is passed in this direction: Camel route invalid input: '<'= apply this binding method invalid input: '<'= CxfProducer invalid input: '<'= CXF Server
- Parameters:
camelExchange- exchanged to be populatedcxfExchange- exchange that contains a responseresponseContext- map contains response context from CXF
-
populateExchangeFromCxfRequest
void populateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange) Populate a Camel Exchange from a CXF Exchange, which is an incoming request from a CXF client. This method is called by
to handle a CXF request arrives at an endpoint. It translates a CXF request to a Camel Exchange for Camel route to process the exchange.invalid reference
CxfConsumerExchange is passed in this direction: CXF Endpoint => CxfConsumer => apply this binding method => Camel route
- Parameters:
cxfExchange- CXF exchange that contains a requestcamelExchange- Camel exchange to be populated
-
populateCxfResponseFromExchange
void populateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) Populate a CXF Exchange from a Camel Exchange. The resulted CXF Exchange is an outgoing response to be sent back to the CXF client. This method is called by
to translate a Camel Exchange to a CXF response Exchange.invalid reference
CxfConsumerExchange is passed in this direction: CXF Endpoint invalid input: '<'= apply this binding method invalid input: '<'= CxfConsumer invalid input: '<'= Camel route
- Parameters:
camelExchange- Camel exchange that contains an out messagecxfExchange- CXF exchange to be populated
-
extractJaxWsContext
Extract the message headers which key are start from jakarta.xml.ws* from the CXF exchange's inMessage, and put these headers into the context
- Parameters:
cxfExchange- CXF exchange to be populatedcontext- The map which used to store the message headers
-
copyJaxWsContext
Copy the jakarta.xml.ws* headers into cxfExchange's outMessage, if the cxfExchange has no outMessage, skip this copy
- Parameters:
cxfExchange- CXF exchange to be populatedcontext- The map which used to store the message headers
-