BizTalk Server version number overview (updated for BTS2K9)

BizTalk Server version number overview (updated for BTS2K9)

Now that BizTalk Server 2009 is RTM the version number overview table that I posted earlier (here and here) can be updated.
The new table:

Product name
Service pack
Version number

BizTalk Server 2004
 
3.0.4902.0

BizTalk Server 2004
SP1
3.0.6070.0

BizTalk Server 2004
SP2
3.0.7405.0

BizTalk Server 2006
 
3.5.1602.0

BizTalk Server 2006 R2
 
3.6.1404.0

BizTalk Server 2009 (beta1)
 
3.8.104.5

BizTalk Server 2009

3.8.368.0

As mentioned in the previous post this information will probably also appear in […]

WCF, Azure and Samples – lots of Samples

Hi guys,

If you’re looking to get into how to host WCF Services on Azure, showing some cool
graphics, then these samples are for you.

Silverlight v3.0 (beta), and important samples showing how to take your existing WCF
Services and hosting/housing them in Auze (there’s a few gotchas – and these samples
have work arounds 🙂 )

Grab them here –

http://code.msdn.microsoft.com/wcfazure

Shy Cohen joins Pluralsight

Shy Cohen joins Pluralsight

We’re excited to announce that Shy Cohen has joined Pluralsight as an instructor/author.  He comes to us directly from Microsoft where he worked as a Senior Program Manager in the Connected Systems division. At Pluralsight, he’ll be focusing his efforts in the areas of SOA and cloud computing building courses on architecture and design, but he’ll also share his talents and expertise with our customers in the areas of WCF and “Oslo”. Shy has a passion for teaching and engaging with customers to help them better apply technology to improve their business. As a Microsoft MVP (in the area of solution architecture), Shy brings the total number of MVP’s at Pluralsight up to 13. 

The first course Shy will be working on for Pluralsight is called SOA and Cloud Computing Fundamentals. You can read more about Shy on his profile page on pluralsight.com. You can also follow him in real-time on Twitter at http://twitter.com/shycohen.

We’re excited to have him. Welcome Shy!

Calling the SharePoint Web Services with jQuery

If you read this blog you probably know that besides the web user interface, SharePoint also exposes some interfaces which you can use from code: the SharePoint object model and the SharePoint web services. The object model of SharePoint can only be used by code/applications that are running on a SharePoint server in your Server Farm, so you can’t use the object model on client machines. The SharePoint web services can be used of course across a network boundary, that’s what they are built for! In this post I’m going to show you how you can access the out-of-the-box SharePoint web services by making use of the jQuery Javascript library. First let’s see what you can do with this technique: download this zip file that contains an ASPX page (a basic Site Page without any code behind), and the jQuery Javascript library (in case you don’t have it already). Upload the two individual files (not the zip file) in the root of a Document Library in any of your SharePoint sites. You can do this by making use of the web user interface; you don’t have to touch anything on the server itself. When done, just click on the link of the uploaded ASPX and you’ll see following page:



 
Probably you’re not really impressed but think about the fact that this page is just an ASPX file you’ve uploaded through the web user interface, there is absolutely no code behind involved (which would have been blocked by SharePoint’s default security settings). The details of the SharePoint lists are loaded by making use of Javascript code that calls the web SharePoint lists.asmx web service.


So how do you call a SharePoint web service in Javascript code; well you can use the XmlHttpRequest object and write lots of boring code, or you can make use of a Javascript library that wraps this XmlHttpRequest object and exposes a nice and easy interface. In this demo I’ll use the jQuery Javascript library, so the first thing that you’ll need to do is to make sure the page is loading that library:


<script type=”text/javascript” src=”jquery-1.3.2.min.js” mce_src=”jquery-1.3.2.min.js”></script>


If you already configured your SharePoint site so the jQuery library is loaded (for example by making use of the SmartTools.jQuery component), you can skip this line of course. 


