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

Cannot use custom DataFormats in REST DSL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.14.0
    • 2.14.1, 2.15.0
    • camel-core
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: