Setting up the PiggyBank design model transformations

To run the transformations, you must import the PiggyBank Transformations and Code sample into your workspace, open the Modeling perspective, and invoke the transformations.

  1. Create the target ejb project.
    1. From the File menu, click New > Project > Next.
    2. Select EJB Project and click Next.
    3. Specify ItsoAdEJB as the project name.
    4. Select WebSphere Application Server as the target runtime.
    5. Select the Add Project to an EAR check box, specify ItsoAdEAR as the EAR project name, and click Next twice.
    6. Clear the Create an EJB Client JAR module to hold the client interfaces and classes check box and click Finish.
  2. Create the transformation configuration file.
    1. From the File menu, click New > Other > Transformation Configuration > Next.
    2. Specify UMLtoItsoAdEJB as the name, select the UML to EJB checkbox, type /ItsoAdEJB as the file destination and click Next.
    3. In the Selected Source list, expand ItsoAdModel and click PiggyBankImplementationDesigns.
    4. In the Select Target list, select ItsoAdEJB, and click Finish.
  3. Run the transformations.
    1. In the Project Explorer view, expand the ItsoAdModel project and select UMLtoItsoAdEJB.tc which you just created.
    2. Right-click UMLtoItsoAdEJB.tc; then click Transform > UML to EJB.
  4. Create the dynamic Web project.
    1. From the File menu, click New > Project > Next.
    2. Select Dynamic web project and click Next.
    3. SpecifyItsoAdWebService as the project name.
    4. Select WebSphere Application Server as the target runtime.
    5. Select the Add Project to an EAR check box, specify ItsoAdCityBankEAR as the EAR project name, and click Finish.
  5. Create the WSDL transformation configuration file.
    1. From the File menu, click the New > Other > Transformation Configuration > Next.
    2. Specify UMLtoItsoAdWebService as the name, select UML to WSDL, specify /ItsoAdEJB as the file destination, and click Next.
    3. In the Selected Source list, expand ItsoAdModel and select the PiggyBankImplementationDesigns/itso.ad.citybank/CityBank component.
    4. In the Select Target list, select ItsoAdWebService/WebContent, and click Next.
    5. Select WRAPPED-DOCUMENT_LITERAL and click Finish.
  6. Run the WSDL transformations.
    1. In the Project Explorer view, expand the ItsoAdModel project and click UMLtoItsoAdEJB.tc which you just created.
    2. Right-click the UMLtoItsoAdWebService.tc; then click Transform > UML to WSDL.
  7. Generate the client code from the WSDL file.
    1. In the Project Explorer, expand PiggyBankImplementationDesigns, then right-click itso\ad\citybank\cityBank.wsdl and select Web Services > Generate Client.
    2. On the Web Services page, adjust the slider to Develop Client and click Finish to generate the client code.
Parent topic: PiggyBank design model transformations and code

Feedback