Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-2969

Property mapping in SOAPContextMapper not working as documented

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.1.0
    • Fix Version/s: 3.0
    • Component/s: component-soap
    • Labels:
      None

      Description

      As per the documentation, http headers should be mapped into the SwitchYard Context as Scope.MESSAGE properties, and back.

      However, on the way in, http headers are mapped as Scope.MESSAGE and Scope.EXCHANGE properties. This is caused by the changes for SWITCHYARD-2828, and the added call to the copyHttpHeadersToContext function:
      https://github.com/jboss-switchyard/switchyard/blob/master/components/soap/src/main/java/org/switchyard/component/soap/composer/SOAPContextMapper.java#L111

      This is redundant, and not aligned with the documentation.

      On the way out, properties from both scopes are added as http headers:
      https://github.com/jboss-switchyard/switchyard/blob/master/components/soap/src/main/java/org/switchyard/component/soap/composer/SOAPContextMapper.java#L158
      https://github.com/jboss-switchyard/switchyard/blob/master/core/bus/camel/src/main/java/org/switchyard/bus/camel/CamelCompositeContext.java#L112-L117

      This has the negative side effect that if the same property is contained in both the MESSAGE and the EXCHANGE context, but with different values, it is non-deterministic which one ends up in the http headers, due to the usage of a HashSet. This can be reproduced with the attached sample application (running the junit tests succeeds sometimes, and fails at other times).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tcunning Thomas Cunningham
                  Reporter:
                  mputz Martin Weiler
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: