Database Reference
In-Depth Information
Function
Description
Open an
XML
tag for a nodelist or group of nodelists. The attribute can be used as
<Element>
.
XXCU.XXCU_COMMON_UTIL_XML.open_xml_tag
XXCU.XXCU_COMMON_UTIL_XML.close_xml_tag
Close the
XML
tag for a nodelist or group of nodelists as
</Element>
.
XXCU.XXCU_COMMON_UTIL_XML.get_attribute
Create an attribute for further use.
XXCU.XXCU_COMMON_UTIL_XML.print_xml_tag
Create fully formatted element, attribute available as
<Ele-
ment>data</Element>
.
Alternatively, you can use the standard
DBMS_XMLGEN
package (or older
DBMS_XMLQUERY
, which is implemented in Java and therefore in not supported with
Oracle DB Express Edition, thus this technique is not truly universal). Here
NULL
values
and date values are supported natively by
DBMS_XMLGEN.setnullhandling()
and
NLS_DATE_FORMAT
.
Message parsing
To complete the message-handling routines, we will discuss the inbound flows. The pro-
cessing of inbound messages is slightly different and not only because of the opposite
flows direction. First, we do not need Event Registration tables—we have AQs instead,
and they are pretty much tables as well. Secondly, you can have as many AQs as you
want; naturally, one table does not limit you. You can have separate AQ per TP and/or
Object or group of objects. You can even have only one AQ per object, serving all TPs
though the single object queue. All what you have to do is to declare this AQ as ADT-
based and then you will have the perfect possibility to dequeue messages by individual
handlers per TP. However, most importantly, for inbound XML messages, you will have
only one rule function based on XPath's
valueof()
and all rulesets will be just a collec-
tion of XPaths with expected values. You can achieve the highest level of parallelism and
keep everything manageable at the same time. Most probably you will decide to handle an
inbound message at the moment of dequeueing, so balancing the amount of handlers and
queues is your primary task as an architect. Once message parsed, all its elements will be
presented as a recordset and we will just call
INSERT
statements we already have for
core Entity tables (business APIs). Thus, the implementation sequence will be as follows:
1. Declare records parsed from XML values. The message header record
v_SBDHShort
for message header is mandatory and shall be preserved. At least
Search WWH ::
Custom Search