Feeds:
Posts
Comments

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:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ced208ef-d31e-4711-bc13-ac0227e80d88#tm

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).

Advertisements

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)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    [System.Web.Script.Services.ScriptService]
    public class WebService1 : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return “Hello World”;
        }

        [WebMethod]
        public string HelloWorld2()
        {
            System.Threading.Thread.Sleep(5000);
            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”>
    <title></title>

    <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;
        }
    </script>

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

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 »

Older Posts »