public class SimpleCxfRsBinding extends DefaultCxfRsBinding
MessageContentsList
is preserved as the message body.MessageContentsList
is
preserved as the message body.MessageContentsList
.
public Response doAction(BusinessObject request, @HeaderParam("abcd") String abcd, @QueryParam("defg") String defg);MessageContentsList
.
Both request params mapped as IN message headers with names abcd and defg.
public Response doAction(@HeaderParam("abcd") String abcd, @QueryParam("defg") String defg);MessageContentsList
is preserved, even though it only contains the 2 parameters.
public Response doAction(@Multipart(value="body1", type="application/json") BusinessObject request, @Multipart(value="image",
type="image/jpeg") DataHandler image);MessageContentsList
handed over from CXF.
public Response doAction(InputStream abcd);MessageContentsList
and preserved as the IN message body.
public Response doAction(DataHandler abcd);MessageContentsList
and preserved as the IN message body.Modifier and Type | Class and Description |
---|---|
protected static class |
SimpleCxfRsBinding.MethodSpec |
camelToCxfHeaderMap, cxfToCamelHeaderMap
Constructor and Description |
---|
SimpleCxfRsBinding() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindBody(org.apache.camel.Message in,
Object[] paramArray,
int singleBodyIndex)
Binds the message body.
|
protected void |
bindHeadersFromSubresourceLocators(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange)
Transfers path parameters from the full path (including ancestor subresource locators) into Camel IN Message Headers.
|
protected void |
bindParameters(org.apache.camel.Message in,
Object[] paramArray,
String[] paramNames,
int numberParameters)
Binds JAX-RS parameter types (@HeaderParam, @QueryParam, @MatrixParam, etc.) to the exchange.
|
protected Object |
buildResponse(org.apache.camel.Exchange camelExchange,
Object base)
Builds the response for the client.
|
protected Map<String,String> |
filterCamelHeadersForResponseHeaders(Map<String,Object> headers,
org.apache.camel.Exchange camelExchange)
Filters the response headers that will be sent back to the client.
|
Object |
populateCxfRsResponseFromExchange(org.apache.camel.Exchange camelExchange,
org.apache.cxf.message.Exchange cxfExchange)
Populate the CxfRsResponse object from the camel exchange
|
void |
populateExchangeFromCxfRsRequest(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange,
Method method,
Object[] paramArray)
Populate the camel exchange from the CxfRsRequest, the exchange will be consumed
by the processor which the CxfRsConsumer attached.
|
bindCamelHeadersToRequestHeaders, bindCamelMessageBodyToRequestBody, bindResponseHeadersToCamelHeaders, bindResponseToCamelBody, copyMessageHeader, copyOperationResourceInfoStack, copyProtocolHeader, getCamelToCxfHeaderMap, getCxfToCamelHeaderMap, getHeaderFilterStrategy, setCamelToCxfHeaderMap, setCharsetWithContentType, setCxfToCamelHeaderMap, setHeaderFilterStrategy
public void populateExchangeFromCxfRsRequest(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange, Method method, Object[] paramArray)
CxfRsBinding
populateExchangeFromCxfRsRequest
in interface CxfRsBinding
populateExchangeFromCxfRsRequest
in class DefaultCxfRsBinding
cxfExchange
- cxf exchange objectcamelExchange
- camel exchange objectmethod
- the method which is need for the camel componentparamArray
- the parameter list for the method invocationpublic Object populateCxfRsResponseFromExchange(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) throws Exception
CxfRsBinding
populateCxfRsResponseFromExchange
in interface CxfRsBinding
populateCxfRsResponseFromExchange
in class DefaultCxfRsBinding
camelExchange
- camel exchange objectcxfExchange
- cxf exchange objectException
- can be thrown if error in the binding processprotected Object buildResponse(org.apache.camel.Exchange camelExchange, Object base)
Response
object, which gives the user a better control on the response behaviour.
If the message body is already an instance of Response
, we reuse it and just inject the relevant HTTP headers.camelExchange
- base
- protected Map<String,String> filterCamelHeadersForResponseHeaders(Map<String,Object> headers, org.apache.camel.Exchange camelExchange)
DefaultCxfRsBinding
doesn't filter the response headers according to the HeaderFilterStrategy
,
so we handle this task in this binding.protected void bindHeadersFromSubresourceLocators(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange)
protected void bindParameters(org.apache.camel.Message in, Object[] paramArray, String[] paramNames, int numberParameters)
in
- paramArray
- paramNames
- numberParameters
- protected void bindBody(org.apache.camel.Message in, Object[] paramArray, int singleBodyIndex)
in
- paramArray
- singleBodyIndex
- Apache Camel