ChemGPS-NP Web - Web Services - Introduction

Introduction:

Batchelor provides a fairly complete web service API that let it's users consume the batchelor job queue service in the spirit of W3C's definition of a web service: "a software system designed to support interoperable machine-to-machine interaction over a network".

Batchelor defines an internal API (see ws_xxx() in include/ws.inc) that is exposed to web service clients thru the different web service protocols/interfaces. The same internal API is also used by the web (www) frontend, this ensure that the internal state of the system is allways in sync no matter which public interface is used. This picture shows this in a schematic way:

Picture showing the relation between the public interface, the internal API and Batchelor core system (bottom).

The interfaces provided are:

XML-RPC:Following UserLand Software's specification.
HTTP RPC:A lightweight RPC over HTTP (used internally with Ajax)
REST:Representational State Transfer (see Wikipedia).
SOAP:Simple Object Access Protocol.

All Web Service interfaces are located under source/ws/.

Testing:

An client for testing the Web Services are provided in utils/ws.php. This client let you see all headers in the response for debuging purposes if you use the '-d' option.

Notes for users of PHP 4:

The ws.php utility can't be used out of the box with PHP 4, you have to create an compatible version first. This is due to missing support for the try/catch keywords, causing the script compilation to fail.

An PHP 4 compatible version is built through these steps:

bash$> cd utils
bash$> make ws_php4

The make target should now have created an PHP 4 compatible version of ws.php named ws_php4.php



Index :: Introduction :: Setup :: SOAP :: REST :: HTTP RPC :: XML-RPC