Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

·       Protocol Requirements & Limitations

·       Direct Client Protocol Services

Transport Overview

The HTTP transport is unique in that the separation between transport and protocol is more fluid than for the other transports.  A protocol is implemented by a set of RESTful web services registered under a common base URI prefix.  A client can determine if HIS supports a particular protocol over the HTTP Transport by issuing an OPTIONS request to the given URI prefix.

...

A new session can be created by POSTing a startSession message to the Session Management service.  The client identifies itself using the client JSON structure.  The name property is required and is used for logging and management purposes.  The id property is optional.  If no id property is provided, a unique identifier will be generated and returned to the client.

Request

{

Code Block
languagejson
{
  "messageType": "startSession",

...


  "client":

...

{


  {
    "id": "[client_id]",

...


    "name": "[client_name]"

...


  }

...


}

The server will respond with a JSON structure that includes the client identifier.  If the client provided an id as part of the startSession message, the provided id is returned.  Otherwise, a new id is generated and returned.

Response

{

Code Block
languagejson
{
  "id": "[client_id]"

...


}

Ending a Session

An existing session can be closed by POSTing an endSession message to the Session Management service.  The client identifies itself using the client JSON structure.  The server will gracefully end the session with the matching client id.

Request

Code Block
languagejson
{

...


  "messageType": "endSession",

...


  "client":

...

{


  {
    "id": "[client_id]",

...


    "name": "[client_name]"

...


  }

...


}

The server will respond with an HTTP 200 OK status code once the session has been cleaned up.  If the session was not found, the server will respond with an HTTP 404 Not Found status code.

...

Messages returned from the Message Polling service request are wrapped in a JSON structure and will always be listed in the order they were generated.

Code Block
languagejson
{

...


  "messages":

...

[

{


  [
    {
      MESSAGE_1_CONTENTS

...


    },

...

{


    {
      MESSAGE_2_CONTENTS

...


    },

...

]


    …
  ]
}