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

Cannot use custom DataFormats in REST DSL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.14.0
    • Fix Version/s: 2.14.1, 2.15.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      See: http://camel.465427.n5.nabble.com/RestBindingProcessor-JSON-Data-Format-Config-td5757103.html

      When using custom JSON data format in REST DSL, the service incorrectly rejects messages with request structure and accepts messages with response structure.

      This is due to org.apache.camel.model.rest.RestBindingDefinition.createProcessor(RouteContext) looking up and configuring the same DataFormat object twice:

      DataFormat json = context.resolveDataFormat(name); 
      DataFormat outJson = context.resolveDataFormat(name); 
      

        Attachments

        1. camel-rest-dataformat-test.groovy
          2 kB
          Sohrab Hosseini

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                sohrab Sohrab Hosseini
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: