Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.18.0
-
None
-
Unknown
Description
The camel-cxfrs doc writes that HTTP_PATH is required for camel-cxfrs producer when it's used with httpClientAPI option.
The CXF JAXRS front end also provides a http centric client API. You can also invoke this API from camel-cxfrs producer. You need to specify the HTTP_PATH and the HTTP_METHOD and let the producer use the http centric client API by using the URI option httpClientAPI or by setting the message header CxfConstants.CAMEL_CXF_RS_USING_HTTP_API.
However, when Camel transport is used between CXFRS producer and consumer, the invocation succeeds only if it sets HTTP_URI, not HTTP_PATH, to the header.
from("direct:input.camel") .setHeader(Exchange.HTTP_METHOD, constant("GET")) .setHeader(Exchange.CONTENT_TYPE, constant("text/plain")) .setHeader(Exchange.HTTP_URI, simple("/greeting/hello/${body}")) //.setHeader(Exchange.HTTP_PATH, simple("/greeting/hello/${body}")) // <- fails .inOut("cxfrs:bean:rsClient");
Otherwise it fails with 404 error.
Attachments
Attachments
Issue Links
- is related to
-
CAMEL-10446 Need to consolidate header mapping logic between Camel and CXF messages
- Resolved
- links to