XML One-Way Bridge: Configure the Encode Stage
Updated: November 21, 2013
|This stage applies to XML One-Way Bridge only. It does not apply to XML Request-Reply Bridges.|
As part of the Encode stage, you can specify the flat-file schema to use for converting an XML message into a flat-file message. By the time a message reaches the Encode stage, it is already in the XML format. Depending on how the Encode stage is configured, the message is either encoded to a flat-file format or sent out as an XML message.
This topic lists the steps on how to configure the Encode stage.
Configure the Encode stage
Add the flat-file schemas to the project, if not already added. You can either choose to add an existing schema or create a new schema, as explained in To add a flat-file schema to an Enterprise Application Integration project.
Double-click the XML One-Way Bridge to open the itinerary designer.
Select the Encode stage. In Properties, set the IsEnabled property to True or False. If True, the stage uses the flat-file schemas that you specify for encoding the XML message to a flat-file message. If False, there is no encoding and the XML message is sent out from the bridge.
To include any custom code that executes before the message enters this stage, set the On Enter Inspector property. See How to Include Custom Code in Bridges.
To include any custom code that executes after the message exits this stage, set the On Exit Inspector property. See How to Include Custom Code in Bridges.
- To include any custom code that executes before the message enters this stage, set the On Enter Inspector property. See How to Include Custom Code in Bridges.
Within the Encode stage, select the Flat File Encode activity. In Properties, click the ellipsis button (…) against the Flat File Schemas property to open the Flat File Schema Selection dialog box.
From the list of flat-file schemas displayed in the dialog box, select the schemas that you want to use to encode the XML message to a flat-file message, and then click OK. At run time when an XML message reaches the Flat File Encode activity, the message type (Namespace#Root) is mapped against the flat file schemas provided as part of the activity configuration. If a match occurs, then that schema is used to convert the XML message to a flat file message. The HTTP header for the converted messages is set to “text/plain”. If a match does not occur, the XML processed is sent out by the Encode stage as-is.
Note If the IsEnabled property is set to True on the Encode stage and you do not specify a flat file schema as part of the Flat File Encode activity, the bridge does not thrown an error; neither while configuring the bridge (design-time) nor while processing the message (run-time).
You can add or remove a schema by clicking the ellipsis button (…) against the Flat File Schemas property.
The XML One-Way Bridge is configured. You can now connect the bridge to a Line-of-Business system, route messages, and/or deploy the bridge:
Other ResourcesCreate an XML Bridge