What mapping operations or transforms can I use to transform a message ?

 View Only
Mon June 01, 2020 09:30 AM


In WebSphere Message Broker v8 and IBM Integration Bus v9, you can use transforms, cast (xs:<type>) functions, and use XPath 2.0 functions to perform different actions on input data and move the result to the output element. You can also use a Cast function to cast schema types. You choose the appropriate mapping operation depending on the result that you want to achieve.

You can use any of the following transforms to map graphically your data in the Graphical Data Mapping editor:
  • Core mapping transforms: You can use built-in structural and functional mapping operations, which enable you to graphically construct the required message transformations to build the output message.
  • Custom transforms: You can use custom transformations to build your own XPath 2.0, Java™, or ESQL functions, which can be invoked to perform specialized transformations within the message map.
  • XPath functions (fn:<functionName>): You can use XPath 1.0 and XPath 2.0 functions to transform data in a message map.
  • Database transforms:
    • You can use the Select transform to query one or more database tables, and retrieve data that you can use in the message map to set output element values, define conditions, or use as input to build other transforms conditions. Database tables can be set as additional outputs of a message map.
    • You can use a database routine transform to call a stored procedure or user-defined function from a database, and retrieve data that you can use in the message map to set output element values, define conditions, or use as input to build other transforms conditions.
      Note: Only IBM® DB2® stored procedures are supported in IBM Integration Bus.

Transforms that support conditional control can use XPath 2.0 expressions, or invoke Java or ESQL functions.

Note: XPath 1.0 functions are valid XPath 2.0 expressions. You can use the XPath Expression Builder to generate simple XPath 1.0 expressions.

Cast function to define a schema type

In the Graphical Data Mapping editor, you can use the Cast function to cast schema types.

You must cast a schema in any of the following instances:
  • Cast the value that you assign to an output element so it matches the output element schema definition type.
  • Cast the value of an element that you use as a parameter to a function where the parameter is of a different type.
  • Cast the value of an element that you use as a condition on a transform where the type is different.
  • Cast the value of an element when you work with a database, and the types differ.

You use the xs:<type> functions where <type> is the name of the type for the result.  These functions are also know as XML constructor functions.

Look for future entries using casts with xsd:extension and xsd:restriction.


#MQSI
#graphicaldatamapping
#Transforms