Martijn's blog - E-Commerce, EAI, BizTalk and .NET


XmlDTDValidator pipeline component

Ever tried using DOCTYPE declarations in your inbound messages? The XML Disassembler does not validate against DTDs, only schemas. If you have DOCTYPE declarations in your inbound message, BizTalk uses the standard XmlResolver for reading in the message and will log about four error messages into the EventViewer, of which one will state:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "mscorlib" Receive Location: "c:\test\input\*.xml" Reason: Could not find file "C:\WINDOWS\system32\MyDTD.DTD".

I can imagine situations in which you can't alter the messages coming in on forehand and need the message to be both validated and processed by BizTalk, without having to store your DTD files in C:\WINDOWS\system32.

I've written a pipeline component which both validates the inbound message against it's DOCTYPE, having a design-time property in which you specify where your DTD files reside, and removes the DOCTYPE declaration in order for BizTalk to process the message. (by the way, the framework was built using my Pipeline Component Wizard)

Ofcourse, a design-time property setting the folder in which your DTDs reside, might not be the best option, it's for example use only. In a production environment, you want this value to come from the App.Config file or another place you can alter real-time without having the redeploy your pipeline.

I hope you have fun with this component and would love to hear any comments, flames, what not (see this page for my e-mail address)


  • Hi Martjin,
    I can not found your XML DTD Validator the link is broken?
    When Can i get the code of your pipline

    By Anonymous Anonymous, at 6:09 PM  

  • For me the link is also dead ...
    Can you update the link? I'm very interested

    By Anonymous Peter, at 5:12 PM  

  • I like to earn rappelz rupees, because it is very interesting. I think if you meet the rappelz gold, you will like it too. And when you play the game well you can get some cheap rappelz rupees as the rewards from the game. As long as you have a lot of rappelz money in the game you will be strong, and you can go to buy rupees with the other players.

    By Anonymous Anonymous, at 1:31 AM  

Post a Comment

Links to this post:

Create a Link

<< Home