Click here to Skip to main content
15,897,315 members
Articles / Productivity Apps and Services / Biztalk

BizTalk ESB Exception Handling – Consuming WCF Services – Part I

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
3 Nov 2012CPOL10 min read 28.2K   197   9  
Managing exceptions when consuming WCF services via the BizTalk ESB Toolkit
<?xml version="1.0" encoding="utf-8"?>
<BindingInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Assembly="Microsoft.BizTalk.Deployment, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Version="3.5.1.0" BindingStatus="NoBindings" BoundEndpoints="0" TotalEndpoints="0">
  <Timestamp>2012-10-28T11:39:22.8876526+13:00</Timestamp>
  <ModuleRefCollection>
    <ModuleRef Name="[Application:ESB.ExceptionHandling]" Version="" Culture="" PublicKeyToken="" FullName="[Application:ESB.ExceptionHandling], Version=, Culture=, PublicKeyToken=">
      <Services />
      <TrackedSchemas>
        <Schema FullName="ESB.ExceptionHandling.Schema.RequestMessage" RootName="Request" AssemblyQualifiedName="ESB.ExceptionHandling.Schema.RequestMessage,ESB.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a496c9267b296339" AlwaysTrackAllProperties="false">
          <TrackedPropertyNames />
        </Schema>
        <Schema FullName="ESB.ExceptionHandling.Schema.ResponseMessage" RootName="Response" AssemblyQualifiedName="ESB.ExceptionHandling.Schema.ResponseMessage,ESB.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a496c9267b296339" AlwaysTrackAllProperties="false">
          <TrackedPropertyNames />
        </Schema>
      </TrackedSchemas>
    </ModuleRef>
    <ModuleRef Name="ESB.ExceptionHandling" Version="1.0.0.0" Culture="neutral" PublicKeyToken="a496c9267b296339" FullName="ESB.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a496c9267b296339">
      <Services />
      <TrackedSchemas />
    </ModuleRef>
  </ModuleRefCollection>
  <SendPortCollection>
    <SendPort Name="TestSendPort" IsStatic="false" IsTwoWay="true" BindingOption="0">
      <Description xsi:nil="true" />
      <TransmitPipeline Name="Microsoft.Practices.ESB.Itinerary.Pipelines.ItinerarySendPassthrough" FullyQualifiedName="Microsoft.Practices.ESB.Itinerary.Pipelines.ItinerarySendPassthrough, Microsoft.Practices.ESB.Itinerary.Pipelines, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="2" TrackingOption="ServiceStartEnd MessageSendReceive InboundMessageBody OutboundMessageBody PipelineEvents" />
      <ReceivePipeline Name="Microsoft.Practices.ESB.Itinerary.Pipelines.ItineraryForwarderSendReceive" FullyQualifiedName="Microsoft.Practices.ESB.Itinerary.Pipelines.ItineraryForwarderSendReceive, Microsoft.Practices.ESB.Itinerary.Pipelines, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="1" TrackingOption="ServiceStartEnd MessageSendReceive InboundMessageBody OutboundMessageBody PipelineEvents" />
      <ReceivePipelineData xsi:nil="true" />
      <Tracking>255</Tracking>
      <Filter>&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;Group&gt;
    &lt;Statement Property="Microsoft.Practices.ESB.Itinerary.Schemas.ServiceName" Operator="0" Value="ESB.ExceptionHandling" /&gt;
    &lt;Statement Property="Microsoft.Practices.ESB.Itinerary.Schemas.ServiceType" Operator="0" Value="Messaging" /&gt;
    &lt;Statement Property="Microsoft.Practices.ESB.Itinerary.Schemas.ServiceState" Operator="0" Value="Pending" /&gt;
    &lt;Statement Property="Microsoft.Practices.ESB.Itinerary.Schemas.IsRequestResponse" Operator="0" Value="True" /&gt;
  &lt;/Group&gt;
