Defining Date Formats with Time Zone

Native Format Builder Wizard 6-47 sequence element name=StartDate type=date nxsd:dateFormat=MMddyy nxsd:localeLanguage=en nxsd:style=fixedLength nxsd:length=8 element name=EndDate type=date nxsd:dateFormat=ddMMyy nxsd:style=terminated nxsd:terminatedBy={eol} element name=Milestone type=dateTime nxsd:useTimeZone=UTC nxsd:dateFormat=MM-dd-yyyy nxsd:style=terminated nxsd:terminatedBy={eol} element name=DueDate type=dateTime nxsd:useTimeZone=UTC nxsd:dateFormat=ddMMyyyy nxsd:style=terminated nxsd:terminatedBy={eol} element name=Date type=dateTime nxsd:useTimeZone=UTC nxsd:dateFormat=MMddyyyy hh:mm nxsd:style=terminated nxsd:terminatedBy={eol} element name=Date type=dateTime nxsd:useTimeZone=UTC nxsd:dateFormat=MMddyyyy hh:mm:ss nxsd:style=terminated nxsd:terminatedBy={eol} element name=LongDateInEnglish type=dateTime nxsd:displayTimeZone=true nxsd:useTimeZone=IST nxsd:dateFormat=EEE, d MMM yyyy HH:mm:ss zzzz nxsd:localeLanguage=en nxsd:localeCountry=US nxsd:style=terminated nxsd:terminatedBy={eol} element name=LongDateInGerman type=dateTime nxsd:displayTimeZone=true nxsd:useTimeZone=IST nxsd:dateFormat=EEE, d MMM yyyy HH:mm:ss zzzz nxsd:localeLanguage=de nxsd:style=terminated nxsd:terminatedBy={eol} element name=InvalidDate type=dateTime nxsd:useTimeZone=UTC nxsd:dateParsingMode=lax nxsd:dateFormat=yyyyMMdd nxsd:style=terminated nxsd:terminatedBy={eol} element name=MyFormatDate type=string nxsd:dateFormat=MMddyy nxsd:xmlDateFormat=dd-MM-yyyy nxsd:localeLanguage=en nxsd:style=fixedLength nxsd:length=8 sequence complexType element schema Translated XML Using Native Schema: dateformat xmlns=http:xmlns.oracle.compcbpelnxsdsmoketest StartDate2002-11-16StartDate EndDate2002-11-24EndDate Milestone2002-11-20T00:00:00Milestone DueDate2002-11-23T00:00:00DueDate Date2003-01-02T01:02:00Date Date2003-01-02T03:04:05Date 6-48 Oracle Fusion Middleware Users Guide for Technology Adapters LongDateInEnglish2005-05-26T15:50:11+05:30LongDateInEnglish LongDateInGerman2005-05-26T15:43:10+05:30LongDateInGerman InvalidDate2008-08-02T00:00:00InvalidDate MyFormatDate16-11-2002 MyFormatDate dateformat

6.2.2.19 Implementing Validation During Translation

You must configure Oracle JCA Adapters to implement validation during translation. Validation helps ensure that Oracle JCA Adapters do not publish invalid messages during translation. You can implement either one or both of the following types of validation: ■ Payload Validation ■ Schema Validation

6.2.2.19.1 Payload Validation Payload validation involves validating the input and

output XML messages that are processed by Oracle JCA Adapters. You can set payload validation at one of the following levels: ■ Top-Level Validation ■ Field-Level Validation Top-Level Validation In top-level validation, the DOMResult result in the form of a Document Object Model is validated against the XML schema. This form of validation is implemented on both inbound and outbound payloads. This form of validation can control the publishing of invalid records and provide information about XML validation errors. However, it does not provide translation context. For example, information about the line and column in the native stream where the error was encountered is not provided by top-level validation. To implement top-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:validation=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:validation=true Field-Level Validation In field-level validation, the individual fields are validated against the XML schema. This form of validation is implemented only on inbound payloads, not on outbound payloads. 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.