5.2.3.1.3 Diagnostics
If successful, this function must return the pointer value of
input parameter CustomerBuffer * a
.
If it fails, this function returns NULL
as shown in the example below:
Example 5-5 Converting XML Effective Payload to Oracle Tuxedo Custom Typed Buffer Pseudo Code
CustomerBuffer * myxml2buffer (void * xercesDOM, CustomerBuffer *a, CustType_Ext * extinfo)
{
// casting the input void * xercesDOM to class DOMDocument object
DOMDocument * DOMTree =
// allocate custom typed buffer via tpalloc
a->buf = tpalloc("MYTYPE", "MYSUBTYPE", 1024);
a->len = 1024;
// fetch data from DOMTree and set it into custom typed buffer
DOMTree ==> a->buf;
if ( error ) {
release ( DOMTree );
tpfree(a->buf);
a->buf = NULL;
a->len = 0;
return NULL;
}
release ( DOMTree );
return a;
}
Tip:
Oracle Tuxedo 22c bundles Xerces 3.2.3.