Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Developing JAX-RS 1.1 RESTful Services in Rational Software Architect V8 for deployment to WebSphere Application Server V8

Enabling legacy applications for REST

Tendai Chinoda (tendai@us.ibm.com), Senior Software Engineer, IBM
Photo of Tendai Chinoda
Tendai Chinoda is an IBM Certified IT Specialist and Senior Software Engineer in IBM Software Services for WebSphere (ISSW). He provides consulting and enablement services to IBM customers for the IBM WebSphere family of products. His expertise and interests include Application Architecture, Design and Development for Cloud Computing, SOA, Java EE and Web Services solutions.
(An IBM developerWorks Contributing Author)
Photo of Harry Hoots
Harry L. Hoots, III is an IT Specialist working on the IBM Account. He serves in senior roles and is a Web Services Team Development lead on a major internal project. His expertise and interests include Application Architecture, Design and Development of Java EE, Web Service, and MQ Series solutions.

Summary:  Learn how to expose existing business functionality embedded in legacy applications as JAX-RS 1.1 RESTful services using WebSphere® Application Server V8.0 and Rational® Software Architect.

Date:  02 Nov 2011
Level:  Intermediate PDF:  A4 and Letter (2616 KB | 54 pages)Get Adobe® Reader®

Activity:  46535 views
Comments:  

Create the JAX-RS 1.1 REST service and Java EE modules

  1. In the Java EE perspective select File > New > Dynamic Web Project.
  2. In the Dynamic Web Project dialog, enter LegacyBankAppWeb as the project name.
  3. In the Target runtime drop-down menu, select WebSphere Application Server V8.0.
  4. In the Configuration drop-down menu, select IBM JAX-RS Configuration.
  5. In the EAR project name drop-down menu, enter LegacyBankAppEAR as the EAR Project to deploy the newly created Web Module and click Next (Figure 28).

    Figure 28. Dynamic Web Project Creation dialog
    Dynamic Web                                 Project Creation Dialog

  6. In the Configure Project for Java Application dialog (Src Folder dialog), leave all fields as default and click Next (Figure 29).

    Figure 29. Dynamic Web Project Src Folder dialog
    Dynamic Web                                 Project Src Folder dialog

  7. In the Web Module Settings dialog, check the Generate web.xml deployment descriptor box and click Next (Figure 30).

    Figure 30. Dynamic Web Project Module Settings
    Dynamic Web                                 Project Module Settings

  8. In the JAX-RS Capabilities dialog, leave all fields as default and click Finish (Figure 31).

    Figure 31. Dynamic Web Project JAX-RS Settings dialog
    Dynamic Web                                 Project JAX-RS Settings Dialog

  9. If prompted to Open the Associated Perspective (i.e. Web Perspective) click No.
  10. In the Enterprise Explorer View, expand the LegacyBankAppEAR project, right click on the LegacyBankAppEAR > LegacyBankAppEAR > Utility JARs and select Modify.
  11. In the Properties for LegacyBankAppEAR window, click on Deployment Assembly and in the EAR Module Assembly pane, click Add (Figure 32).

    Figure 32. EAR Module Deployment Assembly
    EAR Module                                 Deployment Assembly

  12. In the Select Assembly Directive Type dialog, select Project and click Next (Figure 33).

    Figure 33. EAR Module Deployment Assembly: Select Assembly Directive dialog
    EAR Module                                 Deployment Assembly: Select Assembly Directive Dialog

  13. In the Select Project to include dialog, select LegacyBankAppWrapperService project and while pressing the CTRL Key also select the LegacyBankApp project and click Finish (Figure 34).

    Figure 34. EAR Module Deployment Assembly: Select Projects dialog
    EAR Module                                 Deployment Assembly: Select Projects Dialog

  14. Confirm that the LegacyBankAppWrapperService and LegacyBankApp project appear in the EAR Module Assembly pane and click OK (Figure 35).

    Figure 35. EAR Module Deployment Assembly: Utility Projects and Packaging
    EAR Module                                 Deployment Assembly: Utility Projects and                                 Packaging

  15. In the Enterprise Explorer view, confirm that the Utility JARs have been added to the EAR file as shown in Figure 36.

    Figure 36. LegacyBankAppEAR Utility JARs
    LegacyBankAppEAR Utility JARs

  16. In the Enterprise Explorer view, right click on the LegacyBankAppWeb project and select Build Path > Configure Build Path….
  17. In the Properties for LegacyBankAppWeb window, click on Projects tab and then click on Add (Figure 37).

    Figure 37. LegacyBankAppWeb Java Build Path
    LegacyBankAppWeb Java Build Path

  18. In the Required Project Selection dialog, select the LegacyBankAppWrapperService project and click OK (Figure 38).

    Figure 38. LegacyBankAppWeb Java Build Path Select Projects dialog
    LegacyBankAppWeb Java Build Path Select Projects                                 Dialog

  19. The Java Build Path should now include the LegacyBankAppWrapperService project as shown in Figure 39.

    Figure 39. LegacyBankAppWeb Updated Java Build Path
    LegacyBankAppWeb Updated Java Build Path

This completes the steps required to create the associated artifacts and Java EE Modules for the legacy bank application’s JAX-RS 1.1 REST Service.

5 of 12 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere, Java technology
ArticleID=764302
TutorialTitle=Developing JAX-RS 1.1 RESTful Services in Rational Software Architect V8 for deployment to WebSphere Application Server V8
publish-date=11022011
author1-email=tendai@us.ibm.com
author1-email-cc=
author2-email=hlhoots@us.ibm.com
author2-email-cc=