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.
Thus, an HTML form used for testing a service can be coded like this:
<TEXTAREA NAME="RDF" COLS="80" ROWS="7"><?xml version="1.0"?>
<-- YOUR REQUEST -->
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
<rdf:RDF> <!-- Message 1 --> ... </rdf:RDF>
<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.
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.
See also: Core Communication, Basic State Maintenance, TCP/IP