Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

On this page:

Target audience:

Users of the extension providing Web services calls from Java.

Extension ID

What's new?

See REST service call for Java - 1.0 - Release Notes for more information.


This extension provides support for some web services calls from Java.

Function Point, Quality and Sizing support

This extension provides the following support:

  • 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
Function Points
Quality and Sizing

CAST AIP compatibility

This extension is compatible with:

CAST AIP release



Supported DBMS servers

This extension is compatible with the following DBMS servers:

CAST AIP releaseCSSOracleMicrosoft
All supported releases(tick)(tick)(error)


(tick)Installation of any compatible release of CAST AIP (see table above)

Dependencies with other extensions

The REST Service Calls for Java extension requires that ≥ 1.2.8-funcrel of the JEE Analyzer is also installed and used in order to ensure the most complete set of results. This dependency with the JEE Analyzer is not automatically handled when downloading the REST Service Calls for Java extension via CAST Extension Downloader, CAST Server Manager or AIP Console, therefore you must MANUALLY download and install the JEE Analyzer before starting an analysis.

Download and installation instructions

Please see:

The latest release status of this extension can be seen when downloading it from the CAST Extend server.

Packaging, delivering and analyzing your source code

Package your JEE code as described in JEE - Prepare and deliver the source code - the REST Service Calls for Java extension will be run when you perform the analysis.

What results can you expect?


This extension analyses some web services call made from Java code through some classical fluent APIs. For example with com.sun.jersey:

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;

class Main
	public static void main(String[] args) {
		Client client = Client.create();

		WebResource webResource = client

		ClientResponse response = webResource.accept("application/json")




API analysed:



API analysed:

  • org.glassfish.jersey.client.JerseyClient
  • org.jboss.resteasy.client.jaxrs.ResteasyClient
  • org.jboss.resteasy.client.jaxrs.ResteasyWebTarget
  • org.jboss.resteasy.client.ClientRequest
  • com.sun.jersey.api.client.Client
  • com.sun.jersey.api.client.WebResource


API analysed:

  • org.springframework.web.client.RestTemplate
  • org.springframework.web.util.UriComponentsBuilder
  • org.springframework.web.util.UriComponents
  • org.springframework.web.util.HtmlUtils
  • org.springframework.web.reactive.function.client.WebClient


API analysed:

  • org.apache.cxf.jaxrs.client.WebClient
  • org.apache.http.client.HttpClient
  • org.apache.http.impl.client.CloseableHttpClient
  • org.apache.http.impl.nio.client.CloseableHttpAsyncClient
  • org.apache.http.client.utils.URIBuilder
  • org.apache.wink.client.Resource

  • org.apache.wink.client.RestClient


API analysed:

  • org.resthub.web.Client


The following objects are displayed in CAST Enlighten:


Delete Resource Service

Get Resource Service

Post Resource Service

Put Resource Service




  • When the code uses a custom URL builder, we cannot evaluate the URL.
  • When the standard java API is encapsulated in a custom method where the "http method" (put, get, post, delete) is passed as a parameter, the dynamic evaluation will generally fail.
class MyHttpCall
   void execute(String url, String method)
      Client client = ClientBuilder.newClient();
      WebTarget myResource =;

      if (method == "GET")
          String response = myResource.request(MediaType.TEXT_PLAIN).get(String.class);
      else if (method == "PUT")


  • No labels