Adding Transport Header Actions

Use a transport header action to set the header values in messages.

  1. Navigate to where you want to add the action, as described in Adding and Editing Actions in Message Flows.
  2. Click the appropriate icon, then select Add an Action > Communication > Transport Headers.
  3. 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

  4. Optionally, select Pass all Headers through Pipeline 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.
  5. For information about using this option in conjunction with the header-specific pass through option, see Configuring Transport Headers in Message Flows in AquaLogic Service Bus User Guide.

  6. Complete the following steps for each Header you want to add:
    1. In the Transport Headers table, click Add Header to display fields for configuring the header.
    2. 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.
    3. Select one of the options in the Action column to specify how to set the headers value:
    4. 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: Warning: Not all of the header settings you can specify in this action are honored at run time.For information about which of the headers for a given transport you can set and which of those set are honored at run time, see Configuring Transport Headers in Message Flows in AquaLogic Service Bus User Guide.

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.

For information about using this option in conjunction with the global Pass all Headers through Pipeline option, see Configuring Transport Headers in Message Flows in AquaLogic Service Bus User Guide.

  1. To add additional Headers to the table, click the  Header icon, then click Add Header.
  2. The table is expanded to include an additional row, which includes a new set of options that you can use to configure another transport header. 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.

After you finish

When you complete the configuration of this action, continue by configuring other actions or by saving your configuration, as described in Adding and Editing Actions in Message Flows.