Monday, February 21, 2022

Headers and Exchange Properties

Message Header:

This is transferred as part of Message Headers.

If using an HTTP-based receiver adapter, these parameters are converted to HTTP headers and transferred as such to the receiver.

Content Modifier helps to manipulate the Headers transmitted to the Receiver system.

-----------------------------------------------------------------------------------------------------------------------------

Note: If the message header exceeds a certain value, the receiver may not be able to accept the inbound call (this applies to all HTTP-based receiver adapters). The limiting value depends on the characteristics of the receiver system, but typically ranges between 4 and 16 KB. To overcome this issue, you can use a subsequent Content Modifier step to delete all headers that are not supposed to be part of the outbound message.

-----------------------------------------------------------------------------------------------------------------------------

Exchange Property:

Its like a Data Container.  

Not transmitted to the Receiver system (scope is only within the iFlow)

Use cases:

To access certain element in the payload to derive some data.

To define some placeholders and depending on the content of the message, it will be set dynamically.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for Message Splitting:

  • CamelSplitIndex

Provides a counter for split items that increases for each Exchange that is split (starts from 0).●

  • CamelSplitSize

Provides the total number of split items (if you are using stream-based splitting, this header is only provided for the last item, in other words, for the completed Exchange).●

  • CamelSplitComplete

Indicates whether an Exchange is the last split.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for Content Encoding

  • CamelCharsetName

Specifies the character encoding to be applied for message processing.

Is relevant for content encoding steps.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for the HTTP and HTTPS Adapter

  • CamelHttpUri

Overrides the existing URI set directly in the endpoint.

This header can be used to dynamically change the URI to be called.


  • CamelHttpUrl

Refers to the complete URL called, without query parameters.

For example, CamelHttpUrl=https://test.bsn.neo.ondemand.com/http/hello.


  • CamelHttpQuery

Refers to the query string that is contained in the request URL.

In the context of a receiver adapter, this header can be used to dynamically change the URI to be called.

For example, CamelHttpQuery=abcd=1234.


  • CamelHttpMethod

Refers to the incoming method names used to make the request. These methods are GET, POST, PUT, DELETE, and so on.


  • CamelServletContextPath

Refers to the path specified in the address field of the channel.

For example, if the address in the channel is /abcd/1234, then CamelServletContextPath is /abcd/1234.


  • CamelHttpResponseCode

This header can be used to manually set the HTTP response code.


  • Content-Type

HTTP content type that fits to the body of the request.

The content type is composed of two parts: a type and a subtype.

For example, image/jpeg (where image is the type and jpeg is the subtype).

Examples:  text/plain for unformatted text

text/html for text formatted with HTML syntax

image/jpeg for a jpeg image file

application/json for data in JSON format to be processed by an application that requires this format

-----------------------------------------------------------------------------------------------------------------------------

Note:

If transferring text/* content types, you can also specify the character encoding in the HTTP header using the charset parameter.

Here is an example of such a header:Content-Type: text/html; charset=utf-8

The default character encoding that will be applied for text/* content types depends on the HTTP version: us-ascii for HTTP 1.0 and iso-8859-1 for HTTP 1.1.

Text data in string format is converted using UTF-8 by default during message processing. If you want to override this behavior, you can use the Content Modifier step and specify the CamelCharsetName Exchange property. To avoid encoding issues when using this feature together with the HTTP adapter, consider the following example configuration:

If you use a Content Modifier step and you want to send iso-8859-1-encoded data to a receiver, make sure that you specify the CamelCharsetName Exchange property (either header or property) as iso-8859-1. For the Content-Type HTTP header, use text/plain; charset=iso-8859-1.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for the SFTP Adapter

  • CamelFileName

Overrides the existing file and directory name that is set directly in the endpoint.

This header can be used to dynamically change the name of the file and directory to be called.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for the Mail Adapter

  • Subject

Specifies the subject of the e-mail message.

  • To

Specifies the e-mail address that the message is sent to.

  • Cc

Specifies the additional e-mail address that the message is sent to.

  • From

Specifies the e-mail address that the message comes from.

  • Date

Specifies the date and time when the e-mail was sent.

  • Content-Type

Specifies the format of the e-mail (html or plaintext)

  • Message-ID

Specifies the ID that the mail system assigned to the e-mail when it was first created.

  • Reply-to

Specifies the message ID of the message that this e-mail is a reply to.

  • Sender

Specifies the actual sender (acting on behalf of the e-mail address stated in the From header).

  • Archived-At

Specifies a link to the archived form of an e-mail.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for the Aggregator Step

  • CamelAggregatedCompletedBy

This header is relevant for use cases with message aggregation.

The header attribute can only have one of the following values:

  • timeout

Processing of the aggregate has been stopped because the configured Completion Timeout has been reached.

  • predicate

Processing of the aggregate has finished because the Completion Condition has been met.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for JMS Messages

  •  JMSTimestamp

Specifies the time when a JMS message was created.

-----------------------------------------------------------------------------------------------------------------------------

Headers Relevant for the SOAP (SOAP 1.x), SOAP (SAP RM), and IDoc Adapter

  •  SOAPAction Header

This header is part of the Web service specification.

  • SapAuthenticatedUserName

Contains the user name of the client that calls the integration flow.

If the sender channel is configured to use client certificate authentication, no such header is set (as it is not available in this case)

  • SapIDocType <XML Response>

The adapter parses the XML Response and generates the SapIdocType header from it.

An example header would be:

  • SapIDocType WPDTAX01.
  • SapIDocType <XML Response>

An example header would be:

  • SapIDocType WPDTAX01

-----------------------------------------------------------------------------------------------------------------------------


No comments:

Post a Comment