Announcement Announcement Module
Collapse
No announcement yet.
Filtering headers added by HTTP inbound adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Filtering headers added by HTTP inbound adapter

    Is it possible to filter out all the extra headers that are added by a http-inbound adapter? I'm having a JMS outbound adapter on the downstream flow, and it is throwing exceptions such as 'The property name User-Agent is not a valid Java identifier' which occur, I believe, when it tries to map the SI headers to JMS headers.

  • #2
    Sure you have two options. You can either be restrictive in the mapped-request-headers of the adapter itself (as opposed to the default which takes all "standard" headers), or you can add a <header-filter> to the flow.

    Hope that helps.
    -Mark

    Comment


    • #3
      I think I'll go with <int:header-filter/>.
      Code:
      <int:header-filter header-names="*"  />
      From the docs, I find that there is a setPatternMatch() method that will enable me to use '*' wildcard, but does this have xml namespace support?

      Also, if * is used, would it remove the standard SI headers as well?

      Edit: When I use http://www.springframework.org/schem...ntegration.xsd as the schema location, I cannot find patternMatch as an attribute for <int:header-filter> ; changing the location to http://www.springframework.org/schem...ration-2.1.xsd, it appears. Any idea why?
      Last edited by binz84; Apr 24th, 2012, 03:55 PM.

      Comment


      • #4
        Looks like patternMatch is true by default.

        https://github.com/SpringSource/spri...-2.1.xsd#L1875

        I think this should make to the reference doc.

        Comment

        Working...
        X