Skip to main content

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,708 times
Add to favorites
6/20/2014
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<?xml version="1.0"?>
<configuration>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" 
              switchValue="Warning, ActivityTracing">
        <listeners>
          <add type="System.Diagnostics.DefaultTraceListener" 
               name="Default">
            <filter type=""/>
          </add>
          <add name="ServiceModelMessageLoggingListener">
            <filter type=""/>
          </add>
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add initializeData="C:\Client.svclog" 
           type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
           name="ServiceModelMessageLoggingListener" 
           traceOutputOptions="Timestamp">
        <filter type=""/>
      </add>
    </sharedListeners>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <clear/>
        <add name="LogTraceListener" 
             type="Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.Client.LogTraceListener, Client" 
             initializeData=""/>
      </listeners>
    </trace>
  </system.diagnostics>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
  </startup>
  <system.serviceModel>
    <diagnostics>
      <messageLogging logEntireMessage="true" 
                      logMalformedMessages="false" 
                      logMessagesAtServiceLevel="true" 
                      logMessagesAtTransportLevel="false"/>
    </diagnostics>
    <behaviors>
      <endpointBehaviors>
        <behavior name="securityBehavior">
          <transportClientEndpointBehavior>
            <tokenProvider>
              <windowsAuthentication>
                <stsUris>
                  <stsUri value="https://uppy.europe.corp.microsoft.com:9355/" />
                </stsUris>
              </windowsAuthentication>
            </tokenProvider>
          </transportClientEndpointBehavior>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <netMessagingBinding>
        <binding name="netMessagingBinding" 
                 sendTimeout="00:03:00" 
                 receiveTimeout="00:03:00" 
                 openTimeout="00:03:00" 
                 closeTimeout="00:03:00" 
                 sessionIdleTimeout="00:01:00" 
                 prefetchCount="-1">
          <transportSettings batchFlushInterval="00:00:01"/>
        </binding>
      </netMessagingBinding>
    </bindings>
    <client>
      <!-- Invoke BizTalk via Service Bus Queue -->
      <endpoint address="sb://uppy.europe.corp.microsoft.com/ServiceBusDefaultNamespace/biztalk/requestqueue" 
                behaviorConfiguration="securityBehavior" 
                binding="netMessagingBinding" 
                bindingConfiguration="netMessagingBinding" 
                contract="Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.ServiceContracts.ICalculatorRequest" 
                name="requestQueueClientEndpoint"/>
      <!-- Invoke BizTalk via Service Bus Topic -->
      <endpoint address="sb://uppy.europe.corp.microsoft.com/ServiceBusDefaultNamespace/biztalk/requesttopic" 
                behaviorConfiguration="securityBehavior" 
                binding="netMessagingBinding" 
                bindingConfiguration="netMessagingBinding" 
                contract="Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.ServiceContracts.ICalculatorRequest" 
                name="requestTopicClientEndpoint"/>
    </client>
    <services>
      <service name="Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.Service.ResponseHandlerService">
        <endpoint address="sb://uppy.europe.corp.microsoft.com/ServiceBusDefaultNamespace/biztalk/responsequeue" 
                  behaviorConfiguration="securityBehavior" 
                  binding="netMessagingBinding" 
                  bindingConfiguration="netMessagingBinding" 
                  name="responseQueueServiceEndpoint" 
                  contract="Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.ServiceContracts.ICalculatorResponse"/>
        <endpoint address="sb://uppy.europe.corp.microsoft.com/ServiceBusDefaultNamespace/biztalk/responsetopic" 
                  listenUri="sb://uppy.europe.corp.microsoft.com/ServiceBusDefaultNamespace/biztalk/responsetopic/Subscriptions/ItalyMilan" 
                  behaviorConfiguration="securityBehavior" 
                  binding="netMessagingBinding" 
                  bindingConfiguration="netMessagingBinding" 
                  name="responseSubscriptionServiceEndpoint" 
                  contract="Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.ServiceContracts.ICalculatorResponse"/>
      </service>
    </services>
    <extensions>
      <behaviorExtensions>
        <add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="tokenProviderEndpointBehavior" type="Microsoft.WindowsAzure.CAT.ServiceBusForWindowsServer.Behaviors.TokenProviderBehaviorExtensionElement, Microsoft.WindowsAzure.CAT.ServiceBusForWindowsServer.Behaviors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=197ec3eb961f773c"/>
      </behaviorExtensions>
      <bindingElementExtensions>
        <add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </bindingElementExtensions>
      <bindingExtensions>
        <add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </bindingExtensions>
    </extensions>
  </system.serviceModel>
</configuration>