BizTalk Server General - Validating null datetime value fails against Biztalk schema

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > September 2005 > Validating null datetime value fails against Biztalk schema





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Validating null datetime value fails against Biztalk schema
Dave Kuc

2005-09-30, 2:49 am

Hello, when validating a schema against a native sample file, I always get
failures with empty values appearing for datetime fields. I can't believe
this Microsoft product would not account for empty values being sent into
datetime and decimal fields. Especially since this is one of the most common
scenarios and developers shouldn't have to build in custom code to account
for this. How can I get this to work?
Thanks in advance.


Scott Colestock

2005-09-30, 5:53 pm

Well, if you have set the field to be a datetime field at a schema
level...this doesn't really have anything to do with "this Microsoft
product" - its a W3C schema thing... See
http://www.w3.org/TR/xmlschema-2/#dateTime.

Perhaps you want to try setting nillable=true in your schema and passing an
xsi:nil="true" attribute in the instance doc.

Doc excerpt: In instance messages, the use of the nil attribute must include
the namespace prefix for the XML Schema namespace for instances,
http://www.w3.org/2001/xmlschema-instance, which is "xsi" by convention. An
element in an instance message that includes the attribute setting
xsi:nil="true" may not have any element content but it may still have
attributes.

Scott Colestock
www.traceofthought.net



"Dave Kuc" <dave_kuc@yahoo.com> wrote in message
news:OY1sApWxFHA.720@TK2MSFTNGP10.phx.gbl...
> Hello, when validating a schema against a native sample file, I always get
> failures with empty values appearing for datetime fields. I can't believe
> this Microsoft product would not account for empty values being sent into
> datetime and decimal fields. Especially since this is one of the most
> common scenarios and developers shouldn't have to build in custom code to
> account for this. How can I get this to work?
> Thanks in advance.
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com