How to integrate BizTalk Server 2010 / 2013 with Service Bus for Windows Server

This solution shows how to integrate a BizTalk Server 2010/2013 application with Service Bus for Windows Server using the WCF-Custom adapter to exchange messages with external systems in a reliable, flexible, and scalable manner.

C# (5.3 MB)
 
 
 
 
 
4.7 Star
(6)
1,705 times
Add to favorites
6/20/2014
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
#region Copyright
//=======================================================================================
// Microsoft Business Platform Division Customer Advisory Team (CAT)  
//
// This sample is supplemental to the technical guidance published on the community
// blog at http://blogs.msdn.com/paolos. 
// 
// Author: Paolo Salvatori
//=======================================================================================
// Copyright © 2011 Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
// EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF 
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. YOU BEAR THE RISK OF USING IT.
//=======================================================================================
#endregion

#region Using Directives
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Runtime.Serialization;
#endregion

namespace Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.DataContracts
{
    [Serializable]
    [XmlType(TypeName = "CalculatorResponse", Namespace = "http://windowsazure.cat.microsoft.com/samples/servicebusforwindowsserver")]
    [XmlRoot(ElementName = "CalculatorResponse", Namespace = "http://windowsazure.cat.microsoft.com/samples/servicebusforwindowsserver", IsNullable = false)]
    [DataContract(Name = "CalculatorResponse", Namespace = "http://windowsazure.cat.microsoft.com/samples/servicebusforwindowsserver")]
    public class CalculatorResponse
    {
        #region Private Fields
        private string status;
        private ResultList resultList;
        #endregion

        #region Public Constructors
        public CalculatorResponse()
        {
            status = default(string);
            resultList = new ResultList();
        }

        public CalculatorResponse(string status)
        {
            this.status = status;
            resultList = new ResultList();
        }

        public CalculatorResponse(string status, ResultList resultList)
        {
            this.status = status;
            this.resultList = resultList;
        }
        #endregion

        #region Public Properties
        [XmlElement]
        [DataMember(Order = 1)]
        public string Status 
        {
            get 
            {
                return status;
            }
            set 
            {
                status = value;
            }
        }

        [XmlArrayItem("Result", Type=typeof(Result), IsNullable=false)]
        [DataMember(Order = 2)]
        public ResultList Results 
        {
            get 
            {
                return resultList;
            }
            set 
            {
                resultList = value;
            }
        }
        #endregion
    }

    [CollectionDataContract(Name = "ResultList", Namespace = "http://windowsazure.cat.microsoft.com/samples/servicebusforwindowsserver", ItemName = "Result")]
    public class ResultList : List<Result>
    {
    }

    [Serializable]
    [XmlType(TypeName = "Result", AnonymousType = true, Namespace = "http://windowsazure.cat.microsoft.com/samples/servicebusforwindowsserver")]
    [DataContract(Name = "Result", Namespace = "http://windowsazure.cat.microsoft.com/samples/servicebusforwindowsserver")]
    public class Result
    {
        #region Private Fields
        private double value;
        private string error; 
        #endregion

        #region Public Constructors
        public Result()
        {
            value = default(double);
            error = default(string);
        }

        public Result(double value, string error)
        {
            this.value = value;
            this.error = error;
        }
        #endregion

        #region Public Properties
        [XmlElement]
        [DataMember(Order = 1)]
        public double Value
        {
            get
            {
                return value;
            }
            set
            {
                this.value = value;
            }
        }

        [XmlElement]
        [DataMember(Order = 2)]
        public string Error
        {
            get
            {
                return error;
            }
            set
            {
                error = value;
            }
        } 
	    #endregion
    }
}