validating data types with XML validator pipeline.

Home Page Forums BizTalk 2004 – BizTalk 2010 validating data types with XML validator pipeline.

Viewing 1 reply thread
  • Author
    Posts
    • #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.

    • #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/A

      Description:
      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.

       

      • #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??

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.