Working Draft 

HTTP Layer Specification

[RDF Schema]

The HTTPLayer provides a message delivery facility using HTTP protocol mapping. The reason for specifying the HTTP mapping is its accessibility via Web browser interface. Thus, a human user can test a service interface using HTTP protocol mapping by directly interacting with it via a HTML form. The functionality of the HTTP mapping is very similar to that of TCP/IP.

Please keep in mind that HTTP protocol uses special character encoding which introduces some additional overhead.

Mapping

An HTTPLayer is a very simple Web server which accepts both GET and POST requests. GET request can only be used for sending an empty RDF model. This can be done using a Web browser by just typing in the URL of the service. The POST request must contain an RDF model as a parameter. The name of this single parameter is "RDF". The default port for the HTTP mapping is 8271.

Thus, an HTML form used for testing a service can be coded like this:

To any request a page is delivered containing an RDF model in RDF/XML serialization. The default operation mode for the HTTP protocol mapping is stateful, i.e. if the client and server choose to not hang up the connection it may be used for subsequent interactions (Due to browser limitations you will not be able to send manually another request using the same connections. A programmed client could do this, though.).

The response is delivered as MIME multipart message according to the HTTP protocol. The Content-type of the page has to be set to multipart/mixed. Every part of the multipart message represents a single RDF/XML model. The end of communication is signalled via connection hangup. Below you find an example of an HTTP reply:

HTTP/1.0 200 OK
Content-type: multipart/mixed; boundary=4b848jab72d34ZCV

--4b848jab72d34ZCV
Content-type: text/plain

<xml version="1.0">
<rdf:RDF> <!-- Message 1 --> ... </rdf:RDF>
--4b848jab72d34ZCV
Content-type: text/plain

<xml version="1.0">
<rdf:RDF> <!-- Message 2 --> ... </rdf:RDF>
...

Unlike HTTP, the TCP/IP channel used for the communication is asynchronous. At both ends of the connection can be read and written at the same time.

Interface

HTTPLayer implements a connection-oriented service. The connection is maintained as long until an explicit request comes from the service to terminate it (DiscardState). If the connection is interrupted due to some other reason, the client or the service is notified about it again using the DiscardState request.

HTTPLayer extends the StateInfo class defining a new class called Connection. A destination processing entity is attached to the Request identifying the server and port the request should be sent.

Example:

 
 

See also: Core Communication, Basic State Maintenance, TCP/IP



Sergey Melnik. Last modified: 06/01/99