HTTP Header Setter mediation primitive properties
You can specify values for mediation primitive properties
either by using the property fields in the IBM® Integration
Designer user interface or by
using an XML format. The property field names displayed in IBM Integration
Designer are generally
different from the property names used when building a mediation flow using XML code. In the
following information, icons are used to identify each property name used in IBM Integration
Designer and the corresponding
XML name. (Where applicable, XML names that are required, but not shown in IBM Integration
Designer, are also
described.)
HTTP Header Elements headerElements
HTTP Header elements on an SMO node.
- Mode mode
-
- If you want to create a new HTTP header, the Mode property must be set to 'Create'.
- If you want to search for a HTTP header and then modify the value of any header that is found, or create a new header if none are found, the Mode property must be set to 'Modify'.
- If you want to search for a HTTP header and then copy the first found header to another location in the SMO, the Mode property must be set to 'Copy'.
- If you want to search for a HTTP header and then delete any headers that are found, the Mode property must be set to 'Delete'.
- Header Name headerName
- You can specify a HTTP header field name; any HTTP headers in the SMO that has a matching name can then be modified, copied, or deleted.
- Set Value using XPath valueIsXPath
- Determine whether the Value to set should be a literal value or an XPath expression that identifies a source value to copy into the HTTP header at run time. This property is used only when the Mode property is set to 'Create' or 'Modify'. The valid type is Boolean: true or false (the default).
- Value value
- If the Mode property is set to 'Create' or
'Modify', the Value property should be set to a HTTP header literal value or an XPath expression
that identifies a value to copy into the HTTP header at run time. When a new HTTP header is created
or a matching HTTP header is found, this new value is set in the specified field.
If the Mode property is set to 'Copy', the Value property should be an XPath 1.0 expression, identifying the target element to where the first found HTTP header will be copied.
If the Mode property is set to 'Delete', the Value property should not be set.
Validate input validateInput
If true, causes the input message to be validated before the mediation is performed.
- Required
- Yes
- Valid values
- BooleanNote:
- Default
- false
Considerations
- If the Mode property is "Modify" and a header cannot be found, a new header will be created.
- If the XPath expression of the copy target resolves to more than one element in the SMO, a runtime exception occurs.
- The location of the header within the SMO depends upon its type; control, spec or user.
- If the Validate input property is true and the input message is invalid, a runtime exception occurs.
Sample XML code
<node displayName="addHeader" name="addHeader2" type="HTTPHeaderSetter">
<table name="headerElements">
<row>
<property name="mode" value="Create"/>
<property name="headerName" value="Method"/>
<property name="valueIsXPath" value="false"/>
<property name="value" value="POST"/>
</row>
</table>
<inputTerminal/>
<outputTerminal>
<wire targetNode="nextNode"/>
</outputTerminal>
<failTerminal/>
</node>
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15