Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10429

CXFRS client requires Exchange.HTTP_URI instead of HTTP_PATH for Camel tranport

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.18.0
    • Fix Version/s: 2.18.1, 2.19.0
    • Component/s: camel-cxfrs
    • Labels:
      None
    • Estimated Complexity:
      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

        1. camel-cxf-transport.zip
          8 kB
          Tadayoshi Sato

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                tadayosi Tadayoshi Sato
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: