...
The term "Message Responder" refers to all tools that send responses over HTTP, MQIBM MQ, JMS, or other/custom protocols. Custom Message Responders can support any message format that you are working with—for example, mainframe message formats, binary formats, or any other kind of proprietary custom message.
...
The Transport Header tab allows you to specify the HTTP, JMS, or MQ IBM MQ message header that will be returned with the response message. You can use table view or literal view.
...
- Enable Enable correlation.
- Specify the HTTP methods you want to use for correlation.
For example, if GET, POST, and PUT are checked, the responder will match HTTP requests with the method GET, POST, or PUT. HTTP requests with CONNECT, DELETE, HEAD, and so on will not match.
...
For more details on processing, see Criteria Expressions for Matching Values with the Message Responder.
...
Options Tab
...
The Attachment The Options tab allows you to send either Binary or XML HTTP attachments to the response message.
When you are using MTOM, you do NOT need to add anything to the Attachment tab. The MTOM option will cause it to automatically create the MIME_boundaries with the optimized (non-encoded) SOAP Envelope xsd:base64Binary content. The Attachment tab applies only to MIME/DIME options.
To send an attachment, perform the following from the Attachment tab:
- Click Add. An XML Attachment entry displays in the Attachment table.
- Double-click the XML Attachment entry. An Edit Attachments dialog opens.
- In the Edit Attachments dialog, choose either XML or Binary from the Mode menu.
- Configure the attachment.
- The following option is available for XML Mode:
- Views: Select the desired view from the menu and configure accordingly.
- The following options are available for Binary Mode:
- Base 64 Encoding: Enables Base 64 Encoding to encode the binary value.
- Data Source Column: Select to send values from a data source column.
- File: Select to send values from a file. Choose the desired file by clicking Browse. Enable Persist as Relative Path if you want the path to this file to be saved as a path that is relative to the current configuration file.
- Text: Select to send a text value.
- Content type: Specify the content type. Click Edit Headers if you want to add, modify, or delete attachment headers.
- The following option is available for XML Mode:
Options Tab
The Options tab allows you to configure how the message is processed. The following options are available:
...
configure how the message is processed. The following options are available:
Request Template
Anchor | ||||
---|---|---|---|---|
|
Request Date
The request date template is used to calculate offsets for dates when generating inline expressions when no match occurs, such as when no dates are present in the request message
...
Request Date
The request date template is used to calculate offsets for dates when generating inline expressions when no match occurs, such as when no dates are present in the request message template or the request URL template. To use the current date/time, choose [Current Date/Time] from the menu. To specify a date-time, enter it in the field. If left blank, no offset will be calculated.
...
Specifies whether to use the Default or Custom encapsulation format. The Default option specifies whatever is chosen as the Attachment Encapsulation Format in the Preferences panel. The Custom option allows you to choose MIME, DIMENone, MTOM Alwaysalways, or MTOM Optionaloptional. For details, see Working with Attachments.
...
- Enter a WSDL in the WSDL URL field of the Message Responder tool.
- Right-click the Message Responder node and choose Add Output. The Add Output wizard opens.
- From the Add Output wizard, choose Incoming Request from the left pane and XML Data Bank from the right pane and click Finish.
- Double-click the Incoming Request > XML Data Bank node beneath the Message Responder node. The XML Data Bank configuration panel displays in the right GUI panel.
- In the right GUI panel, add the XPath of the value you want to access in your script.
- Double-click the Message Responder node. The Message Responder configuration panel displays in the right GUI panel.
- In the Response tab, choose the Scripted view.
Specify your logic. The following is the basic template for accessing data source and data bank values:
Code Block def customLogic(context): # Retrieve the data source value. "Data Source Name" should be replaced # with the name of your data source and "Column Name" should be the column # that your value is coming from. You can access many columns from the same # data source within this script. For Data Bank values, the table is always # named "Generated Data Source" so you only need to replace "Data Bank Column Name" dataSourceValue = context.getValue("Data Source Name", "Column Name") dataBankValue = context.getValue("Generated Data Source", "Data Bank Column Name") # add custom logic that uses value from data source # The following method tells what data source you will be using in this script. # "Data Source Name" should be replaced with the name of your data source def addDataSources(context): return "Data Source Name"
- Select the correct method from the Method menu. The method you select should be your entry point. In the above example, the method would be customLogic().
...
Virtualize sets the outgoing (response) MQ IBM MQ message characterSet field to the same value as the incoming (request) IBM MQ message.
When sending responses with character data such as XML, CSV, fixed-length, or plain text, the "format", the MQ header type must be set to the value of the MQFMT_STRING constant, which is "MQSTR". This format header should be configured in the Message Responder’s Transport Header tab (in the MQ Headers table, add an entry with format
set to MQSTR
).
The response message will be encoded based on the MQ "characterSet" header field. By default, Virtualize automatically sets the characterSet field on the outgoing (response) IBM MQ message to the same value as the incoming (request) IBM MQ message. However, this character set can also be explicitly configured by adding a "characterSet" header in the Message Responder’s Transport Header tab.
...
- 850 - ASCII
- 819 - ISO standard ASCII
- 37 - American EBCDIC
- 1200 - Unicode
- 1208 - UTF-8