1 Reply Latest reply on Feb 5, 2014 4:22 AM by trohovsky

    How to parse a header in SwitchYard 1.1?

    jaspervault

      Previously we use SwitchYard 0.8. Now we try to switch to SwitchYard 1.1.  In SwitchYard 0.8, we use org.switchyard.Context.getProperty   to get headers. But in SwitchYard 1.1, everything is changed.  Could someone help me how to find a header in SwitchYard 1.1 ?

       

      Thank you in advance.

        • 1. Re: How to parse a header in SwitchYard 1.1?
          trohovsky

          You can access a property value by:

           

          @Inject

          Context context;

           

          context.getPropertyValue("my-property");

           

          You just need to set ContextMapper to map the property from the input message. This can be done by setting of includes to includes=".*" for mapping of all properties from the message, or includes="my-property" for the concrete one property.