Editing Native Schema Files

6-8 Oracle Fusion Middleware Users Guide for Technology Adapters

6.2 Native Schema Constructs

This section provides an overview of the various constructs of native schema used to translate the native format data to XML and also explains the usage of these native schema constructs. This section includes the following topics: ■ Section 6.2.1, Understanding Native Schema Constructs ■ Section 6.2.2, Using Native Schema Constructs

6.2.1 Understanding Native Schema Constructs

Table 6–4 shows the constructs applicable only on the schema tag. Table 6–4 Constructs Applicable Only on the schema Tag Construct Description byteOrder The byte order of the native data as bigEndian or littleEndian. encoding The encoding in which the actual data is stored. UTF-8 is typically recommended for interoperability and Unicode support. You can specify any legal encoding supported by the Java runtime environment. For a complete listing of supported encodings, visit http:download.oracle.comjavase6docstechnotesguides intlencoding.doc.html Note that you You can specify the encoding in the NXSD associated with the adapter proxy meta data. For example, nxsd:encoding=iso-8859-1 nxsd:alwaysQuote Set to true if quotes must be forced around native non-xml data in the outbound. headerLines A positive integer specifying the number of lines to be skipped, before translating the native data. headerLinesTerminated By Skip until the specified string, before translating the native data. standalone If declared, adds the standalone attribute in the XML declaration prolog of the translated XML, with the actual value as that specified in nxsd:standalone. Allowed values are true and false. stream Whether the data is stored as characters or bytes. Allowed values are CHARS and BYTES. uniqueMessageSeparato r String specifying the unique message separator in the native data, in case of a batch of messages. version The type of native data. Possible values are NXSD, DTD, XSD, and OPAQUE. xmlversion If declared, adds the XML declaration prolog to the translated XML with the actual value as that specified in nxsd:xmlversion. Allowed values are 1.0 and 1.1. outboundHeader String specifying the header value to be inserted in the outbound message. dataLines Integer specifying the number of lines to process in the native file. Native Format Builder Wizard 6-9 Table 6–5 shows the constructs applicable on all tags other than the schema tag. fieldValidation If set to true, then translator performs data type validation on the tokens read from the native. Note: The fieldValidation construct is supported for built in simple types only. validation If set to true, then the translator performs result validation both on the inbound and outbound. validateNxsd If set to true, then a thorough native grammar validation is performed. This construct is switched off by default and must be switched off in production for better performance. useArrayIdentifiers If set to true, then it optimizes the native framework for handling array identifiers. This may result in a performance hit for very large payloads. By default, arrayIdentifiers are not supported. parseBom If set to true, then the byte order mark is looked for in the native stream and encoding is derived from this. encodeLineTerminators If set to true, then the semantic interpretation of {eol} is \r\n instead of \n. Table 6–5 Constructs Applicable On All Tags Other Than the schema Tag Construct Description arrayIdentifierLength The length of the array being stored in the native data occupying the specified length arrayLength The value of this construct is used as the length of the array, which can also be a variable resolved to a valid number. This value overrides any minOccurs and maxOccurs attributes of the particle where it is specified. Use this feature as follows: nxsd:style=array nxsd:arrayLength=10 This indicates that the array length is 10. arrayTerminatedBy The last item in the array being terminated by the specified string assign Assigns a value to the variable that is declared cellSeparatedBy The cells of the array in the native data being separated by the specified string choiceCondition Either fixedLength or terminated conditionValue Matches the string read from the native stream for the choiceCondition construct, against the specified string in the conditionValue construct dataLines The value specified in this construct is used to translate only a portion of the data and not the entire data. dateFormat A valid Java date format representing the date in the native data identifierLength The number of characters and bytes in which the actual length of the data is stored itemSeparatedBy The items in the list being separated by the specified string leftSurroundedBy, rightSurroundedBy The native data surrounded Table 6–4 Cont. Constructs Applicable Only on the schema Tag Construct Description