Biztalk 2004 Integration Experiences

Thursday, April 21, 2005

Enabling Schema Validation on Messages

Biztalk 2000 had schema validation turned on by default and I thought it was very useful in Development while I wasn't sure whether the messages were created properly from my parser.

Biztalk 2004 has them turned off by default and I would have to use a custom pipeline with Xml validator if I had to validate schema. One drawback to this approach was I did not want Validation turned on in Production. So I had to maintain different binding files for each environment and often run into configuration issues.

Recently I found the following in Biztalk Server 2004 Documentation.

You can turn on Global Schema validation by changing the BTSNTSvc.exe.config file. You can see this in the BiztalkServerInstallation folder (By default its in Program files\Microsoft BizTalk Server 2004)

<configuration>
<xlangs>
<Configuration>
<Debugging ValidateSchemas="true"/>
</Configuration>
</xlangs>
</configuration>

Restart Biztalk Service and there you go, all the messages entering Orchestration would be validated.

Wednesday, April 06, 2005

Sending String messages from an Orchestration

Recently one of my colleague asked my help to send a message as "System.String" from an Orchestration. I thought it would be a simple one and did not understand why he needs my help to do this.

When I looked at it, I noticed that the string is wrapped as Xml . It was a little weird to me that in Biztalk 2004 that this cannot be done natively by just declaring as "System.String". Even Biztalk 2000 Xlang had the same kind of Xml Envelope for String, but it would remove that when the message is passed out.

After doing a little research I found that this is documented in the Biztalk 2004 Documentation under "Sending a Text E-Mail Message from an Orchestration". You can see it here

It specifically states that

"Sending a message of type System.String will not work, because the string gets formatted as an XML document in the message"

and tells you use a special class named "RawString" and the code is there in msdn.

As specified in the documentation, I took the code for "RawString" class, placed it in a dll, declared the message as type "RawString" and created an instance and passed in my string. It worked like a charm!

Post a comment if you would like the sample, I'll send you.

Sunday, April 03, 2005

Biztalk 2004 Map Testing Tool Download Details

I have uploaded the latest Biztalk 2004 Map Testing tool to GotDotNet. This includes some of the bug fixes reported by users. You can get it from here

Post a comment if you notice a bug or your ideas to enhance the tool.