HOW-TO Access to D-NET Services

This section will explain how to access D-NET services, and in particular will be presented the case as an example of accessing the index to perform a search.

D-NET Services are accessible through a single point of access, which requires a key. This key can be obtained following the instructions in the link below:

In this way we are able to selectively shut down misbehaving clients; thus since all services are behind a proxy, the url you get contains an encrypted address of the internal urls of our internal network.

Once the key is generated, it allows to access the Services endpoint user interface, which basically consist of a set of jsons (example HERE), one per service, containing:

  1. the URL endpoint for the specific service;
  2. the WSDL descriptor for the specific service;
  3. a TTL that specifies the expiring time for the specific json.

At this point, a stub can be instantiated to perform the search mentioned earlier, using the endpoint url obtained from the previous step. Here's an example of the WSDL descriptor used to instantiate a search stub.

Now a search invocation can be performed passing a CQL query, for example: 

  •"(language =\"eng\" AND creator = \"Author\")");

this invocation returns an EndpointReference (EPR). The EndpointReference contains the url to the resultset service endpoint and a reference parameter called ResourceIdentifier which identifies the result. 

At this point a ResultSet service stub can be instantiated with the returned EPR (wsdl example HERE) and the results can be obtained by invoking the following method:

  • resultSet.getResults(referenceParameter, 1, 10);

this will fetch the first ten documents (count from 1, last including), if the result contains less than 10 elements, or if empty, the result will be shorter (or empty).