Author |
Message
|
tsuru |
Posted: Thu Apr 22, 2010 7:43 am Post subject: [SOLVED] .NET WebService DateTime incompatibility |
|
|
Novice
Joined: 25 Nov 2005 Posts: 24 Location: São Paulo
|
.NET WebService Client consumes a Message Broker 6.1 WebService, but when it sends a DateTime field the Broker replies with:
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = '/build/S610_P/src/cpi/bsutils/pwffrmtr.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 478 (INTEGER)
(0x03000000:NameValue):Function = 'PWFDateTimeFormatter::parse' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 5540 (INTEGER)
(0x03000000:NameValue):Text = 'CPI Unable to parse datetime internally' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = '2010-02-01T00:00:00.0000000-02:00' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'yyyy-MM-dd'T'HH:mm:ssZZZ' (CHARACTER)
I know that this problem relates to fractional seconds size(must be up to 6 as documented at infocenter http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak17890_.htm)
Does anyone know how to resolve this problem?
Thanks,
Tsuru.
Last edited by tsuru on Thu Apr 22, 2010 12:18 pm; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Apr 22, 2010 8:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Your pattern 'yyyy-MM-dd'T'HH:mm:ssZZZ' DOES NOT MATCH your data '2010-02-01T00:00:00.0000000-02:00'
Fix your pattern or fix your data.
The broker documentation would have told you this, and will tell you how to adjust your pattern if that's your choice of thing to change. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Apr 22, 2010 9:29 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
There is a lovely section in the Documentation/InfoCentre that covers this stuff.
It really is essential reading for Developers.
No, I don't have a link but can be found by a little searching for DateTime Formats. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
tsuru |
Posted: Thu Apr 22, 2010 11:17 am Post subject: |
|
|
Novice
Joined: 25 Nov 2005 Posts: 24 Location: São Paulo
|
Sorry, I sent an old log.
I put the 'yyyy-MM-dd'T'HH:mm:ss.SSSSSSSZZZ' (with seven 'S's) as the datetime mask and got the same error.
The test went ok when I put 'yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZZ' (with six 'S's) and 2010-02-01T00:00:00.000000-02:00 in the test message.
InfoCenter link (sent previously) says:
Quote: |
The optional fractional seconds field can be 0 - 6 digits long. |
So I can conclude that you cannot build a mask with more than 6 'S's. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Apr 22, 2010 11:43 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
So, you are essentially dealing with a slightly non standard format.
By standard, I mean the ISO Standard.
If I were you, I'd do two things after checking that the format required is indeed non standard
1) Push back and find out why you are having to use a non ISO Standard format in the hope that the other party will agree to change their requirements slightly.
2) Write a little bit of ESQL to add the required '0' character(s) into a string to give you the non standard format you are probably going to have to support. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
tsuru |
Posted: Thu Apr 22, 2010 11:44 am Post subject: |
|
|
Novice
Joined: 25 Nov 2005 Posts: 24 Location: São Paulo
|
Seems like 6 'S's limitation affects HTTPInput Node. I've replaced it with SOAPInput Node and voilá it's working perfectly! |
|
Back to top |
|
 |
tsuru |
Posted: Thu Apr 22, 2010 11:57 am Post subject: |
|
|
Novice
Joined: 25 Nov 2005 Posts: 24 Location: São Paulo
|
smdavies99,
I read about XML Schema definition of xsd:dateTime, that was inspired by ISO 8601:
http://www.w3.org/TR/xmlschema-2/#dateTime
The standard does not limit the fraction of seconds field size... they only say: "zero or more fraction of seconds digits"...  |
|
Back to top |
|
 |
|