Set Message Type 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.)

Message field refinements typeMap

Use the Message field refinements property to specify which fields in the message are refined by more specific typing information. By default, this property is empty.

Generally, refine fields that are defined by the following XML schema weak types: xsd:any, xsd:anyType, xsd:anySimpleType, and fields that are defined to be replaceable using substitution groups. You specify the XPath of the message field you want to refine, and the data type to use. IBM Integration Designer provides a graphical interface to help you specify the XPath and data type. You can specify refinements for more than one message field, but duplicate entries for the same message field are not allowed.
Weakly typed field path
Specify the XPath of the weakly-typed field you want to refine.
Actual field type assertedType
Specify the data type you want to use for the refinement.

Reset message type resetMessageTypes

If true, causes the current mediation primitive to reset Message field refinements information from previous Set Message Type mediation primitives.

Field detail Value and notes
Required Yes
Valid values Boolean
Note:
Default false

Validate validateInput

If true, causes the Set Message Type mediation primitive to perform runtime validation. The validation includes all message fields and not just those that you have overlaid.

If there is a mismatch, an exception occurs and the fail terminal propagates the original message, and stores the exception information in the failInfo element of the SMO. The exception information stored is the text of message CWSXM3802. For example, CWSXM3802E: The type at /body/operation1/input1/float is 'string', while the asserted type states it should be 'float'.
Field detail Value and notes
Required Yes
Valid values Boolean
Note:
Default false

Considerations

  • At run time, the Set Message Type mediation primitive does not affect the real structure or content of a message. The Set Message Type mediation primitive makes it easier for you to manipulate messages.
  • The Validate property is the only promotable property of the Set Message Type mediation primitive. Because the Validate property is promotable the runtime administrator can turn validation on and off.

Sample XML code

<node name="SetMessageType" type="SetMessageType">
  <table name="typeMap">
    <row>
      <property name="path" value="/body"/>
      <property name="assertedType" value="{http://TestMod/myInterface}myRequestMsg"/>
    </row>
  </table>
  <inputTerminal/>
  <outputTerminal type="myInterface:myRequestMsg">
    <refinement path="/body" type="myInterface:myRequestMsg"/>
    <wire targetNode="BOMapper1"/>
  </outputTerminal>
  <failTerminal/>
</node>