public interface CxfBinding
Exchange and Camel
Exchange.
Assumptions: CxfProducer and CxfConsumer set DataFormat and
BindingOperationInfo in Camel Exchange property before calling into these
methods.| Modifier and Type | Method and Description |
|---|---|
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
|
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
|
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.
|
void |
populateCxfResponseFromExchange(org.apache.camel.Exchange camelExchange,
org.apache.cxf.message.Exchange cxfExchange)
Populate a CXF Exchange from a Camel Exchange.
|
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.
|
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.
|
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 CxfProducer.process(org.apache.camel.Exchange) 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.
Exchange is passed in this direction: Camel route => CxfProducer => apply this binding method => CXF server
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.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 CxfProducer after it makes an invocation to the Client.invoke() method. It calls this
method to translate the CXF response message to Camel message.
Exchange is passed in this direction: Camel route <= apply this binding method <= CxfProducer <= CXF Server
camelExchange - exchanged to be populatedcxfExchange - exchange that contains a responseresponseContext - map contains response context from CXFvoid 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 CxfConsumer 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.
Exchange is passed in this direction: CXF Endpoint => CxfConsumer => apply this binding method => Camel route
cxfExchange - CXF exchange that contains a requestcamelExchange - Camel exchange to be populatedvoid 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 CxfConsumer to translate a Camel Exchange to a CXF
response Exchange.
Exchange is passed in this direction: CXF Endpoint <= apply this binding method <= CxfConsumer <= Camel route
camelExchange - Camel exchange that contains an out messagecxfExchange - CXF exchange to be populatedvoid 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
cxfExchange - CXF exchange to be populatedcontext - The map which used to store the message headersvoid 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
cxfExchange - CXF exchange to be populatedcontext - The map which used to store the message headersApache Camel