Results 1 to 3 of 3

Thread: Is there any header-transformer in Spring Integration?

  1. #1
    Join Date
    Dec 2010
    Location
    Tehran
    Posts
    48

    Unhappy Is there any header-transformer in Spring Integration?

    a transformer may be used to add, remove, or modify the Message's header values
    Said in Spring Integration documentation.
    I find header-enricher, header-filter namespace support for add and remove but no header-transfer for modification.

    The oddest behavior of header-enricher is that it doesn't allow to change an existent header.

    What is suitable solution except definition of a transformer class with a method that have Message return type?

  2. #2
    Join Date
    Dec 2010
    Location
    Tehran
    Posts
    48

    Default

    BTW header-enricher has an "overwrite" (and a corresponding property in HeaderEnricher class) but when I use it, see below exception:

    Code:
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'overwrite' is not allowed to appear in element 'integration:header-enricher'.

  3. #3
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    The "overwrite" attribute is available on individual <header> sub-elements of the header-enricher. On the <header-enricher> element itself, you can set the "default-overwrite" which is FALSE by default. If you simply want all headers to replace any existing ones, then set "default-overwrite" to "true".

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •