< Previous | Next >

Building the request flow for the XSL Transformation sample

Map your request and response operations, add a persistent property to the correlation context and transform the message so that it matches the requester and provider interfaces.

  1. In the Business Integration view, expand the XSLTransform module.
  2. Open the Assembly Editor by double-clicking Assembly Diagram .
  3. In the module assembly diagram, right-click on the XSLTransform_MediationFlow component and choose Generate Implementation.
    Generate Implementation
  4. Click OK to generate the mediation flow in XSLTransform. This action opens XSLTransform_MediationFlow in the mediation flow editor.
  5. In the Operation connections section, wire StockQuoteRequester interface's getQuote operation to StockQuoteServicePartner interface's getStockQuote operation. You will see the request flow with an input and a callout for the operation.
  6. Add the CustomerInformation business object to the correlation context of the input getQuote : StockQuoteService. This will allow the property customerID to persist in the message flow. Click on Input: getQuote : StockQuoteService and switch to the Details tab in the Properties view. In the Correlation Context field, click Browse. Select CustomerInformation under matching data types, and click OK.
    Select the CustomerInformation business object
  7. {http://CorrelationContext}CustomerInformation now appears in the Correlation Context field.
    Input node details
  8. Select an XSL Transformation primitive from the palette, drop it onto the request flow canvas, and name it TransformToStockQuoteService.
  9. In the request flow canvas, wire the output terminal of getQuote : StockQuoteService to the input terminal of TransformToStockQuoteService.
  10. Wire the output terminal of TransformToStockQuoteService to the input terminal of getStockQuote : StockQuoteServicePartner.
    Wired Request Flow canvas
  11. Set the properties for the XSL Transformation primitive TransformToStockQuoteService:
    1. Select the TransformToStockQuoteService primitive in the request flow canvas. Switch to the Details tab in the Properties view.
    2. Click on the New button next to the Mapping File field. In the Specify Message Types wizard, change the message root to / . Click Finish.
    3. In the Source section of the mapping editor, expand tns:smo > body [0..1] > getQuote. In the Target section, expand tns:smo > context > correlation [0..1] and tns:smo > body [0..1] > getStockQuote.
    4. Click on customerID in the body section of the Source, then click on customerID [0..1] in the context section of the Target. Right-click, and select Create Mapping. This action maps the value of the customerID in the message body to the correlation context so that it is persisted throughout the request and response flows.
    5. Click on symbol in the Source, then click on stockSymbol in the Target. Right-click, and select Create Mapping
    6. Because we selected / as root, we need to manually map the remaining fields. Click on smo in the Source, then click on smo in the Target. Right-click, and select Match Mapping. All remaining fields should now be mapped.
      Generate Implementation
    7. Save your changes and close the mapping editor.
    8. The he mapping file and its associated XSL are shown in the properties view of the primitive.
      Generate Implementation
    9. Save your changes in the mediation flow editor.

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