ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Timestamp timezone/offset trucated when using 'Build Tree'

Post new topic  Reply to topic
 Timestamp timezone/offset trucated when using 'Build Tree' « View previous topic :: View next topic » 
Author Message
mbtc
PostPosted: Mon Oct 07, 2013 6:30 am    Post subject: Timestamp timezone/offset trucated when using 'Build Tree' Reply with quote

Newbie

Joined: 04 Oct 2013
Posts: 5

Time-stamp timezone/offset component truncated when using 'Build tree using XML schema type'

I have identified the following behavior, and was wondering if it is a bug?

Message Broker 8.0.0.2
The timezone/offset is truncated when build message tree is selected.
The outcome is that you no longer know where the time is GMT or BST (summer time).

Example:

The message flow has an MQ Input Node:
>Input Message Parsing
> Domain: XMLNSC
> Model: (blnak as the project has a XSD defined in a library)
>>Parser Options
>> Build tree using XML schema type: ticked
>Validation
>> Validation: Content & Value

ESQL:

Code:

DECLARE ns NAMESPACE 'http://mydomain';
DECLARE input REFERENCE TO InputRoot.XMLNSC.ns:MyMessage;
DECLARE dt TIMESTAMP CAST(FIELDVALUE(input.Data.(XMLNSC.Attribute)timestamp) AS TIMESTAMP FORMAT 'IU');


An input of:

Code:

<tns:MyMessage xmlns:tns="http://mydomain">
<Data timestamp="2013-06-22T12:33:22+01:00" />
</tns:MyMessage>


Gives the following dt value: 2013-06-22T12:33:22

A time-stamp of: 2013-06-22T12:33:22Z
Gives the following dt value: 2013-06-22T12:33:22

It seems like the field has already been cast to a standard TIMESTAMP before I can apply the FORMAT 'UI' line.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 07, 2013 6:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

timestamp data in the LOGICAL message tree has no format.

The only place timestamp data has a format is in a bitstream.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 07, 2013 8:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Also you do not want it defined as TIMESTAMP but you want the field defined as GMTTIMESTAMP! Defining your field as timestamp has ramifications you don't want to get into.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Simbu
PostPosted: Mon Oct 07, 2013 9:32 pm    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

Hope this info will help you.

Quote:
By default, the XMLNSC parser uses the CHARACTER data type for all element and attribute values that the parser creates in the message tree. However, if you are using the XMLNSC parser to validate the XML document, you can select Build tree using XML Schema data types in the Parser options page of the input node. This causes element and attribute values to be cast to the message broker data type that most closely matches their XML Schema simple type. The exact mapping between XML schema types and message broker types can be found in XMLNSC data types


http://pic.dhe.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/ak34050_.htm
Back to top
View user's profile Send private message
mbtc
PostPosted: Wed Oct 09, 2013 1:12 am    Post subject: Reply with quote

Newbie

Joined: 04 Oct 2013
Posts: 5

Thanks Simbu, this makes it clear what I thought was happening.

I usually do have 'Build message tree' checked.
It is a shame that by default it casts it to TIMESTAMP, as the equivalent XML data type can have a time zone.

Cheers.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Timestamp timezone/offset trucated when using 'Build Tree'
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.