The following describes how languages, timezones and locales are specified and interpreted in the Oracle Determinations Server.
As of sometime around 10.0 the determinations server allowed timezones and languages to be specified using the WS-I18N draft standard. 10.2 also relies on WS-I18N to communicate timezone and locale information, however this mechanism has been standardized for this release. The spec itself provides a means of specifying locale and timezone information in the SOAP header of a web services call. It will look something like:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:i81n="http://www.w3.org/2005/09/ws-i18n" xmlns:typ="http://oracle.com/determinations/server/10.2/server/types">
<SOAP-ENV:Header>
<ii8n:international>
<i18n:locale>en_US</i81n:locale>
<i18n:tz>GMT+1000</i81n:tz>
</i81n:international>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<!-- contents ....-->
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
where the 'locale' element specifies the locale and the 'tz' element specifies the timezone.
All responses will supply both locale and timezone information relating to the current request. However, whether or not either a locale and/or a timezone must be specified in a request will depend on the individual service itself, more information on which can be found below.
Where applicable the locale element is used in the request to specify the language to be used in the rulebase session, as distinct from the session's region settings (see below ). The exact behavior for each service is:
The list of available languages for a give rulebase can be discovered by doing a ListRulebases .
The time zone element is used to indicate the time zone of the Determinations Server itself which can be determined by making a GetServerInfo request. Specifying a time zone is optional in all requests, however, if a time zone is specified in a request, it must match the server's time zone or else an error will be returned. In Java the i18n:tz element can either be specified as an Olsen ID or an RFC 822 offset, however in .NET it must be specified as an RFC 822 offset.
Any Determinations Server error message (that is, SOAP Fault messages) will be returned in the 'en-US' locale and can not be localized. Formatting and displaying error messages is a presentation layer concern.
Any DateTime value specified in either an Assess or Interview service request without a timezone will be interpreted as being in the timezone of the current session. Any DateTime that explicitly provides timezone information, that timezone must match the session's timezone, otherwise an error will be returned. Under no circumstances will the Determinations Server attempt to convert from one timezone to another. We also don't support values prior to 0001-01-01 so specifying a DateTime value with a minus sign will cause an error.
Since the Determinations Engine considers Dates and Time of Day values to be absolute points in time, that is, they are not relative to any particular timezone, any timezone information provided will be ignored. Like DateTime values, we also don't support values prior to 0001-01-01 so specifying a date value with a minus sign will cause an error.
All attribute values in a Determinations Server request and responses are never localized and are specified in the 'culture neutral format'. The formats are:
Type | Format | Example |
---|---|---|
boolean | xsd:boolean - [true|false] | [1|0] | 'true', 'false', '1', '0' |
date | xsd:date - YYYY-MM-DD | 2010-12-24 |
datetime | xsd:dateTime - YYYY-MM-DDThh:mm:ss plus an optional timezone specified as a UTC offset | 2010-12-24T20:30:55, 2010-12-24T20:30:55+10:00 |
time | xsd:time - hh:mm:ss | 23:59:59 |
text | xsd:string | 'Hello, World', '???', '??? ? ????', 'Bonjour tout le monde', 'Hola a todos', '??, ?????' |
number | xsd:decimal | '42', '0.42' '-0.00042', '+420000.42' |
Even though attribute values are never entered nor returned in a localized manner, there are still some instances where the formatted attribute value appears, namely when that value has been used in text substitution - for example, attribute text, decision report node text, question screen labels and captions. In this case, the determinations server will use a default formatter which will provide default formatting for the specified session locale.
The default behavior can be altered by using a custom formatter.