< Previous

Building the response flow

Build the response flow for the getQuote operation: create the mediation primitives, set their properties, and wire the flow.

To build the response flow, follow these steps:

  1. Click the Response tab to view the response flow.
  2. Select an XSL Transformation primitive from the palette, drop it onto the response flow canvas, and rename it DynamicToStockQuoteService.
  3. Wire the flow:
    • The output terminal of getQuote : DynamicStockQuoteServicePortTypePartner to the input terminal of DynamicToStockQuoteService
    • The output terminal of DynamicToStockQuoteService to the input terminal of input response getQuote : StockQuoteService
  4. Set the properties for the XSLT primitive DynamicToStockQuoteService:
    1. Select the DynamicToStockQuoteService primitive in the response flow canvas. Switch to the Details tab in the Properties view.
    2. Click the New button next to the Mapping File field. The Specify Message Types wizard opens displaying the root, input, and output message types that will be mapped.
    3. Change the Root field to /, and click Finish to launch the mapping editor.
    4. In the Source section of the mapping editor, expand tns:smo > context > correlation and body [0..1]. In the Target section, expand tns:smo > body [0..1] > getQuoteResponse > response.
    5. Click subscriptionLevel [0..1] in the Source, then click qualityOfService [0..1] in the Target. Right-click, and select Create Mapping. This action maps the value of the subscriptionLevel, which persisted in the correlation context, to the qualityOfService field in the message body.
    6. Click value in the Source, then click value [0..1] in the Target. Right-click, and select Create Mapping.
    7. Because the root is set to /, we need to explicitly map the remaining elements in the message. Click smo in the Source, then click smo in the Target. Right-click, and select Match Mapping. This action maps the remaining fields in the context and headers.
    8. Save your changes and close the mapping editor.
      DynamicToStockQuoteService XML map

      The mapping file and associated XSL style sheet are displayed in the Details tab of the Properties view.

      Save your changes.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.
< Previous