API browser of generalnotification451 COM module


/images/arrow_right.png IGeneralNotificationManager::GetXML method space
The GetXML method generates the XML infoset based either on the data of a new notification using the IGeneralNotificationRequest interface or based on the received and replied XML infoset. In both cases the generation attributes are applied to the infoset generation, the XML is then validated against the XSD schema, and finally stored as UTF8 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!

Note about compatibility: the COM module is natively capable of producing the predecessor standard generalNotification440 by using the lGenerationAttributes=enGenerateDowngradeToV440. This option should be used as long as not all communication partners do understand the generalNotification450 standard.

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 lGenerationAttributes = enGenerateXMLWithoutDocuments.

space
/images/arrow_right.png Restful webservice calling syntax
[POST] /baseURL/IGeneralNotificationManager/GetXML
[JSON input data] pIGeneralNotificationManager:
lGenerationAttributes:
plTimestamp:
longValue,    //interface address
longValue,
longValue
[JSON result data] pbstrOutputFile:
plValidationError:
plTimestamp:
pbstrUsedSchema:
pIGeneralNotificationResponse:
pbStatus:
"utf8StringValue",
longValue,
"utf8StringValue",
longValue,
booleanValue
 
[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.
space
/images/arrow_right.png C/C++ calling syntax
HRESULT GetXML( long
BSTR
long
long
BSTR
IGeneralNotificationResponse
VARIANT_BOOL
lGenerationAttributes,
*pbstrOutputFile,
*plValidationError,
*plTimestamp,
*pbstrUsedSchema,
**pIGeneralNotificationResponse,
*pbStatus);
[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.
space
/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 "excludes" 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!).

[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 DOM parser. A zero value indicates that the validation was successful.
[in,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 notification object reference from that point on.

In a reply situation the "old" timestamp of the received XML infoset is returned.

[out] BSTR *pbstrUsedSchema The full name of the used XSD schema file.
[out] IGeneralNotificationResponse **pIGeneralNotificationResponse The instance of a IGeneralNotificationResponse interface allows to read back all currently loaded data.
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.
space