Home Page › Forums › BizTalk 2004 – BizTalk 2010 › validating data types with XML validator pipeline.
- This topic has 2 replies, 1 voice, and was last updated 9 years, 6 months ago by
community-content.
-
AuthorPosts
-
-
November 6, 2006 at 12:21 PM #16333
I have create a custom pipeline with xml dissasembler and xml validator and I use it to validate my incoming xml files against a schema. The validation works fine to validate the data structure but it doesn't validate the data types at all. I have put a string inside a int field and the validator didn't complaint at all. So, is it normal that data types are not validated?
If custom pipeline can't be use to validate data types, what's the best approach to acheive that?
Thanks for your help.
-
November 7, 2006 at 4:19 AM #16345
I tested your Scenario.
Input Sample- Age is of type xs:int
<R1>
<Age>10abc</Age>
</R1>I got an error in EventViewer as below
Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5753
Date: 11/7/2006
Time: 7:13:13 AM
User: N/ADescription:
A message received by adapter "FILE" on receive location "Receive Location1" with URI "C:\NISHIL\Temp\TestAPP1\In\*.xml" is suspended.
Error details: There was a failure executing the receive pipeline: "TestAPP1.ReceivePipeline1, TestAPP1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f9ba375e961a272d" Source: "Pipeline " Receive Port: "ReceivePort1" URI: "C:\NISHIL\Temp\TestAPP1\In\*.xml" Reason: The 'Age' element has an invalid value according to its data type.
MessageId: {6F1D4DB9-BE37-41D7-82C8-509B0791547D}
InstanceID: {CE8DFF51-E025-416F-B821-973BDEE3218A}For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
So I think Xml validator is working fine.Seems you are missing something.Have you set the Document Schemas Property of Xml Validator.
Hope this helps you.
-
May 13, 2010 at 12:50 PM #24695
It does work if you try to put string value in int placeholder.
but in my case, I’ve a element of type “date” but if is receive a message of date “2010-13-13” it doesnt complain and let that message in. how can i avoid it??
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.