&lt;/Filter&gt;</Filter>
      <Transforms />
      <InboundTransforms />
      <OrderedDelivery>false</OrderedDelivery>
      <Priority>5</Priority>
      <StopSendingOnFailure>false</StopSendingOnFailure>
      <RouteFailedMessage>false</RouteFailedMessage>
      <ApplicationName>ESB.ExceptionHandling</ApplicationName>
    </SendPort>
  </SendPortCollection>
  <DistributionListCollection />
  <ReceivePortCollection>
    <ReceivePort Name="TestReceivePort" IsTwoWay="true" BindingOption="0">
      <Description xsi:nil="true" />
      <ReceiveLocations>
        <ReceiveLocation Name="TestReceiveLocation">
          <Description xsi:nil="true" />
          <Address>/ESB.ExceptionHandling/ExceptionHandling.svc</Address>
          <PublicAddress />
          <Primary>true</Primary>
          <ReceiveLocationServiceWindowEnabled>false</ReceiveLocationServiceWindowEnabled>
          <ReceiveLocationFromTime>2012-10-26T11:00:00</ReceiveLocationFromTime>
          <ReceiveLocationToTime>2012-10-27T10:59:59</ReceiveLocationToTime>
          <ReceiveLocationStartDateEnabled>false</ReceiveLocationStartDateEnabled>
          <ReceiveLocationStartDate>2012-10-27T00:00:00</ReceiveLocationStartDate>
          <ReceiveLocationEndDateEnabled>false</ReceiveLocationEndDateEnabled>
          <ReceiveLocationEndDate>2012-10-28T00:00:00</ReceiveLocationEndDate>
          <ReceiveLocationTransportType Name="WCF-BasicHttp" Capabilities="899" ConfigurationClsid="467c1a52-373f-4f09-9008-27af6b985f14" />
          <ReceiveLocationTransportTypeData>&lt;CustomProps&gt;&lt;ServiceCertificate vt="8" /&gt;&lt;InboundBodyLocation vt="8"&gt;UseBodyElement&lt;/InboundBodyLocation&gt;&lt;UseSSO vt="11"&gt;0&lt;/UseSSO&gt;&lt;MessageClientCredentialType vt="8"&gt;UserName&lt;/MessageClientCredentialType&gt;&lt;InboundBodyPathExpression vt="8" /&gt;&lt;SendTimeout vt="8"&gt;00:01:00&lt;/SendTimeout&gt;&lt;OutboundXmlTemplate vt="8"&gt;&amp;lt;bts-msg-body xmlns="http://www.microsoft.com/schemas/bts2007" encoding="xml"/&amp;gt;&lt;/OutboundXmlTemplate&gt;&lt;OpenTimeout vt="8"&gt;00:01:00&lt;/OpenTimeout&gt;&lt;AlgorithmSuite vt="8"&gt;Basic256&lt;/AlgorithmSuite&gt;&lt;SecurityMode vt="8"&gt;None&lt;/SecurityMode&gt;&lt;TransportClientCredentialType vt="8"&gt;None&lt;/TransportClientCredentialType&gt;&lt;MaxReceivedMessageSize vt="3"&gt;65536&lt;/MaxReceivedMessageSize&gt;&lt;TextEncoding vt="8"&gt;utf-8&lt;/TextEncoding&gt;&lt;CloseTimeout vt="8"&gt;00:01:00&lt;/CloseTimeout&gt;&lt;SuspendMessageOnFailure vt="11"&gt;0&lt;/SuspendMessageOnFailure&gt;&lt;InboundNodeEncoding vt="8"&gt;Xml&lt;/InboundNodeEncoding&gt;&lt;IncludeExceptionDetailInFaults vt="11"&gt;-1&lt;/IncludeExceptionDetailInFaults&gt;&lt;MaxConcurrentCalls vt="3"&gt;200&lt;/MaxConcurrentCalls&gt;&lt;MessageEncoding vt="8"&gt;Text&lt;/MessageEncoding&gt;&lt;OutboundBodyLocation vt="8"&gt;UseBodyElement&lt;/OutboundBodyLocation&gt;&lt;/CustomProps&gt;</ReceiveLocationTransportTypeData>
          <ReceivePipeline Name="Microsoft.Practices.ESB.Itinerary.Pipelines.ItinerarySelectReceiveXml" FullyQualifiedName="Microsoft.Practices.ESB.Itinerary.Pipelines.ItinerarySelectReceiveXml, Microsoft.Practices.ESB.Itinerary.Pipelines, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="1" TrackingOption="ServiceStartEnd MessageSendReceive InboundMessageBody OutboundMessageBody PipelineEvents" Description="" />
          <ReceivePipelineData>&lt;Root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;Stages&gt;&lt;Stage CategoryId="9d0e4105-4cce-4536-83fa-4a5040674ad6"&gt;&lt;Components&gt;&lt;Component Name="Microsoft.BizTalk.Component.XmlDasmComp"&gt;&lt;Properties /&gt;&lt;/Component&gt;&lt;/Components&gt;&lt;/Stage&gt;&lt;Stage CategoryId="9d0e410e-4cce-4536-83fa-4a5040674ad6"&gt;&lt;Components&gt;&lt;Component Name="Microsoft.Practices.ESB.Itinerary.PipelineComponents.ItinerarySelector"&gt;&lt;Properties&gt;&lt;ItineraryFactKey vt="8"&gt;Resolver.Itinerary&lt;/ItineraryFactKey&gt;&lt;ResolverConnectionString vt="8"&gt;ITINERARY:\\name=ESB.ExceptionHandling.Test&lt;/ResolverConnectionString&gt;&lt;/Properties&gt;&lt;/Component&gt;&lt;Component Name="Microsoft.Practices.ESB.PipelineComponents.Dispatcher"&gt;&lt;Properties /&gt;&lt;/Component&gt;&lt;/Components&gt;&lt;/Stage&gt;&lt;/Stages&gt;&lt;/Root&gt;</ReceivePipelineData>
          <SendPipeline Name="Microsoft.BizTalk.DefaultPipelines.PassThruTransmit" FullyQualifiedName="Microsoft.BizTalk.DefaultPipelines.PassThruTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="2" TrackingOption="ServiceStartEnd MessageSendReceive PipelineEvents" Description="" />
          <SendPipelineData xsi:nil="true" />
          <Enable>false</Enable>
          <ReceiveHandler Name="BizTalkServerIsolatedHost" HostTrusted="false">
            <TransportType Name="WCF-BasicHttp" Capabilities="899" ConfigurationClsid="467c1a52-373f-4f09-9008-27af6b985f14" />
          </ReceiveHandler>
        </ReceiveLocation>
      </ReceiveLocations>
      <SendPipelineData xsi:nil="true" />
      <Authentication>0</Authentication>
      <Tracking>255</Tracking>
      <Transforms />
      <OutboundTransforms />
      <RouteFailedMessage>false</RouteFailedMessage>
      <ApplicationName>ESB.ExceptionHandling</ApplicationName>
    </ReceivePort>
  </ReceivePortCollection>
  <PartyCollection />
</BindingInfo>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Digging Dog Ltd
New Zealand New Zealand
I have almost 20 years commercial software development using a number of languages from C++ to C#/VB. My main focus has been in the Microsoft space and, since the early 2000's, most of this has been in the web or integration arena. Over the past few years I have been focusing on building business solutions using a variety of products such as BizTalk and Share Point.
In terms of SDLC's, I have experience with various methodologies such as Agile, RUP, Iterative and Waterfall.
Lastly, the roles I have had in the last few years have given me the opportunity to gain a lot of experience as a consultant. Since, over the last 18 years, I have worked with many customers this has further given me the chance to enjoy many and varying challenges that have helped me grow in my career.
Today, I spend a lot of time talking, designing, documenting and mentoring team members. I also spend quite a bit of time authoring software and find the combination a perfect fit for me.

Specialties
Consultancy, Solution architecture, Solution design, Project costing and tracking, Team lead, Software development, C#, VB, ASP.NET, HTML, DHTML, JavaScript, BizTalk, SharePoint

Comments and Discussions