|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DateTime problems from MRM to XLMNSC |
« View previous topic :: View next topic » |
Author |
Message
|
giorginus80 |
Posted: Fri Apr 03, 2009 2:23 am Post subject: DateTime problems from MRM to XLMNSC |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
Hi,
I have a simple flow accepting an MRM with an MqInput node with xml1 format. in the datetime fields I specified the right value to parse, and infact I have no error with validation in the Mqinput node, but now I need to put it in the xmlnsc domain and I get error The value "2009-03-27 14:25:37.349" is not a valid value for the "dateTime" datatype. How is possible the validation is reading like the field is a character meanwhile I have a dateTime in MRM domain because in debug I can see the field before trasforming in XMLNSC is:
Code: |
MRM
dataElaborazione:TIMESTAMP:java.util.GregorianCalendar[time=1238160337349,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Rome",
offset=3600000,dstSavings=3600000,useDaylight=true,transitions=169,lastRule=java.util.SimpleTimeZone[id=Europe/Rome,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,
startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],
firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=2,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=27,DAY_OF_YEAR=?,
DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=25,SECOND=37,MILLISECOND=349,ZONE_OFFSET=?,DST_OFFSET=?]
|
|
|
Back to top |
|
 |
kimbert |
Posted: Fri Apr 03, 2009 2:42 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I get error The value "2009-03-27 14:25:37.349" is not a valid value for the "dateTime" datatype |
This a validation error. Did you mean to validate the message again using XMLNSC? Did you realize that you can switch off validation if you want to?
Quote: |
How is possible the validation is reading like the field is a character |
For non-input nodes, XMLNSC validation works by writing the message tree as XML and then reparsing it. Sounds slow, but it's not.
Quote: |
but now I need to put it in the xmlnsc domain |
Why do you need to? |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri Apr 03, 2009 2:47 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
Yes I know I put validation on, because I need to generate an xml file and the datetime fields in the xml if I validate with it's xsd schema only accept date in format like 2001-12-17T09:30:47.0Z |
|
Back to top |
|
 |
kimbert |
Posted: Fri Apr 03, 2009 3:27 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please explain why you need XMLNSC and MRM in the same message flow.
And if possible, please take time to explain yourself clearly - your last post made my brain hurt. |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri Apr 03, 2009 3:54 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
I need mrm because I take the xml from a blob column in a Oracle db, and in this xml datetime fields, are with custom pattern (not the standard of xml), so I think to use MRM to parse it with this custom data pattern, but in return I need a real XML because the response goes to a WebService (need to be an XML). |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 03, 2009 4:02 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Any facet you can validate using MRM you can validate using XMLNSC. |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri Apr 03, 2009 4:05 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
mqjeff wrote: |
Any facet you can validate using MRM you can validate using XMLNSC. |
with xmlnsc I can't use the custom date format |
|
Back to top |
|
 |
kimbert |
Posted: Fri Apr 03, 2009 4:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Thanks - I understand now. MRM can parse it, but not write it. XMLNSC can write it, but cannot parse it.
Personally, I would go to a lot of trouble to avoid having MRM XML and XMLNSC in the same message flow. There is a good alternative solution here: model the dateTime as xs:string, parse it with XMLNSC, and use ESQL to CAST AS TIMESTAMP. You can supply a template with the CAST. |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri Apr 03, 2009 5:05 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
kimbert wrote: |
Thanks - I understand now. MRM can parse it, but not write it. XMLNSC can write it, but cannot parse it.
Personally, I would go to a lot of trouble to avoid having MRM XML and XMLNSC in the same message flow. There is a good alternative solution here: model the dateTime as xs:string, parse it with XMLNSC, and use ESQL to CAST AS TIMESTAMP. You can supply a template with the CAST. |
ok thanks it was the best way |
|
Back to top |
|
 |
kimbert |
Posted: Mon Apr 06, 2009 12:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
it was the best way |
Which way? Your way, or the way which I suggested?  |
|
Back to top |
|
 |
giorginus80 |
Posted: Mon Apr 06, 2009 1:11 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
kimbert wrote: |
Quote: |
it was the best way |
Which way? Your way, or the way which I suggested?  |
yes this way
kimbert wrote: |
model the dateTime as xs:string, parse it with XMLNSC, and use ESQL to CAST AS TIMESTAMP. You can supply a template with the CAST. |
|
|
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
|
|
|
|