|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Date Validation Error |
« View previous topic :: View next topic » |
Author |
Message
|
TonyD |
Posted: Mon Dec 15, 2003 10:20 pm Post subject: Date Validation Error |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
I am experimenting with validation of input messages against an imported XML schema. The schema includes an element EffectiveFromDate of type 'date', physical representation 'yyyy-MM-dd'.
The relevant portion of the message I am validating is:
Code: |
<CustomerBaseInfo>
<CustomerID></CustomerID>
<EffectiveFromDate>2003-01-01</EffectiveFromDate>
|
When 'Content and Value' validation is specified, the message is rejected with the following error message:
Code: |
Message Validation failure. Invalid value for element urn:iag:tpod:nfe:xsdschema:customercreaterequest:1.0:132^EffectiveFromDate.
The value 2003-01-01T00:00:00.000 does not conform to the DateTime type as denoted by template 'CCYY-MM-DD'. |
Where did 'T00:00:00.0000' (time) come from?! |
|
Back to top |
|
 |
skn |
Posted: Tue Dec 16, 2003 10:03 am Post subject: |
|
|
 Centurion
Joined: 21 May 2003 Posts: 112 Location: Dallas
|
Time is always a part of the Datetime type.Whats written to the message tree is dependent on the format you specify.If your input matches the format given,the message should go through.How are the properties specified on the message set (like physical type,length count etc). |
|
Back to top |
|
 |
TonyD |
Posted: Tue Dec 16, 2003 1:59 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
The element has 'type ="xs:date"' in the schema and is correctly represented in the message set as type 'date', NOT 'dateTime', with DateTime Format (Physical Representation) shown as 'yyyy-MM-dd'....hence my confusion.
Out of interest I altered the type in the message set to 'dateTime'. The DateTime format then changed to 'yyyy-MM-dd'T'HH:mm:ssZZZ', which is how the element in the input message appears to have been read, and then rejected because it does not match the message set definition!?
When processing the message without validation specified in the MQInput node this element has been successfully mapped to an output 'date' element of format 'yyMMdd', with no intrusion of time values. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|