Skip to content

HTTP messages sent to ORACC server

Raquel Alegre edited this page Jun 8, 2016 · 5 revisions

Nammu communicates with the ORACC server via both HTTP POST and HTTP GET:

  • POST is used when we need to attach an ATF and send a SOAP Envelope (e.g. for requesting a lemmatisation of an ATF file).
  • GET is used to check if the server is done processing the ATF file.

The overall format of an HTTP POST request is:

HTTP POST headers (Host, Content-Length, Content-Type, ...)
--==boundary==
HTTP POST Body with its own headers, including the SOAP Envelope and an id pointing to the part 
of the message that'll contain the payload (the encoded zipped ATF file)
-==boundary==
Encoded zipped ATF file and some headers.
-==bounday==--

Looking at the steps described in the section [SOAP Asynch Communication Steps](SOAP Asynch Communication Steps), these would be the correspondant HTTP messages sent:

  1. HTTP POST containing the encoded ATF file as well as a SOAP Envelope describing what command we want to run and what project if belongs to.
Connection': 'close'
'Host': 'http://oracc.museum.upenn.edu:8085'
'MIME-Version': '1.0'
'Content-Length': '2779'
'Content-Type': 'multipart/related; charset="utf-8"; type="application/xop+xml"; start="<SOAP-ENV:Envelope>"; start-info="application/soap+xml"; boundary="==========boundary========"'
--==========boundary========
MIME-Version: 1.0
Content-ID: <SOAP-ENV:Envelope>
Content-Transfer-Encoding: binary
Content-Type: application/xop+xml; charset="utf-8"; type="application/soap+xml"

<?xml version="1.0" encoding="UTF-8"?>
           <SOAP-ENV:Envelope
               xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
               xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:xop="http://www.w3.org/2004/08/xop/include"
               xmlns:xmime5="http://www.w3.org/2005/05/xmlmime"
               xmlns:osc-data="http://oracc.org/wsdl/ows.xsd"
               xmlns:osc-meth="http://oracc.org/wsdl/ows.wsdl">
               <SOAP-ENV:Body>
                   <osc-meth:Request>
                       <osc-data:keys>
                           <osc-data:key>atf</osc-data:key>
                           <osc-data:key>cams/gkab</osc-data:key>
                           <osc-data:key>00atf/belsunu.atf</osc-data:key>
                       </osc-data:keys>
                       <osc-data:data>
                           <osc-data:item xmime5:contentType="*/*">
                               <xop:Include href="cid:request_zip"/>
                           </osc-data:item>
                       </osc-data:data>
                   </osc-meth:Request>
               </SOAP-ENV:Body>
           </SOAP-ENV:Envelope>
--==========boundary========
Content-Type: */*
MIME-Version: 1.0
Content-ID: <request_zip>
Content-Transfer-Encoding: binary

<Encoded ATF file>
--==========boundary========--
           <SOAP-ENV:Envelope
               xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
               xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:xop="http://www.w3.org/2004/08/xop/include"
               xmlns:xmime5="http://www.w3.org/2005/05/xmlmime"
               xmlns:osc-data="http://oracc.org/wsdl/ows.xsd"
               xmlns:osc-meth="http://oracc.org/wsdl/ows.wsdl">
               <SOAP-ENV:Body>
                   <osc-meth:Response>
                       <osc-data:keys>
                           <osc-data:key>9eju0U</osc-data:key>
                       </osc-data:keys>
                   </osc-meth:Response>
               </SOAP-ENV:Body>
           </SOAP-ENV:Envelope>

Clone this wiki locally