7. ASOLib—OpenROAD Server Library : XML Parameters for Use with GSCPs
 
Share this page                  
XML Parameters for Use with GSCPs
XML input/output capability is automatically enabled for all 4GL methods and procedures that are exposed as Generated Service Call Procedures (GSCPs). No special XML programming or conversion is required in your OpenROAD Server application. This powerful capability can be used for simple XML reporting or XML data interchange with external tools or organizations. It can also play a key role in exposing a 4GL application as a web service.
When a BPM user class method or procedure is exposed as a GSCP, the GSCP contains the original parameter signature and four additional parameters that are added automatically. These parameters facilitate OSCA error handling and the passing of data in XML format, both into and out of the method.
b_osca
(Required.) This parameter is an instance of the Object Server Communications Area structure. For more information, see uc_osca (OpenROAD Client) (see uc_osca (OpenROAD Client)). It is used for error handling and persistent session context management.
b_so_xml
(Optional.) If this parameter is passed by the client, after the method or procedure has executed, it contains a well-formed XML document generated from the parameter interface immediately prior to returning. It is passed by reference.
p_arr_UCXML_Include
(Optional.) This parameter works with b_so_xml. If XML output is required, but only a subset of the parameter interface is required in the XML output, use this array to describe the parameters you want to include.
p_so_xmlin
(Optional.) If this parameter is passed, this StringObject must contain an XML document. XML data is copied automatically to the corresponding 4GL parameter where the tag name matches the 4GL parameter name. This occurs prior to executing the 4GL method or procedure.
The XML received by p_so_xmlin can be preprocessed before it is converted to 4GL parameters, and the XML generated from the 4GL parameters can be postprocessed before being returned in b_so_xml. Further details about how to drive the automatic XML-4GL conversion are in the examples that follow.