API browser of generalFormRequest450 COM module

/images/arrow_right.png IGeneralFormRequestManager::GetXML method space
The GetXML method generates the XML infoset based the currently loaded and reviewed PDF form and the XML generation attributes. The such generated infoset is validated against the XSD schema, and stored as UTF8 XML file in the internal working directory. The full file name to this XML document is returned in the pbstrOutputFile output variable. The XML file must be saved to a different location as all temporary XML files in the working directory are deleted before the COM module shuts down!

The generalFormRequest system does not endorse a paradigm of "completeness" or "100% preset capability". Therefore, the PDF form can only be finalized by a user-driven review process whereas the visualization is done by Acrobat Reader using the preset PDF form. After that review and modification process the final XML can be produced based on the final PDF form. However, the review process is suppressed if and only if neither an empty PDF form template was loaded nor any data was altered between the initial load of the PDF and the XML generation.

Note about encryption: an encrypted XML infoset can not be loaded successfully by LoadXML. Therefore, to build a local archive besides encrypted XML infoset call GetXML twice once with the lXMLGenerationAttributes = enGenerateWithoutEncryption

In Restful Webservice environment: the data visualization step can obviously not be performed on the Restful Webservice. Due to the lack of the former, no further user-defined data can be added to the PDF form, nor can the form be sent via a 'DirectSend' functionality in the PDF itself.

Consequently, the process-technically correct way to generate an XML Infoset is that the data of the visualization step is already included. This means that a data file with the complete set of variables is loaded via LoadPDF or LoadXML and then only XML-specific data is added. The latter are set and defined via the methods IGeneralFormRequest::SetRequest, IGeneralFormRequest::SetTransport, IGeneralFormRequest::SetPackage,IGeneralFormRequest::SetRefObject and IGeneralFormRequest::AddDocument. Most of these methods are necessary for creating a schema-valid XML infoset.

/images/arrow_right.png Restful webservice calling syntax
[POST] /baseURL/IGeneralFormRequestManager/GetXML
[JSON input data] pIGeneralFormRequestManager:
longValue,    //interface address
[JSON result data] pbstrOutputFile:
[HTTP result status] 200 Return status 200 signals a successful method call
204 Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
/images/arrow_right.png C/C++ calling syntax
[C/C++ return value] S_OK This value is returned if the function call was successful.
S_FALSE This value is returned if the end of an iteration is reached
E_name This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
/images/arrow_right.png Calling argument description
[in] long lGenerationAttributes This variable overrules the default behavior of the XML generation process even if the appropriate data have been defined.

lGenerationAttributes is a 32-bit integer where the possible "commands" are values from the generationAttributes data type ORed together to form the overall command.

This feature is necessary to generate different "flavors" of XML infosets without re-setting input data. For instance, an encrypted XML infoset for the "to" entity can be produced and in a second call the XML infoset without encryption (lGenerationAttributes=enGenerateXMLWithoutEncryption) is requested for a local archive (that can be loaded back later!).

Moreover, the downgrade to the lower version is defined by setting the enGenerateDowngradeToV430 bit.

[out] BSTR *pbstrOutputFile The full file name (path + name) where the XML infoset is stored in UTF-8 mode.

The XML file must be saved to a different location as all temporary XML files in the working directory are deleted before the COM module shuts down!

In Restful Webservice output: pbstrOutputFile is a releative URL which must be downloaded in a subsequent GET process.

[out] long *plValidationError lValidationError is filled with the validation error code returned by the MSXML-4 parser. A zero value indicates that the validation was successful.
[out] long *plTimestamp The timestamp of the XML document as epoch time (seconds elapsed since 1.1.1970) that is used as timestamp of the topmost object reference from that point on.

If the timestamp for the topmost object reference was already set (e.g. to produce a copy) then this same timestamp is returned.

[out,retval] VARIANT_BOOL *pbStatus Return status of the method. If pbStatus is VARIANT_FALSE then an error occurred and GetAbortInfo should be called to retrieve the error string.