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:  46369 views
Comments:  

Import the legacy application code and supporting services (XML and JSON Helpers)

This section outlines the steps to import the code supplied as part of the solution.

  1. Start Rational Software Architect V8.0 and create a new workspace.
  2. If prompted to configure your workspace with an existing Runtime Environment and Profile Setting, click Cancel (Figure 2).

    Figure 2. Configuring the WebSphere Application Server dialog
    Configuring                                 the WebSphere Application Server Dialog

  3. To open the Java EE perspective select Window > Open Perspective > Other.
  4. Check the Show all check box, and then select Java EE and click OK.
  5. If prompted to Confirm Enablement of new capabilities, check the Always enable activities and don’t ask me again box and then click OK (Figure 3).

    Figure 3. Confirm Enablement dialog
    Confirm                                 Enablement Dialog

  6. Download the devWorks_LegacyBankAppArtifacts.zip archive file provided in the Downloads section into a directory location of your choice. The following files are contained in the archive file:

    File Name Description
    JAXRS-RESTService_devWorks.zip Contains the Legacy Bank App, Legacy Wrapper Service Projects, and the RESTClient for verifying the solution. Files containing code and log snippets are in the TextFiles project.
    JAXRS-RESTService_solution_devWorks.zip Contains the completed solution ready for deployment to a WebSphere Application Server V8.0 Runtime Environment


  7. Select File > Import and in the Import dialog select General > Existing Projects Into Workspace and then click Next (Figure 4).

    Figure 4. Import: Select Import Type dialog
    Import: Select                                 Import Type Dialog

  8. Click on Select archive file bullet and then click on Browse.
  9. Browse to the location of the extracted downloads, select the LegacyBankAppCode.zip file and then click Open.
  10. Verify all the required projects are located (Figure 5) and then click Finish.

    Figure 5. Import: Import Projects dialog
    Import: Import                                 Projects Dialog

The projects and files imported into the workspace are shown in Figure 6 and consist of the following:

  • LegacyBankApp. Java project that contains the legacy bank application code
  • LegacyBankAppWrapperService. Java project that contains the Wrapper service which invokes the legacy bank application code. The JAX-RS framework will invoke methods on this class.
  • RESTClient/ Java project that contains a test client for verifying the solution.

Figure 6. Projects and files imported into workspace
Projects and files                         imported into workspace

This completes the steps required to import the legacy application code artifacts used by the legacy bank application’s JAX-RS 1.1 REST Service.

3 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=