IBM Support

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

Troubleshooting


Problem

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.

[{"Product":{"code":"SSQH9M","label":"WebSphere Process Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Web services","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.0;6.2;6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WPS

Document Information

Modified date:
15 June 2018

UID

swg21503646