Database Reference
In-Depth Information
more, providing you with great flexibility and deferred execution options, but adds extra
latency at the same time. You can select the architectural model more suitable for you.
Message construction
Actual construction is pretty much straightforward. We just have to keep in mind that we
are constructing two types of objects: Message Header and Payload. As CLOBs, they will
be combined together at the final stage of construction.
Using XDB construction functionality we can build any XML using a standard set of
commands ( XMLELEMENT , XMLAGG ) in a standard SQL SELECT way; see the following
constructor for a bank's Credit Monitoring message:
SELECT DISTINCT xmlelement("CreditMonitoring",
xmlagg(XMLELEMENT("Country", XMLELEMENT("Country", 'SE'),
XMLELEMENT("CustomerCode",fnd_profile.VALUE('XXCU_AR_SEBNORDBANKIUID')),XMLELEMENT("CustomerCode",
v_blank_value), XMLELEMENT("CountryCode", p.country) ,
XMLELEMENT("CountryRegistrationNumber",
REPLACE(cm.organization_no,
'-','')), XMLELEMENT("DUNSnumber", NVL(p.duns_number,
'1234567890')), XMLELEMENT("CustomerId", v_blank_value) ,
XMLELEMENT("CustomerId2",
v_blank_value),XMLELEMENT("Belop1",
v_blank_value),XMLELEMENT("Belop2",
v_blank_value)))).getclobval() into v_xml_message FROM
xxcu_ocm_credit_monitoring_all
cm,xxcu_ocm_credit_monitoring_v cm, ar.hz_parties p WHERE
cm.utmeldt_dato IS NULL AND NVL (cm.status, 'x') = 'A' AND
cm.party_id = p.party_id
The output will be CLOB containing our XML message. The presented message is fairly
simple and so the statement is, but beware—real-life messages (Orders, Bill of Ladings,
Cargo Manifests) can be several pages long. Still, it's probably the most common way of
XML construction, as the XSU XDK utility (9 i , 10 g ) is rather obsolete. The XML mes-
sage can be constructed in a familiar way and sent directly to TP (using AQ).
The important point here is that the ways of XML message construction are probably im-
portant for SOA realization but not directly related to the minimization of the Adapter
framework and efforts related to it. From the task definition, we know that in RRD, we
already have a huge amount of reusable SQL cursors (available in package specifications)
Search WWH ::




Custom Search