« Living with Vista | Main | The Hanselman Effect »
Gregory Van de Wiele, a fellow BizTalk MVP, wrote to me a couple of weeks ago with some good information on how to catch XML Schema errors thrown by the XML Disassembler Component in a BizTalk pipeline when using my BizTalk PipelineTesting library. Here's the scoop:
In order to find a real XML schema error, when using XMLDASM component for validating, you need to do this: Inside your test, catch type XmlDasmException You won’t find the real schema validation error using the Message or ExtendedDescription prop: both are empty GetArgument(0) does the trick. Alternatively you could call the GetErrorMessage(Exception) on the Utilities type in the Microsoft.Test.BizTalk.PipelineObjects It took me quite some time because I somehow overlooked the private ‘arguments’ collections in the debugger. Maybe other people will make the same mistake.
In order to find a real XML schema error, when using XMLDASM component for validating, you need to do this:
It took me quite some time because I somehow overlooked the private ‘arguments’ collections in the debugger. Maybe other people will make the same mistake.
Thanks for the tip, Gregory, I'm sure other people will find it useful! As soon as I find some free time, I'll update the PipelineTesting library with this and other suggestions Gregory passed on! If anyone has other suggestions or feature requests, now is the time for them
About
Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...
email: tomas@winterdom.com msn: tomasr@passport.com
Syndicate
Ads
Links
Categories
Statistics
Blogroll
Post Archive
Other
Copyright © 2002-2008, Tomas Restrepo.
Powered by: newtelligence dasBlog 2.1.8102.813