Monday, January 28, 2008

Convert Xmlmessage to Word 2007 Format (OOXML)

While I was doing some research on custom pipeline components, I came accross an example of a sendpipeline that encodes a message to the new Open Format OOXML of Word 2007.
You can download the sample here: CreateOOXMLPackage.zip

Just build the solution, and add the Pipeline dll to the "C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components" folder and also to the GAC.
Add a Reference from the BizTalkProject to the pipeline.
Deploy the BizTalkProject with the appropiate properties.

In the BizTalkAdministration Tool, create a Receive and a Send Port, both using the FILE-adapter. Set the Send Pipeline to "CreateOOXMLPackage" and configure the destination filename to be something like "documentname.docx".
Also set a filter on the Send Port to subscribe to the Receive Port.
And configure the Outbound Maps to use SalesReport_to_WordMLSalesReport.

Now drop a testfile into the Receive Location and let the pipeline work its magic!

Credit goes to Nick Heppleston and his BLOG.

Exception Handling in Orchestrations

It might be basic knowledge for some, but for a BizTalk-newbie it can be useful information... ;-)

If you want to access the error message in a catch-block, you should do it like this:
  1. Set the "Exception Object Type" of the catch-block to "System.Exception" (can be found in the mscorlib).
  2. Set the "Exception Object Name" of the catch-block to "ex".
  3. In any expression inside the catch-block, you can now use code such as ex.Message, ex.StackTrace, ...

If you want to throw a new exception, you can use the ThrowException shape. This shape can be a little confusing though. It has an "Exception Object" property which you assign using a drop-down list. When you first drag the shape onto your orchestration, the only item in the list is "General Exception". If you wish to throw a specific exception, you need to create a variable of an exception type. This variable will then be displayed in the drop-down list.

Calling a WebService from an Orchestration (Tutorial)

I'll start things of here by posting a tutorial on how to call a webservice from an orcherstration.
Download the files below, one is the actual tutorial (in pdf format) the other is the accompaniing source code:

Enjoy!

Friday, January 25, 2008

The Birth of a BizTalk Blog

Hi,

welcome to the brand new Dolmen BizTalk Team Blog, dedicated to Microsoft's BizTalk Server.
Our goal is to frequently update this blog with news, tips & tricks and developments concerning BizTalk and everything that surrounds it.

Visit us once in a while and feel free to contribute!

Cheers!
Dirk, Roel, Birgen, Nathan, Peter and Christophe