Difference between revisions of "ESciDoc Service Interfaces"

From MPDLMediaWiki
Jump to navigation Jump to search
m
 
Line 36: Line 36:




[[Category:ESciDoc|Service Interfaces]]
[[Category:ESciDoc Services|Interfaces]]
[[Category:ServiceOrientedArchitecture|Interfaces]]
[[Category:ServiceOrientedArchitecture|Interfaces]]

Latest revision as of 11:01, 7 January 2011

eSciDoc SOA

SOAP and REST style interfaces
Service layers

Core services
Context Handler · Item Handler
Container Handler
Organizational Unit Handler
User Account Handler
Authentication
Content Model Handler
Semantic Store Handler

Intermediate services
Validation Service
Statistics Manager
Technical Metadata extraction
PIDManager
Basket Handler
Duplication detection
ImageHandler(Digilib)

Application services
Depositing
Searching
Search&Export
Control of Named Entities
Citation style Manager
RightsChecking
DataAcquisition
Transformation
Fledged Data
PID Cache
OAI-PMH

SOA Introduction

edit


Core services layer offer two types of interfaces for each resource: SOAP and REST interfaces. More precisely, each resource handler service implements the four basic operations create, retrieve, update, and delete (CRUD) and in addition, filter methods and task-oriented methods (e.g., for changing the status of an object within a content repository) are provided.

  • SOAP interfaces are realized through resource handlers that offer operations for a specific service functionality that is to be applied to the resource itself or a distinctive part of the resource (subresource). The messaging style for SOAP interfaces is document/literal.
  • REST interfaces are realized through sending a basic HTTP requests (GET, PUT, POST, DELETE) to a resource/subresource URI (each resource has a URI represented via XLink).

Input and output messages for same operations offered by both types of interfaces are specified with the corresponding XML representation.

Note: until build 0.94 both SOAP/REST interfaces were based on same schemas. As of build 0.94 this is changed, and the SOAP interfaces use slightly modified schemas then the REST interfaces.


Example 1: create an item

  • SOAP: ItemHandler.create("item.xml") (where item.xml is compliant with the SOAP item.xsd schema).
  • REST: PUT /ir/item/ (with "item.xml" in the body of the request) (where item.xml is compliant with the REST item.xsd schema)

item.xml (enriched with system generated data is returned if the request is successfully executed)


Example 2: retrieve an item

  • SOAP: ItemHandler.retrieve(“escidoc:123”)
  • REST: GET /ir/item/escidoc:123


The REST API differentiates between resource- and task-oriented methods. All resource-oriented methods use GET, PUT and DELETE verbs. Task-oriented methods use the POST verb.

At present, intermediate and application services implemented in Java invoke the core services via the SOAP API. They use the [JiBX data-binding framework] to transform the XML representation of resources returned by Basic services, since it allows for the definition of custom mappings to Java classes.

Services on intermediate and application layers offer two types of interfaces: SOAP and standard Java interfaces. Standard Java interfaces will be offered for internal communication between service components of the application and intermediate layer – in this case input and output are standard input/output Java types. SOAP interfaces will be offered for services that are strong reuse candidates for clients outside the core eSciDoc system implementation.

Interface specification can be found at eSciDoc project pages