Bookshelf Home | Contents | Index | PDF |
Web Services Reference for Oracle Self-Service E-Billing > Customizing RESTful Resources > About Customizing Localization ValuesThis topic describes additional information about customizing localization using Web services with Oracle Self-Service E-Billing. Customizing the LocaleThe locale values of the request and response are specified in the HTML header. In service requests, the locale can be retrieved from the Accept-language attribute. Oracle Self-Service E-Billing supports one acceptable language for each request. The following XML shows an example of a request using the Accept-language attribute: POST /rsclient/webservice.action HTTP/1.1 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.7) Gecko/20100101 Firefox/10.0.7 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate In the service responses, the locale value is in the Content-Language attribute, as shown: Date: Wed, 05 Sep 2012 22:14:15 GMT Content-Type:application/xhtml+xml X-Powered-By:Servlet/2.5 JSP/2.1 Customizing the Date FormatFor a particular locale, when parsing date values in requests or output date values in responses, the pattern used to convert a string to or from the date value is specified in an attribute of the date tag element. For example: <Call_date pattern="MM/dd/yyyy">09/15/2012</Call_date> This date attribute is included in all responses of GET requests. For all POST and PUT resources, the Oracle Self-Service E-Billing server requires the XML payload to specify date pattern in the tag element attribute. The server code can then parse the information accordingly. In the following input XML example, the Accept-Language element is es_ES in the request header: <accountNumber>7836380B2B1</accountNumber> <currBalance>786,00</currBalance> <lastPaymentReceivedAmount>120,00</lastPaymentReceivedAmount> <lastPaymentReceivedDate pattern="dd/MM/yyyy">13/08/2012</lastPaymentReceivedDate> If the date pattern is not explicitly specified in the element attribute, then the default date pattern is used. The default date pattern for each supported locale is specified in the webservice.xma.xml file, located in the following directory: In the webservice.xma.xml file, the bean Numbers and CurrenciesNumbers in both requests and responses use the default pattern of the authenticated user's preferred locale. For example, the number 120.00 is displayed in locale en_US and 120,00 in the es_ES locale. The currency information does not change when the user's locale preference changes. The currency information comes from the statement fact, and this currency information is used in the billing system for the account. The currency code that is displayed in the Web application is included as part of the XML response. For GET business object resources, the currency code is specified in an attribute of a tag element, for example: <disputeRefNumber>900067</disputeRefNumber> <accountNumber>7836380B2B1</accountNumber> <disputeAmount>12.3</disputeAmount> <disputeDesc> chris webservice</disputeDesc> <disputeReason>1</disputeReason> <disputeStatus>open</disputeStatus> For GET report resources, the currency code is specified in the <Header> tag for each column that requires the currency, for example: |
Web Services Reference for Oracle Self-Service E-Billing | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |