XML-RPC Interface ("SOA")

Purpose of the Interface

The purpose of this interface is to allow external applications to access the main data structures of ]project-open[ and its underlying OpenACS infrastructure. The design priority was easy access beyond any other feature.

Contents

Overview

  1. Communication Need:
    An application needs to read or modify ]po[ objects. All ]po[ objects can be found in the database, so the application needs somehow access to the data model.
  2. ODBC is Blocked:
    ODBC access is frequently blocked by a Firewall or is unavailable for other reasons.
  3. XML-RPC Communication:
    Instead, the client application can access the ]po[ data model via HTTP and HTTPS.

Client - server communication via HTTP, HTTPS or ODBC.

General Interface Structure

This interface implements a generic XML-RPC bridge to the ]po[ (SQL) data model. The interface basicly lets you execute a selected number of SQL statements. This type of interface is possible because the all ]po[ objects are stored in the database in an object-oriented fashion with metada. Caching in the memory only applies to slowly changing master data which are out of the scope of this interface.

Communication Example

The following example shows a sample communication between a client and a server, querying and updating information about a employee.

  1. Login:
    The client authenticates using email/pwd combination. "Timestamp" specifies the requested validity period.
  2. Select:
    The client requests a list of all ("{}" indicates an empty list of constraints) objects of type "im_employee" and receives a list of object_id's
  3. Object_Info:
    The client requests all available information about the object with the ID 601.
  4. Update:
    The client updates the first_name of the object #601.
Client - server communication protocol example.

XML-RPC

The interface uses the "XML-RPC" standard for transport-level encoding. XML-RPC defines how business information can be communicated from one computer to another as XML documents via HTTP(S).

XML-RPC is the "little brother" of SOAP, with a greatly reduced complexity, but also with certain restrictions. Writing the prototype of an XML-RPC interface to ]po[ only takes minutes for developers familiar with XML. XML-RPC libraries exists for all major development environments, including MS-VisualBasic (for Applications), C#, C/C++, Perl, Python, Ruby, ...

XML-RPC defines how data is packages and sent between applications. However, it doesn't define what is being transmitted and how errors are handeled.

Object Model

A ]po[ object consists of an object_id, an object_type and a number of fields that can be stored in more then one table. In particular, derived object types (such as "im_employee", for example) consist of information that are stored in more then one table.

The SQLAPI provides a consistent layer that hides the fact that information may be stored in different tables. For SQLAPI, an object consists of a set of attributes.

Application-Level Protocol Overview

The ]po[ XML-RPC currently defines the "SQLAPI" protocol that implements a generic SQL Bridge in order to reduce the number of procedures. It defines the following set of remote procedure calls (RPCs):

Execution Status and Error Treatment

All SQLAPI methods return a list of values with the first element being the error status. The string "ok" indicates a successful execution. Any other value indicates an error situation, with the second element being a human readable error message.

Stateless Protocol Authentication

"SQLAPI" is a "stateless" protocol. That means that each remote procedure call is executed independently from any previous procedure call.

This means that the client has to maintain the session state and needs to send authentication information with every procedure call. This "auth_info" structure consists of a list that is returned by the SQLAPI.Login call. It has the following structure ("[" and "]" indicating the start and end an ordered list):

["token", user_id, timestamp, token]

 


Quick Feedback:

Please help us to improve the quality of our websites and report any type of spelling/grammar errors and other obliquities using this form.
To get in touch with us regarding other topics please use our contact form.

Name:  E-Mail:


Message: