Payload Validation Payload validation involves validating the input and

Native Format Builder Wizard 6-49 If the XML message does not conform to the XML schema, then information about the exact line and character where the error was encountered is displayed. To implement field-level validation of XML messages: ■ The nxsd namespace in the message must be set to the following: xmlns:nxsd=http:xmlns.oracle.compcbpelnxsd ■ The validation flag must be set to true as follows: nxsd:fieldValidation=true For example: schema xmlns=http:www.w3.org2001XMLSchema xmlns:nxsd=http:xmlns.oracle.compcbpelnxsd targetNamespace=http:xmlns.oracle.compcbpelnxsdsmoketest elementFormDefault=qualified attributeFormDefault=unqualified nxsd:stream=chars nxsd:version=NXSD nxsd:fieldValidation=true

6.2.2.19.2 Schema Validation Schema validation involves validating the schema native

schemas or XML schemas that you define for the native or XML data formats to be translated by the Oracle JCA Adapters. To enable schema validation: ■ The nxsd namespace in the message must be set to the following: xmlns:nxsd=http:xmlns.oracle.compcbpelnxsd ■ The validate nxsd flag must be set to true as follows: nxsd:validateNxsd=true For example: schema xmlns=http:www.w3.org2001XMLSchema xmlns:nxsd=http:xmlns.oracle.compcbpelnxsd targetNamespace=http:xmlns.oracle.compcbpelnxsdsmoketest elementFormDefault=qualified attributeFormDefault=unqualified nxsd:stream=chars nxsd:version=NXSD nxsd: validateNxsd =true

6.2.2.20 Processing Files with BOM

The byte order mark BOM is a special U+FEFF Unicode character that describes the encoding of a byte sequence. The Native Format Translator can be configured to use BOM for determining the character encoding of the native input data. By default, BOM is not used. If your input data uses BOM, then set the nxsd:parseBom attribute to true in the native schema. Otherwise, the translator throws a parsing error. Note: The nxsd:validateNxsd=true validation flag does not affect payload level validations. 6-50 Oracle Fusion Middleware Users Guide for Technology Adapters The following is a sample nxsd file: ?xml version= 1.0 encoding= UTF-8 ? xsd:schema xmlns:xsd=http:www.w3.org2001XMLSchema xmlns:nxsd=http:xmlns.oracle.compcbpelnxsd xmlns:tns=http:TargetNamespace.comInboundService targetNamespace=http:TargetNamespace.comInboundService elementFormDefault=qualified attributeFormDefault=unqualified nxsd:parseBom=true nxsd:version=NXSD nxsd:stream=chars nxsd:encoding=UTF8 xsd:element name=Root-Element xsd:complexType xsd:sequence xsd:element name=mydata minOccurs=1 maxOccurs=unbounded nxsd:style=array nxsd:cellSeparatedBy={eol} xsd:complexType xsd:sequence xsd:element name=C1 type=xsd:string nxsd:style=fixedLength nxsd:length=3 xsd:sequence xsd:complexType xsd:element xsd:sequence xsd:complexType xsd:element xsd:schema

6.3 Translator XPath Functions

The translator XPath functions can translate data from a native format such as CSV, fixed-length, tab-delimited, and COBOL Copybook formats to an XML format and from an XML format to a native format. The translator XPath functions are of two types, streaming and non-streaming. The difference is that the streaming translator XPath functions implement the batching transformation approach while the non-streaming XPath functions do not implement the batching transformation approach. With the batching transformation approach, files that are of the order of a few gigabytes GB can be processed without running into memory issues. This section includes the following topics: ■ Section 6.3.1, Terminologies ■ Section 6.3.2, Translator XPath Functions

6.3.1 Terminologies

This section describes the terminologies that you must understand for using translation XPath functions. Attachment Element An attachment element unusually refers to the actual content elsewhere by using an href attribute. The actual content may be present in a file system or in a database table. An attachment is usually represented by using the following schema construct: element name=hrefelement complexType attribute name=href type=string