Overview

OPRO X Server Application Program Interface for Windows is the 4th interface of OPRO X Server.
Since this is a JNI wrapper of OXSAPI for Java, OXSAPI for Java and JRE1.4 (or JDK1.4) is needed to use this.

Since this API uses socket to communicate with OXS, API and OXS do not need to be in the same environment.
This API is not for manipulating OXS like CGI and Servlet. This is for providing easier method to request to OXS from application.
As compared with the conventional HTTP request, it does not excel functionally.

When application requested to OXS until now, the HTTP request needed to be transmitted to CGI or Servlet using HttpSendRequest wininet function etc.
By this API, without creating a complicated program, the request to OXS can be performed and the response can be obtained.
If it is simple download of a document, it is realizable by coding of only the following.

   //using the OXS whose port number is 6001 in localhost
   HANDLE hOXSHandler = OXSInitialize("localhost", 6001);

   //creates parameters to generate document.
   HANDLE hOXSParameter = OXSCreateParameter();
   //specifies the template.
   HANDLE hTemplateParameter = OXSParam_AddTemplate(hOXSParameter, "sample1");

   //requests synchronous generation of document
   HANDLE hResponse = OXSSyncCreate(hOXSHandler, hOXSParameter);
   //store generated document.
   OXSRes_GetDocument(hResponse, "c:\\sample1.opr");
   
   //finalize handles
   OXSFinalize(hOXSParameter); 
   OXSFinalize(hResponse);
   OXSFinalize(hOXSHandler);

OXSHandler is the main object of API. Application requests to OXS through this object. By invoking OXSInitialize function, you can get the handle of this object.
In OXSHandler, there are functions to request to execute (equivalent to DO=ex parameter in HTTP request) and there are functions which requests others (equivalent to DO=sv, DO=sl, DO=pl and DO=rc parameter in HTTP request).

Functions to request to execute can request document creation, server-side printing, FAX sending and mail sending. Each synchronous processing and asynchronous processing is prepared.
These functions use the parameter which is defined by OXSParameter object to request to OXS. By invoking OXSCreateParameter function, you can get the handle of this object.
If the processing is synchronous, returns handle of SyncResponse object, otherwise returns handle of AsyncResponse.
Application uses these objects to get status and generated document.
Functions to request to execute are the following.

OXSSyncCreate
Requests synchronous generation
OXSSyncPrint
Requests synchronous server-side printing
OXSSyncFax
Requests synchronous FAX sending
OXSSyncFaxA
Requests synchronous FAX (ACEL) sending
OXSSyncFaxI
Requests synchronous FAX (RICOH PCFAX) sending
OXSSyncMail
Requests synchronous mail sending
OXSAsyncCreate
Requests asynchronous generation
OXSAsyncPrint
Requests asynchronous server-side printing
OXSAsyncFax
Requests asynchronous FAX sending
OXSAsyncFaxA
Requests asynchronous FAX (ACEL) sending
OXSAsyncFaxI
Requests asynchronous FAX (RICOH PCFAX) sending
OXSAsyncMail
Requests asynchronous mail sending

OXS replies using cr_response.html etc which is defined in the configuration of OXS.
This API analyzes as encoding of the reply from OXS is Shift_JIS.
Therefore, in order for API to be used, cr_response.html etc have to be Shift_JIS, and 'charset' attribute of <ODDS>/<RESPONSE> in configuration of OXS has to be 'Shift_JIS'.
cr_response.html etc and RESPONSE are Shift_JIS as default value in setting up of OXS.