How to return dateTime values in local time zone in a Web service with WebSphere Process Server (WPS)

Technote (troubleshooting)


Problem(Abstract)

Returning dateTime values in Web Services Service Component Architecture invocations is always in the Greenwich Mean Time (GMT) time zone in WebSphere Process Server. This time zone is used even when corresponding requests contain dateTime values in another time zone.

Symptom

This issue is relevant, for example, if a web service is invoked using a Web Services Definition Language (WSDL) interface with an output of dateTime type in a Service Component Architecture (SCA) export. In WebSphere Process Server, the response is normalized to the Greenwich Mean Time (GMT) time zone, even when the requests were sent in a time zone other than Greenwich Mean Time.


Cause

In WebSphere Process Server, for consistency reasons, business objects that contain dates of dateTime type are designed to only serialize to the Greenwich Mean Time time zone. This approach assures that time zone conversion problems do not exist between the sender and receiver. It is up to the receiver to decide how to validate the dates received.

Beginning in WebSphere Process Server V7.0, but not in earlier releases, the WAS_XSDATE_BEHAVIOR parameter is introduced in the BusinessObject.properties file, which is present in the install_root/plugins/com.ibm.ws.bpm.bo.emf.jar file. The WAS_XSDATE_BEHAVIOR parameter defines which time zone is assumed for date typed properties during business object deserialization and serialization. A value of TRUE sets the assumed time zone to be the default local time zone. A value of FALSE sets the assumed time zone to be the Greenwich Mean Time time zone and normalizes the values to Greenwich Mean Time. This change is described in the WebSphere Process Server V7.0 Information Center.

It is important to note that WAS_XSDATE_BEHAVIOR parameter is valid only for date typed values and not for dateTime typed values.

It is also important to note that the previous considerations are valid when the actual business objects parsing takes place which is the case when eager parsing mode is used. In the case of lazy parsing mode, the actual parsing of business objects might or might not take place depending on user custom implementation.


Resolving the problem

To resolve the issue in WebSphere Process Server when you use dateTime typed values, use a custom data handler to serialize business objects with a localized time zone.


When you use date typed values in WebSphere Process Server V7, you can use the parameters that are provided in the BusinessObject.properties file.


Related information

WebSphere Integration Developer V7.0 Information Center
WebSphere Process Server V7.0 Information Center
Business object parsing mode in WPS V7

Product Alias/Synonym

WPS

Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere Process Server
Web services

Software version:

6.1, 6.2, 7.0

Operating system(s):

AIX, HP-UX, Linux, Linux zSeries, Solaris, Windows

Reference #:

1503646

Modified date:

2011-11-16

Translate my page

Machine Translation

Content navigation