Generating WSDL/XSD artifacts

The goal of the service design phase is to produce a design and artifacts for message interfaces based on the business requirements. This step shows how to create and review Web Service Definition Language (WSDL) and XML Schema Definition (XSD) artifacts in the document literal wrapped style, based on the customizations already made when following the Customization Roadmap.

  1. Create a project, such as a static web project, in Rational Software Architect (RSA) for the WSDL and XSD artifacts.
    1. Select File > New > Other from the RSA main menu.
    2. In the New wizard, select Static Web Project under the Web category and click Next.
      Figure 1. Creating a static web project in RSA
      Creating a static web project in RSA
    3. Name the project IPS[version number]_WSDL and click Finish.
      Figure 2. Reviewing a static web project in RSA
      Reviewing a static web project in RSA
  2. Create a transformation configuration to support the UML-to-WSDL transformation.
    1. Select Modeling > Transform > New Configuration from the main menu in RSA.
    2. Name the Uml2Wsdl transformation configuration, set the Configuration file destination to the IPS_WSDL/WebContent project folder, and select Service Oriented Architecture Transformations > UML to WSDL as the transformation.
      Figure 3. Creating a UML to WSDL transformation configuration
      Creating a UML to WSDL transformation configuration
    3. Keep the default Conceptual protocol selected and click Next.
    4. In the Source and Target wizard navigate to and select IClaimHandling as the selected source and IPS_WSDL/WebContent as the selected target.
      Figure 4. Setting the source and target for a new transformation configuration
      Setting the source and target for a new transformation configuration
    5. Click Finish to complete the creation of the transformation configuration.
  3. Configure the Uml2Wsdl.tc transformation configuration.
    1. Open the editor for Uml2Wsdl.tc.
    2. In the Main tab, set the required merge options. Select Silent merge.
      Figure 5. Setting properties for a UML to WSDL transformation configuration
      Setting properties for a UML to WSDL transformation configuration
    3. In the WSDL Options tab, right-click within the Binding column in the Binding options tab and select Set All Bindings > WRAPPED-DOCUMENT-LITERAL from its menu.
      Figure 6. Setting WSDL options for a UML to WSDL transformation configuration
      Setting WSDL options for a UML to WSDL transformation configuration
    4. In the Output Options tab, set the required properties. Change the Data type processing option to Process referenced data types and their derived types.
      Figure 7. Setting output options for a UML to WSDL transformation configuration
      Setting output options for a UML to WSDL transformation configuration
    5. Save Uml2Wsdl.tc.
  4. Run the UML-to-WSDL transformation.
    1. Select the Uml2Wsdl.tc file in the Project Explorer, right-click it, and select Transform > Run UML to WSDL from its menu.
    2. Verify the transformation configuration has successfully run. Content must be created in IPS86_WSDL.
      Figure 8. Verifying the file output of a UML to WSDL transformation
      Verifying the file output of a UML to WSDL transformation
  5. Review the generated WSDL/XSD artifacts.
    1. Navigate to IPS8502_WSDL > WebContent > com > ibm > ima > ips > Services > Transactional > ServiceInterfaces > ClaimManagement and open ClaimManagement.wsdl.
      Figure 9. Reviewing the contents of a WSDL file
      Reviewing the contents of a WSDL file
    2. If the WSDL editor only displays text, review Managing RSA capabilities.
    3. Verify the selectClaimAdjuster operation is created with exactly one input, selectClaimAdjuster, and exactly one output selectClaimAdjusterResponse
      Note: RSA renames the request input parameter to match the name of the service operation as is best practice for document literal wrapped WSDL.
  6. Verify the XSD structure for the request input parameter.
    1. In the WSDL editor for ClaimManagement.wsdl, open the input parameter type in the inline schema editor by selecting the arrow beside the selectClaimAdjuster input.
    2. Verify that the type of parameter selectClaimAdjuster contains an element named selectClaimAdjusterRequest with a type of selectClaimAdjusterRequest.
      Figure 10. Reviewing the type of a WSDL input parameter
      Reviewing the type of a WSDL input parameter
    3. Expand the selectClaimAdjusterRequest type and verify that the selectClaimAdjusterRequest type contains a requestHeader element of the RequestHeader type, and a claimFolder element of the ClaimFolder_TO type.
      Figure 11. Reviewing the structure of a request type
      Reviewing the structure of a request type
    4. Expand the RequestHeader and ClaimFolder_TO types and verify their elements.
      Figure 12. Reviewing the structure of request type attributes
      Reviewing the structure of request type attributes
  7. Verify the XSD structure for the response output parameter.
    1. In the WSDL editor for ClaimManagement.wsdl, open the output parameter type in the inline schema editor by selecting the arrow beside the selectClaimAdjusterResponseinput.
    2. Verify that the type of parameter selectClaimAdjusterResponse contains an element named selectClaimAdjusterResponse with a type of selectClaimAdjusterResponse.
      Figure 13. Reviewing the WSDL output parameter type
      Reviewing the WSDL output parameter type
    3. Expand the selectClaimAdjusterResponse type and verify that the selectClaimAdjusterResponse type contains a responseHeader element of the ResponseHeader type, a claimAdjuster element of the ClaimAdjuster_TO type and a claimFolder element of the ClaimFolder_TO type.
      Figure 14. Reviewing the structure of a response type
      Reviewing the structure of a response type
  8. Expand the ResponseHeader and ClaimAdjuster_TO types and verify their elements.
    Figure 15. Reviewing the structure of response type attributes
    Reviewing the structure of response type attributes