Database Reference
In-Depth Information
6. Start the main parsing loop and populate nodelists and nodes, using the following
code:
address_proplist := XXCU_COMMON_UTIL_XML.selectnodes
(v_inXmlDOM, msg_BO_root_url); FOR b IN 1 ..
XDB.DBMS_XMLDOM.getlength (address_proplist) LOOP
curnode1 := XDB.DBMS_XMLDOM.item (address_proplist, b
- 1); ....
7. Go through the DOM tree and map nodes to record elements using simple XPATH
expressions (process elements). Also, we advise you to use the NULL value sub-
stitution and remove line break functions, as shown in the following code. Imple-
mentation is skipped for brevity. We believe that you have a good understanding
about the illegal XML characters and how to handle line breaks:
...
v_tst_address_rec.addressID :=
NVL(XXCU_COMMON_UTIL_TXT.removestrbrakes((XXCU_COMMON_UTIL_XML.valueof(curnode1,'addressID'))),
v_null_value);
...
8. After parsing, we can call the business API using populated record(s) as input
parameters. The Business API should always return two output parameters:
v_status_code and v_error_message , where the first is code ( 0 : status
OK, 1 : API warning, 2 : critical API error, or any other coding at your choice),
and the second is a textual description of the API code. Based on the status code,
the framework will decide how to process a faulty message, shown as follows:
apps.xxcu_om_import_creditinfo_pkg.import_creditinfo(
p_data_parties => v_parties_int_rec,
p_data_addresses => v_addresses_int_rec ,
p_data_contactpts => v_contactpts_int_rec ... ,
p_data_creditratings => v_creditrtngs_int_rec ,
p_operating_unit_name => null , x_status_code
=> v_status_code, x_error_message =>
v_error_message );
9. Do not forget to close all temporary CLOBs and parsers, as shown in the follow-
ing code:
Search WWH ::




Custom Search