Real Time Information Director User Documentation
RTID Message Format and Programmatic Interfaces
Hewlett-Packard Company 4 529618 - 002
<SALES_ORDER>
<SALES_DOCUMENT_TY>YOR</SALES_DOCUMENT_TY>
<PRECEDING_DOCUMENT_NO>0200114533</PRECEDING_DOCUMENT_NO>
<CUSTOMER_PURCHASE_ORDER_DT>2002-10-
18</CUSTOMER_PURCHASE_ORDER_DT>
<INCOTERMS_2_TX>DELIVERED DUTY UNPAID</INCOTERMS_2_TX>
<SOURCE_NM>ORDERS05SAPAPL</SOURCE_NM>
…
<ROLE_SPEC_SLS_ORD_EVENT>
<EVENT_SPEC_CUSTOMER_NO>ZHPF400</EVENT_SPEC_CUSTOMER_NO>
<EVENT_SPEC_LANGUAGE_CD>E</EVENT_SPEC_LANGUAGE_CD>
…
</ROLE_SPEC_SLS_ORD_EVENT>
<ROLE_SPEC_SLS_ORD_EVENT>
<EVENT_SPEC_TITLE_TX>Company</EVENT_SPEC_TITLE_TX>
<EVENT_SPEC_LANGUAGE_CD>E</EVENT_SPEC_LANGUAGE_CD>
…
</ROLE_SPEC_SLS_ORD_EVENT>
Here are several tags for the record ROLE_SLS_ORD_EVENT. Each instance of
ROLE_SLS_ORD_EVENT includes elements populated from fields of that record.
In standard XML terminology, NATIVEORDERS, SALES_ORDER are complex
elements. However, in Director documentation, we refer to complex elements as
“segments” and use the term “element” only to refer to the lowest-level XML tags that
surround data of individual fields. This use of the term “segment” comes from SAP.
XML Schema for Native Documents
In order for clients to send valid XML documents to the Director, the metadata developer
uses a utility called Export to create an XML schema (XSD) for each document
definition, including the “_R” definitions that the Director generates. The syntax for
Export is given in the RTID Extensibility module.
A source system or client uses an XSD file to validate XML messages to be sent to the
Director. The Director itself does not use the XSD files to validate incoming XML; if
invalid XML input is received, the Director attempts to insert it (or to use it for a query)
and might fail with an SQL exception or with a Java runtime exception.
XML Encoding Support in the Director
The Director detects and supports the encoding specified for an incoming document. The
encoding is an optional attribute in the <?xml> tag at the beginning of a document, as in
the following examples:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml version="1.0"> ( IF no encoding is specified, an encoding of iso-8859-1 is defaulted)
In parsing the XML document, the Director parses the encoding type and interprets the
message accordingly. If no encoding is specified, ISO 8859 encoding is assumed. If you
need some other encoding—for example, if the input stream includes double-byte