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

Calling getBody(String.class) can break a simple Camel CXF proxy route

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.16.3
    • Fix Version/s: 2.16.4
    • Component/s: camel-cxf
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      A simple CXF proxy route like this works:
      from("cxf://http://localhost:8122/myservice_proxy?dataFormat=PAYLOAD&wsdlURL=classpath:/DemoService_0.1.wsdl")
      .to("cxf://http://localhost:8121/myservice?dataFormat=PAYLOAD&wsdlURL=classpath:/DemoService_0.1.wsdl")

      If you add a processor that simply reads the body then resulting route above will always return an empty body:
      .process(new Processor() {

      @Override
      public void process(Exchange exchange) throws Exception

      { exchange.getIn().getBody(String.class); }

      })

      I suspect this is a bug in the new stream caching as the code works in camel 2.15.x and the main difference in 2.16 is the added CachedCxfPayload.
      I will add a small github repo that shows the issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ay Akitoshi Yoshida
                Reporter:
                cschneider Christian Schneider
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: