Archive for the ‘BizTalk’ Category

Microsoft released a VPC for BizTalk 2009 to be used as live demo or hands-on labs.

Download it here:

The virtual machine image contains a full live demo and six hands-on labs of BizTalk Server 2009, which highlight integration with SharePoint Server 2007 and Windows Workflow (.NET 3.5).

Read Full Post »

One problem I encountered in a project is to call several services (Webservice/SQL etc) via BizTalk before delivering a result back to a web application. By calling the services synchronously and letting the user wait meanwhile is not a good solution, however calling the services asynchronously seems like a better choice.

By using AJAX and exposing the services as webservices from BizTalk a great solution could be made. I made a test webservice with the following code:

namespace WebApplication1
    /// <summary>
    /// Summary description for WebService1
    /// </summary>
    [WebService(Namespace = “http://tempuri.org/“)] //
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    public class WebService1 : System.Web.Services.WebService

        public string HelloWorld()
            return “Hello World”;

        public string HelloWorld2()
            return “Hello World2″;

Note the 5 seconds sleep in the HelloWord2 method. Then I created and AJAX enabled web page, with the following code:

<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”Default.aspx.cs” Inherits=”WebApplication1.Default1″ %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head runat=”server”>

    <script type=”text/javascript”>

        function pageLoad() {

        function MyBtn_onclick() {
            ret1 = WebApplication1.WebService1.HelloWorld2(OnComplete1, OnTimeout, OnError);
            ret2 = WebApplication1.WebService1.HelloWorld(OnComplete2, OnTimeout, OnError);

        function OnTimeout() {
            alert(“Timeout on webservice call”);

        function OnError() {
            alert(“Error in webservice call”);

        function OnComplete1(arg) {
            document.getElementById(‘MySpan2’).innerHTML = arg;

        function OnComplete2(arg) {
            document.getElementById(‘MySpan1’).innerHTML = arg;

    <form id=”form1″ runat=”server”>
        <asp:ScriptManager ID=”ScriptManager1″ runat=”server”>
           <!– Add a reference to the webservice, to be able to call it from javascript code above –>
                <asp:ServiceReference Path=”~/WebService1.asmx” />
        <input id=”MyBtn” onclick=”return MyBtn_onclick()” type=”button” value=”Invoke” />
        <br /><br />
        <span id=”MySpan1″></span>
        <br />
        <span id=”MySpan2″></span>

When a user clicks on the Invoke button, the code invokes the both methods asynchronously. This means that the HelloWorld method returns its value before the HelloWorld2, even thought the HelloWorld2 is called before HelloWorld.

Read Full Post »

Microsoft released this white paper which describes how to connect BizTalk Server 2009 with Sharepoint 2007. Check it out at http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=dd4e843d-2121-4016-8391-d763d0ff0a08. You could also check out my old post about this subject.

Read Full Post »

I ran into this problem a while ago on my development vpc. To solve it, I did a repair of the BizTalk installation. However, a better solution is to edit the registry.

Checkout http://blogs.msdn.com/biztalkcrt/archive/2009/08/21/visual-studio-2008-fails-to-create-open-biztalk-projects.aspx for the solution.

Thanks to Niklas for finding the link!

Read Full Post »

Using the Sharepoint Adapter is quite straight forward, however you have to setup and configure some things to get it running. This is how I did:

  1. I installed Sharepoint 2007 on my BizTalk 2009 VPC.
  2. I modified the BizTalk installation on the VPC (re-ran the setup.exe), and included the Sharepoint Adapter Web Service. The Sharepoint adapter has two parts, the actual adapter in BizTalk and this webservice. The webservice must be installed on the Sharepoint server (run the BizTalk setup.exe on the server that Sharepoint is installed and install only this webservice).
  3. I extended the site in Sharepoint (I have problems configuring the Sharepoint adapter in BizTalk Configuration otherwise).
    In Central Administration > Application Management > Create or Exten Web Application, I did the following:
    – I selected web application= “Sharepoint 80”.
    – Port = “8080”.
    – The rest, I left default.
  4. Then, I reconfigured the identity of the application pool “BTSharePointAdapterWSAppPool” from “Network service” to “Administrator” (this account has rights to the Sharepoint site, which is a must!).
  5. Then, in BizTalk Configuration MMC, then I checked “Enable Windows Sharepoint Adapter on this computer”, on the Sharepoint Adapter page. 
     On “Windows Sharepoint Services Adapter Web Site” I selected my newly extended site “SharePoint – 8080”.
  6. Added the BizTalk account (the account running BizTalk) to the “Sharepoint Enabled Host” group using the Computer Management MMC.
  7. Then I restared my BizTalk host (must be done).
  8. Then, I created a receive and send port in BizTalk. The Receive is just a plain file port which could take any file with a passthrough pipeline. In the send port I set the filter to the BTS.ReceivePortName as the name of my Receiveport. Then, I set the transport type of the send port to “Windows Sharepoint Services” and pipeline to “Passthrough” and pressed configure to set the following values:
    – Adapter Web Service Port = 8080
    – Desination Folder URL = Documents (name of Sharpoint Library)
    – Filename = %MessageID%
    – Overwrite = Rename
    – Sharepoint Site URL = http://<name_of_server>:8080 (replace <name_of_server> with the name of the server where SharePoint is installed).
    – Microsoft Office Integration = No
  9. Then, I simply dropped a file to the receive location, and it was sucessfully imported into Sharepoint.
  10. If you want to have a better name than the MessageID, you could use the %Filename% macro, but then you have to make your own custom pipeline to set the %Filename% property first.

Read Full Post »

If you have problems using multipart messages or schemas that reference other schemas in BizTalk-projects when unit testing in Visual Studio 2008, there is a solution for it in the latest BizTalk HotRod issue. Check it out here: http://biztalkhotrod.com/Documents/Issue7_Q3_2009.pdf 

Read Full Post »

I got this error today trying to send a flat file to BizTalk using the flat file disassembler: “The remaining stream has unrecognizable data”. The file validated in Visual Studio but did not work trough the pipeline. The file has some CR chars at the end of the file, which obviously validated against the schema in Visual Studio, but not in the pipeline.

This link http://connectedthoughts.wordpress.com/2008/03/17/flat-file-disassembler-difference-between-biztalk-2004-and-2006/ explains a solution. The solution was to add a dummy “Trailer schema” to the pipeline, which simply has one record (Named Root) and one field as a string. I set the min occurs to 0 and maxoccurs to *. This solved the problem!

Read Full Post »

Promoted values for EDI schemas does not work in BizTalk 2009. The EDI disassembler seems to be the villon for this behaviour. Using the xml disassembler with and Edifact message in xml format works just fine, but using the Edi disassembler the same promoted values would not be promoted. I stumbled across this behavor when trying to correlate on a COARRI d95B Edifact message in an orchestration. One solution is to map the message to xml in the receive port, before receiving in the orchestration. Another solution, which is better, is to write your own custom pipeline component and promote the property yourself after the disassembler. Thanks to my collegue Stefan for finding this page: http://social.msdn.microsoft.com/Forums/en-US/biztalkediandas2/thread/bc612dac-b9ad-4dae-a275-f9a6c6309036

Read Full Post »

The xpath function is quite neat, you can use it in expression shapes for both getting and setting data. Here is an example:

xpath(AggregatedMessage, “/*[local-name()=’EFACT_D95B_COARRI_ITG12′ and namespace-uri()=’http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006′%5D/*%5Blocal-name()=’UNT&#8217; and namespace-uri()=”]/*[local-name()=’UNT2′ and namespace-uri()=”]”) =  xpath(AggregatedMessage,”count(//UNH)”);

This expression sets the element UNT2  (using the xpath expression above) in the message AggregatedMessage to a calculated value of  UNHs.  As you see, you may use xpath functions in your call, here I used the count() function. For getting a value of a node, simply used the function string(), for instance this could look like: receiverId = xpath(ContainerAnnouncement, “string(//UNB/S003_0010”);

Read Full Post »

Microsoft changed the name on ESB Guidance to ESB toolkit and released version 2.0 yesterday. Head to http://msdn.microsoft.com/en-us/dd876606.aspx for more information as well as a download.

An Enterprise Service Bus (ESB)http://msdn.microsoft.com/en-us/dd876606.aspx

Read Full Post »

Older Posts »