When the page is loaded, the Lists web service (e.g. http://yoursite/_vti_bin/lists.asmx) of SharePoint needs to be called; this can be accomplished by making use of the jQuery’s ajax method. This method can post the necessary SOAP envelope message to the Lists web service. The XML of the SOAP envelope can easily be copied from the .NET web service test form of the desired web method (e.g. http://yoursite/_vti_bin/lists.asmx?op=GetListCollection). In the code below, a call to the GetListCollection web method is made when the page is loaded. The complete parameter of the ajax method is actually a pointer to another Javascript function (which we’ll implement later on) that will be called asynchronously when the web service call is done.  Don’t forget to update the url parameter with your SharePoint site’s URL!


$(document).ready(function() {
    var soapEnv =
        “<soapenv:Envelope xmlns:soapenv=’http://schemas.xmlsoap.org/soap/envelope/’> \
            <soapenv:Body> \
                <GetListCollection xmlns=’http://schemas.microsoft.com/sharepoint/soap/’> \
                </GetListCollection> \
            </soapenv:Body> \
        </soapenv:Envelope>”;


    $.ajax({
        url: “
http://yoursite/_vti_bin/lists.asmx“,
        type: “POST”,
        dataType: “xml”,
        data: soapEnv,
        complete: processResult,
        contentType: “text/xml; charset=\”utf-8\””
    });
});


As I already mentioned, the processResult function is called when the response XML of the web service call is received. In this method a loop is created which will iterate over every List element of the response XML. For every List element a <li></li> element is added to the element with the ID attribute set to data.


function processResult(xData, status) {
    $(xData.responseXML).find(“List”).each(function() {
        $(“#data”).append(“<li>” + $(this).attr(“Title”) + “</li>”);
    });
}


This data element is the actual <ul></ul> list in HTML:


<ul id=”data”></ul>


When you put everything together in a Site Page, this is the result:



 
In the zip file mentioned in the beginning of this post, you can find an extended version of the processResult function which will display some additional metadata for every list (like the ID, ItemCount etc). The entire contents of basic version of the Site Page built in this post goes as follows:


<%@ Page Language=”C#” MasterPageFile=”~masterurl/default.master” %>


<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderAdditionalPageHead”>


    <script type=”text/javascript” src=”jquery-1.3.2.min.js” mce_src=”jquery-1.3.2.min.js”></script>


    <script type=”text/javascript”>
        $(document).ready(function() {
            var soapEnv =
                “<soapenv:Envelope xmlns:soapenv=’http://schemas.xmlsoap.org/soap/envelope/’> \
                    <soapenv:Body> \
                        <GetListCollection xmlns=’http://schemas.microsoft.com/sharepoint/soap/’> \
                        </GetListCollection> \
                    </soapenv:Body> \
                </soapenv:Envelope>”;


            $.ajax({
                url: “
http://yoursite/_vti_bin/lists.asmx“,
                type: “POST”,
                dataType: “xml”,
                data: soapEnv,
                complete: processResult,
                contentType: “text/xml; charset=\”utf-8\””
            });


        });


        function processResult(xData, status) {
            $(xData.responseXML).find(“List”).each(function() {
                $(“#data”).append(“<li>” + $(this).attr(“Title”) + “</li>”);
            });
        }
    </script>


</asp:Content>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderMain”>
    <ul id=”data”></ul>
</asp:Content>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderPageTitleInTitleArea”>
    List Details
</asp:Content>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderPageTitle”>
    List Details
</asp:Content>

BizTalk 2009: notorious Microsoft ADO MD.NET 9.0 and 10.0

.

BizTalk 2009: notorious Microsoft ADO MD.NET 9.0 and 10.0

When I was installing the BizTalk 2009the Setupasked these prerequisite components:

Microsoft ADO MD.NET 9.0 and

Microsoft ADO MD.NET 10.0

Idid not have Internet access and I had to manually search for these components.

Seems it is not a simple googling. 🙂

After painful search I’ve found them here:

1) ADO MD.NET 9.0:

Page “Feature Pack for Microsoft SQL Server 2005 – November 2005” – http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

[- follow PageDown to]

Microsoft ADOMD.NET

X86 Package (SQLServer2005_ADOMD.msi) – 3302 KB

X64 Package (SQLServer2005_ADOMD_x64.msi) – 5430 KB

IA64 Package (SQLServer2005_ADOMD_ia64.msi) – 6906 KB

2) ADO MD.NET 10:

Page “Microsoft SQL Server 2008 Feature Pack, October 2008” – http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=228de03f-3b5a-428a-923f-58a033d316e1

[- follow PageDown to]

Microsoft ADOMD.NET

X86 Package(SQLSERVER2008_ASADOMD10.msi) – 4312 KB

X64 Package (SQLSERVER2008_ASADOMD10.msi) – 9263 KB

IA64 Package(SQLSERVER2008_ASADOMD10.msi) – 6776 KB

As you can seethere isabad inconsistency in the names!

Hopethis articlesaves you several minutes.

Unit Testing in BizTalk – TestFile v2.0

Some time ago I made a post about using external file dependencies with NUnit. That post was about using a class called TestFile, which implemented IDisposable, to temporarily store files to disk, and then clean them up afterwards. While learning my way around the BizTalk unit testing capabilities in BizTalk 2009, I realized that this class could use some minor initial modifications to make life easier. To that end, I present to you that updated class. The most important new feature is the ability to support having it generate the file name as a temp file, and the ability to load resources from any Assembly in the AppDomain.

public class TestFile : IDisposable
{
    private bool _disposedValue = false;
    private string _resourceName;
    private string _fileName;

    public TestFile(string resourceName) : this(null, resourceName) { }

    public TestFile(string fileName, string resourceName)
    {
        if (fileName == null)
        {
            this.FileName = Path.GetTempFileName();
            File.Delete(this.FileName);
        }
        else 
            this.FileName = fileName;

        using (Stream s = LoadResourceFromAppDomain(resourceName))
        using (StreamReader sr = new StreamReader(s))
        using (StreamWriter sw = File.CreateText(this.FileName))
        {
            sw.Write(sr.ReadToEnd());
            sw.Flush();
        }
    }

    private Stream LoadResourceFromAppDomain(string resourceName)
    {
        Assembly[] appDomainAssemblies = AppDomain.CurrentDomain.GetAssemblies();
        Stream outStream = null;

        foreach (var lAssem in appDomainAssemblies)
        {
            outStream = lAssem.GetManifestResourceStream(resourceName);
            if (outStream != null) return outStream;
        }

        throw new Exception(string.Format("Unable to find resource stream {0}",resourceName));
    }

    public string FileName
    {
        get { return _fileName; }
        set
        {
            _fileName = value;
        }
    }
    

    protected virtual void Dispose(bool disposing)
    {
        if (!this._disposedValue)
        {
            if (disposing)
            {
                if (File.Exists(_fileName))
                {
                    File.Delete(_fileName);
                }
            }
        }
        this._disposedValue = true;
    }

    #region IDisposable Members

    public void Dispose()
    {
        // Do not change this code.Put cleanup code in Dispose(bool disposing) above.
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    #endregion
}

BizTalk Server 2009 on MSDN

I’m thrilled to announce that BizTalk Server 2009 has become available on MSDN, as of last Saturday.

The 2009 release includes many cool things, but I’d like to highlight the unit testing capabilities that have been added to the product.  With this release, there is now support for unit testing of Maps, Schemas and Pipelines.  While not perfect, these features are a great initial down payment on bringing BizTalk development in line with state of the art practices in other development areas.  I’m so thrilled that these features have been added that I will be doing a post series over the next several weeks on reducing the friction in unit testing these features, and you can look forward to the first installment shortly.