OCP/HTTP translation example

This is a possible OCP message flow using an HTTP profile.
It translates a text file from English to German.

Notes:
- This example should be compliant to OCP Core Draft Version 04 and HTTP adaptation Draft Version 02.
- The connection is kept open at the end - being prepared for the next transaction.

OPES processor Callout server
CS;
CS;
NO ({"38:http://iana.org/opes/ocp/HTTP/response"});
NR {"38:http://iana.org/opes/ocp/HTTP/response"};
SGC 12 ({"45:ocp-test.com/translate?from=english&to=german"});
 
TS 89 12;
 
AMS 89
AM-EL: 86
;
 
DUM 89 0
AM-Part: response-header

65:HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 86


;
 
DUM 89 65
AM-Part: response-body

86:Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune;
 
AME 89;
AMS 89
AM-EL: 78
;
TE 89;
DUM 89 0
AM-Part: response-header

65:HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 78


;
 
DUM 89 63
AM-Part: response-body

78:Ob´s edler im Gemüt, die Pfeil und Schleudern
des wütenden Geschicks erdulden;
 
AME 89;
 
TE 89;

Back to Martin's OPES page