Database Reference
In-Depth Information
one business object record must be declared. This record(s) will be later used as
input parameter for your business API. The record can be based on business
OEBS table, or any other structure from a custom RRD business object as:
v_tst_address_rec
xxcu_EHS_tstaddr_parser.tst_address_rec;
v_SbdhShort XXCU_EHS_MESSAGE_HEADER.SBDH_rec;
2. Declare XML parsers, nodes, and nodelists. The number of nodes and nodelists
must be equivalent to the number of related objects in the received XML. Reserve
the first nodelist for message header values. We could use the values from it later
in your API call (it's our object context):
v_inXmlDOM XDB.DBMS_XMLDOM.domdocument;
parser XDB.DBMS_XMLPARSER.parser;
style XDB.DBMS_XSLPROCESSOR.stylesheet;
curnode0 XDB.DBMS_XMLDOM.domnode;
curnode1 XDB.DBMS_XMLDOM.domnode;
msg_msgheader XDB.DBMS_XMLDOM.domnodelist;
address_proplist XDB.DBMS_XMLDOM.domnodelist;
theDocElt XDB.DBMS_XMLDOM.DOMElement;
3. Oracle XDK parsers are namespace-aware. We have to take it into account pars-
ing different namespaces with different prefixes, or just strip them completely us-
ing search and replace, leaving only the MH namespace in place. This solution is
rather dirty as we handle XML as a plain text, but if no security concern is ex-
pressed, this solution can be really quick and simple.
4. Parse the document (inbound CLOB). Another thing to remember is that Oracle
Applications can have several DOM and SAX parsers, so we should use the
DOM parser associated with version 10gR1 and higher (RRD current solution is
on 11gR2 ). In R11 / R12 , the parser is in the XDB schema:
parser := XDB.DBMS_XMLPARSER.newparser;
XDB.DBMS_XMLPARSER.parseclob (parser, olob);
v_inXmlDOM := XDB.DBMS_XMLPARSER.getdocument (parser);
XDB.DBMS_XMLPARSER.freeparser (parser);
5. The get_SBDH procedure returns the standard business document header using
XMLDOM as an input parameter.
Search WWH ::




Custom Search