API browser of generalInvoiceRequest430 COM module


/images/arrow_right.png IGeneralInvoiceRequestManager::GetXML method
The GetXML method generates the XML infoset based on the data of the IGeneralInvoiceRequest interface and the XML generation attributes, validates the XML against the XSD schema, and stores the XML content as UTF8 file in the internal working directory. The full file name to this XML document is replied 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!

As a migration help there is a downgrade facility implemented that allows to override the generation of the V430 infosets. The downgrade to a lower versions (V400 and V410) is done by a delegation mechanism using the target version's COM module. and setting the appropriate timestamp argument plTimestamp !

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

space
 
/images/arrow_right.png C/C++ calling syntax
HRESULT GetXML( long
BSTR
long
long
BSTR
IGeneralInvoiceResult
VARIANT_BOOL
lXMLGenerationAttributes,
*pbstrOutputFile,
*plValidationError,
*plTimestamp,
*pbstrUsedSchema,
**ppIGeneralInvoiceResult,
*pbStatus);
 
/images/arrow_right.png Calling argument description
[in] long lXMLGenerationAttributes This variable defines which principal parts of the XML generation should not be carried out even if the data for that part are defined. lXMLGenerationAttributes is a 32-bit integer where the possible excludes are values from the XMLGenerationAttributes data type and are 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 "toEan" entity can be produced and in a second call the XML infoset without encryption and documents (lXMLGenerationAttributes = enGenerateWithoutEncryption | enGenerateWithoutDocuments) is requested for a local archive (that can be loaded back later!).

[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!

[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.

Normally this would be generalInvoiceRequest_430.xsd. However, in the downgrade situation the XSD schema name is adjusted appropriately.

PATCH: by setting the plTimestamp variable as

  • lTimestamp = -323456780  -  enforce upgrade
  • lTimestamp = -223456780  -  enforce downgrade
the white list behavior is overridden and the downgrade or upgrade action is enforced.
[out] BSTR *pbstrUsedSchema The full XSD name that was used to generate the data.

Normally this would be generalInvoiceRequest_440.xsd. However, in the downgrade situation managed by the plTimestamp variable the XSD schema name is adjusted appropriately.

[out] IGeneralInvoiceResult **ppIGeneralInvoiceResult The IGeneralInvoiceResult interface handles that allows to get all loaded data back.
The handle is NULL if an error occurred.
[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.
 
/images/arrow_right.png C/C++ return value
S_OK This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
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.