Creating a web-service using perfSONAR base

From GEANT2-JRA1 Wiki

To create a schema and a java web-service (starting from perfSONAR base) making use of that schema, you need the following


  1. Create the schema and the XML instances. Follow the procedure below:
  2. The XML message are received by the requestHandler that will convert each elements of the XML message into NMWG objects. The RequestHandler class is a generic class, where you don't have to change anything.
  3. The requestHandler, after having converted the elements into NMWG objects, call a messageHandler. There is one messageHandler per type of message. You need thus to create a new messageHandler for the messages you are exchanging. Following the example of the RRD MA, it will take you few minutes to do so.
  4. Message handler for SetuDataRequest message: http://anonsvn.internet2.edu/svn/perfsonar/trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataRequest.java
  5. The messageHandler will call your serviceEngine. The serviceEngine is the part that contains all the intelligence of the service (fetch the data, perform actions on an archive or on a measurement tool).
  6. When testing your service, you need to create a conf/service.property document to take into effect the message types you have been creating.
    • To do so, the class names of message handlers (representing message types) must be put in the config file conf/service.properties. Examples of service.properties can be found at http://anonsvn.internet2.edu/svn/perfsonar/trunk/perfsonar/conf/
    • The file should include the list of messages that your service will use Example for RRD MA: service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest,LookupInfoRequest
    • Note that once releasedm the service.conf is created automatically by the configuration scripts.


Please note that The description refers to the current (getting old) svn structure. New svn structure is being prepared and hopefully will be the official one soon (so far the proposal can be found in svn branch).

Personal tools