Calling an API using Java: An Example

The business layer of the UF Identity Registry is comprised of:

UF Directory business layer diagram
Identity Registry APIs may be accessed by various means.

The web interface, URL is:

  • Depending on limits defined by access authority, Self-service and Administrative modules for the Identity Registry application may be available.
  • Individuals using browsers will be able to access the application from the World Wide Web with a valid GatorLink ID and password.

The Java API, a jar file, will be provided to make an HTTP connection, pass parameters, and return results for the calling application.

APIs are categorized into 11 groups:

  • Person,
  • Telephone
  • Email
  • Digital Credential
  • Organization
  • Name
  • Identifier
  • Extension
  • Address
  • Relationship
  • Computer Access ID

Each method in these categories represents an individual call to DB2 stored procedures. Parameters used to call stored procedures via Java APIs, are the same ones used to call DB2 stored procedures. The Java API will return the same set of return codes that would be obtained by calling DB2 stored procedures.

The following is a snippet of Java code accessing the Identity Registry Java API:

Classes referenced below are contained in a remoteClient_test.jar file (06-29-2005; 47.2KB) file which may be downloaded, and must be placed in the appropriate classpath (e.g., JAVA_HOME/LIB/EXT).

A production version of the remoteClient.jar is also available.

Click here to view sample code.