Transport Headers Action Properties

In a message flow, use a transport header action to set header values in messages.

In the Message Flow Editor, click a transport headers action to display its properties in the Properties view. Use these properties pages to configure the selected transport headers action. The pages are:

The Transport Header page has the following options:

Option
Description
Direction
  1. From the Set Transport Headers for list, select one of the following, to specify to the run time which of the message context locations are to be modified:
    • Outbound Request - Select this option to set header values for outbound requests (the messages sent out by a proxy service in route, publish, or service callout actions). This header element is located in the message context as follows:
    • $outbound/ctx:transport/ctx:request/tp:headers

    • Inbound Response - Select this option to set header values for inbound responses (the response messages a proxy service sends back to clients). This header element is located in the message context as follows:
    • $inbound/ctx:transport/ctx:response/tp:headers

Pass All Headers
Select this option to pass all headers through from the inbound message to the outbound message or vice versa. Every header in the source set of headers will be copied to the target header set, overwriting any existing values in the target header set.
Headers
Click Add Header to add a header to the Headers table. Then configure each header as described in the following rows.
You can add as many headers as necessary to this table. You do not have to order the headers in the table, because the run time declares namespaces and places header elements in their proper order when generating the corresponding XML.
Headers: Name:
Specify a header by doing either of the following:
  • From the drop-down list in the Name column, select a header name. The list contains all of the predefined header names for the target transport (for example, Content-Type for HTTP transports, JMSCorrelationID for JMS transports, etc.).
  • Enter a header name in the Other field. If that header name is not one of the predefined headers for this service's transport, it becomes a user-header, as defined by the transport specification.
Headers: Action
Select one of the options in this column to specify how to set the header's value:
  • Set Header to Expression
  • Selecting this option allows you to use an XQuery or XSLT expression to set the value of the header. The expression can be simple (for example, "text/xml") or a complex XQuery or XSLT expression.

    Because the ALSB transport layer defines the XML representation of all headers as string values, the result of any expression is converted to a string before the header value is set. Expressions that return nothing result in the header value being set to the empty string. You cannot delete a header using an expression.

    Warning: Not all of the header settings you can specify in this action are honored at run time.

  • Delete Header
  • Specifies that the header is removed from the request or response metadata.

    Copy Header from Inbound Request (if you are setting transport headers for the Outbound Request)
          or
    Copy Header from Outbound Response (if you are setting transport headers for the Inbound Response)

    Specifies that this header is copied directly from the corresponding header of the same name from the inbound message to the outbound message and vice versa. For example, if you want to set the SOAPAction header for an outbound request, selecting Copy Header from Inbound Request causes the run time to copy the value from the SOAPAction request header of $inbound. In the case of inbound response headers, the source of the header to copy is the response headers of $outbound.

    If the Copy Header... option is selected for a header that does not exist in the source, this option is ignored and no action is performed on the target for this header.

Use the Comment page to add a comment, if desired:

Use the Namespaces page to see a list of defined namespaces or to create a new one.

Use the Variables page to see a list of defined context variables or to create a new one. For more information about context variables, see Message Context in the AquaLogic Service Bus User Guide.