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 BPS[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 BPS_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 IPaymentMandateManagement as the selected source and BPS_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 BPS_WSDL/WebContent.
      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 BPS86_WSDL > WebContent > com > ibm > ima > bps > Services > Transactional > ServiceInterfaces > FinancialTransactionProcessing and open FinancialTransactionProcessing.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 retrieveCustomerSignatureSpecimen operation is created with exactly one input, retrieveCustomerSignatureSpecimen, and exactly one output retrieveCustomerSignatureSpecimenResponse
      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 FinancialTransactionProcessing.wsdl, open the input parameter type in the inline schema editor by selecting the arrow beside the retrieveCustomerSignatureSpecimen input.
    2. Verify that the type of parameter retrieveCustomerSignatureSpecimen contains an element named retrieveCustomerSignatureSpecimenRequest with a type of retrieveCustomerSignatureSpecimenRequest.
      Figure 10. Reviewing the type of a WSDL input parameter
      Reviewing the type of a WSDL input parameter
    3. Expand the retrieveCustomerSignatureSpecimenRequest type and verify that the retrieveCustomerSignatureSpecimenRequest type contains a requestHeader element of the RequestHeader type, and a paymentMandateInstruction element of the MandateDocument_TO type.
      Figure 11. Reviewing the structure of a request type
      Reviewing the structure of a request type
    4. Expand the RequestHeader and MandateDocument_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 FinancialTransactionProcessing.wsdl, open the output parameter type in the inline schema editor by selecting the arrow beside the retrieveCustomerSignatureSpecimenResponseinput.
    2. Verify that the type of parameter retrieveCustomerSignatureSpecimenResponse contains an element named retrieveCustomerSignatureSpecimenResponse with a type of retrieveCustomerSignatureSpecimenResponse.
      Figure 13. Reviewing the WSDL output parameter type
      Reviewing the WSDL output parameter type
    3. Expand the retrieveCustomerSignatureSpecimenResponse type and verify that the retrieveCustomerSignatureSpecimenResponse type contains a responseHeader element of the ResponseHeader type and a signatureSpecimen element of the SignatureSpecimen_TO type.
      Figure 14. Reviewing the structure of a response type
      Reviewing the structure of a response type
  8. Expand the ResponseHeader and SignatureSpecimen_TO types and verify their elements.
    Figure 15. Reviewing the structure of response type attributes
    Reviewing the structure of response type attributes