Summary: This document provides basic information about the extension providing JAX-RS support for Web Services.
See JAX-RS - 1.5 - Release Notes for more information.
Compared to 1.4.x branch, the support for calls to web services through WebTarget has been removed because it was error prone. Please use REST Service Calls for Java (com.castsoftware.java.service) instead.
This extension provides support for JAX-RS.
In what situation should you install this extension?
The main purpose of this extension is to create HTTP API entry points, to enable linking from a Web App front end. Therefore if your Web application contains source code which uses JAX-RS (1.0 (JSR 311) and 2.0 (JSR 339)) and you want to view these object types and their links with other objects, then you should install this extension.
|iOS Front-End Example||AngularJS Front-End Example|
This extension handles JAX-RS Web Services used in J2EE applications, for example:
For each class annotated with.rs.Path (@Path):
- A Web Service object will be created whose name is deduced from the value of @Path on the class
- A Web Service Port object will be created that is a child of the web service with the same name and has with a prototype link to the class
- For each method annotated with @GET, @PUT, @DELETE or @POST, the following will be created:
- a Web Service operation child of the Web Service Port whose name is the concatenation of the @Path specified at the class level and the @Path specified at the method level. If no @Path on the method, then method path = /
- a fire link from the Web Service operation to the method
- for the URLs:
Here the interface exposes the main path and the implementation defines the exposed methods:
Note that while the ServiceEntryPoints.blackbox.xml file is generated when the extension is used with any release of CAST AIP, it will only be exploited by the CAST User Input Security feature in CAST AIP ≥ 8.3.3.
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
- Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
|Quality and Sizing|
CAST AIP release
|7.3.4 and all higher 7.3.x releases|
Supported DBMS servers
This extension is compatible with the following DBMS servers:
|CAST AIP release||CSS||Oracle||Microsoft|
|All supported releases|
|An installation of any compatible release of CAST AIP (see table above)|
Dependencies with other extensions
Some CAST extensions require the presence of other CAST extensions in order to function correctly. The JAX-RS extension requires that the following other CAST extensions are also installed:
- Web services linker service (internal technical extension)
Download and installation instructions
The latest release status of this extension can be seen when downloading it from the CAST Extend server.
CAST Transaction Configuration Center (TCC) Entry Points
In JAX-RS ≥ 1.3.x, if you are using the extension with CAST AIP ≥ 8.3.x, a set of JAX-RS specific Transaction Entry Points are now automatically imported when the extension is installed. These Transaction Entry Points will be available in the CAST Transaction Configuration Center:
Manual import action for CAST AIP ≤ 8.2.x
Locate the .TCCSetup file in the extension folder: Configuration\TCC\Base_Java_JAXRS.TCCSetup
In the CAST Transaction Configuration Center, ensure you have selected the Templates node:
This .TCCSetup file is to be imported into the CAST Transaction Calibration Center using either the:
File > Import Configuration menu option:
- Or right clicking on the Template node and selecting Import Configuration:
- The import of the "Base_Java_JAXRS.TCCSetup" file will provide you with a sample Transaction Entry point in the Free Definition node under Templates:
- Now right click the "Standard Entry Point" item and select copy:
- Paste the item into the equivalent node under the Application, for example, below we have copied it into the Application MEUDON:
- Repeat for any additional items or generic sets that have been imported from the .TCCSetup file.
Packaging, delivering and analyzing your source code
Once the extension is installed, no further configuration changes are required before you can package your source code and run an analysis. The process of packaging, delivering and analyzing your source code does not change in any way:
- Package and deliver your application (that includes source code which uses JAX-RS) in the exact same way as you always have.
- Analyze your delivered application source code in the CAST Management Studio in the exact same way as you always have - the source code which uses JAX-RS will be detected and handled correctly.
What results can you expect?
Once the analysis/snapshot generation has completed, HTTP API transaction entry points will be available for use when configuring the CAST Transaction Configuration Center. In addition, you can view the results in the normal manner (for example via CAST Enlighten).
The following objects are displayed in CAST Enlighten:
|JAX-RS Delete Operation Service|
|JAX-RS Get Operation Service|
|JAX-RS Post Operation Service|
|JAX-RS Put Operation Service|
|JAX-RS Get Resource Service|