Skip to main content

BizTalk Server 2006 R2 Code Samples

The BizTalk Server 2006 R2 code samples demonstrate features such as EDI/AS2, Microsoft BizTalk RFID, the Windows Communication Foundation (WCF) Adapters, and the BAM (Business Activity Monitoring) Interceptor. This page also includes some new samples to further demonstrate features that exist in both BizTalk Server 2006 and BizTalk Server 2006 R2, such as business rules and orchestration.

Orchestration

Recovering From Failures in an Orchestration

This sample provides a detailed conceptual explanation of compensation and of forward recovery from persisted state. It also uses several orchestrations to demonstrate the different options in compensation and forward recovery and the benefits they offer. Posted on 10/15/07.

EDI and AS2

Using a Custom Pipeline Component for EDI Party Resolution

BizTalk Server 2006 R2 introduces new EDI party resolution functionality which resolves EDI interchanges to a party and then processes the interchange according to the EDI properties that are defined for the party. This sample demonstrates this functionality.

WCF Adapters

Using Custom Behaviors with the BizTalk WCF Adapters

Extending Windows Communication Foundation (WCF) services through custom behaviors and the WCF adapters. Posted 12/18/2008.

WCF Authorization

Access to a BizTalk receive location is secured using a custom authorization behavior with the WCF adapters. Posted on 5/2/2008.

WCF Message Intermediary

Dynamically channel an incoming Windows Communication Foundation (WCF) client call to the correct version of a WCF Service using a BizTalk Server custom pipeline as a WCF intermediary. Posted on 4/10/2008.

WCF Message Interceptor

Custom message interception during BizTalk Server’s binding processing of an outgoing Windows Communication Foundation (WCF) message. Posted on 4/10/2008.

WCF Adapter and Messaging

WCF messages are sent from a WCF client application to a WCF service using BizTalk Server messaging and the WCF Adapters in this new sample. Updated on 1/21/08

Using Dynamic Send Ports with WCF Adapters

This sample demonstrates how to configure dynamic send ports by using WCF adapter context properties for the WCF-NetTcp transport and for the WCF-Custom transport with the WCF-NetTcp binding.

Handling Typed Fault Exceptions in Orchestrations

This sample demonstrates how to handle typed fault exceptions in orchestrations.

Using Transactions with the WCF Adapters

This sample demonstrates the use of a client-coordinated transaction and the client and server options for transaction flow by using the WS-AtomicTransaction support in the WCF adapters.

Using Custom Binding Extensions with the WCF-Custom Adapters

This sample demonstrates how WCF extensibility points can be used with the WCF-Custom adapter by using a custom binding sample, NetHttpBinding, in the Microsoft Windows Software Development Kit (SDK) for Windows Vista and .NET Framework 3.0 Runtime Components.

Using Custom SOAP Headers with the WCF Adapters

This sample demonstrates how to access custom SOAP headers in inbound WCF messages and how to add custom SOAP headers to outbound WCF messages.

WCF Adapters Walkthroughs

Get sample code for the WCF adapter walkthroughs outlined in the WCF Adapter Walkthroughs topic of the MSDN Library. These walkthroughs provide step-by-step instructions for performing a task by using the WCF adapters, or for using a feature of the adapters.

BAM Interceptor

Instrumenting the WCF Getting Started Sample

This sample demonstrates how a simple Windows Communication Foundation (WCF) application can be configured to capture data for the BAM activity database using the BAM WCF interceptor. The sample is based on the WCF Getting Started sample included in the WCF Technology Samples.

Using the BAM WCF Interceptor with Multiple Endpoints

This sample demonstrates how an existing WCF application can be configured to capture data for the BAM activity to the BAM Primary Import database using the BAM WCF interceptor for WCF.

Using the BAM Windows Communication Foundation Interceptor

This sample demonstrates how an existing WCF application can be configured to capture data for the BAM activity in the BAM Primary Import database using the BAM WCF interceptor.

Using the BAM Windows Workflow Foundation Interceptor

This sample demonstrates how an existing Windows Workflow Foundation (WF) application can be configured to capture data for the BAM activity in the BAM Primary Import database using the BAM WF interceptor.

Business Rules

Handling Optional Elements in Business Rules

An optional element from an XML schema is used in a policy in this sample, and no error is raised when a message is submitted without the optional element at runtime. Posted on 6/30/08.

Deploying Business Rules Programmatically

This sample demonstrates how to use the FileRuleStore, SqlRuleStore, and RuleSetDeploymentDriver classes to automate importing, exporting, deploying, undeploying, and removing policies. This sample is created as a console application, so that you can easily use the tool from a batch file or a script file to automate importing, exporting, deploying, undeploying, and removing policies. Posted on 10/15/07.

Analyzing Multiple Instances of a Given Type Simultaneously in a Rule

If you write a rule against a .NET type and assert three .NET objects of that type into the rule engine working memory, the rule engine performs match-conflict resolution-action phases on each .NET object separately. In some scenarios, however, you might want to analyze multiple instances of a given type simultaneously in a rule. This sample demonstrates how the rule engine can simultaneously analyze and act upon each instance of a type that is asserted into the engine. Posted on 10/15/07.

Web Services

Consuming Web Services Using the SOAP Adapter

Creating a multipart message for a WCF service using the BizTalk SOAP adapter. Posted 12/18/2008.

Microsoft BizTalk RFID

RFID WMI Event Handler

RFID events are monitored by WMI and forwarded through e-mail in this new code sample. Posted on 5/2/2008.

Tag Data Translation Library

New BizTalk RFID sample containing a C# class library that implements the Tag Data Translation (TDT) standard by EPCglobal.  Updated on 4/10/08.

Suspended Event Viewer

Suspended RFID events are retrieved from the suspended event queue and displayed in this sample. Posted on 11/16/07.

Suspended Event Viewer II

Suspended RFID events are viewed, modified, and resubmitted to the Suspended Event Queue in this sample. Posted on 12/20/07.

Event Handler Template

This sample ships with a Visual Studio template that can be used to write event handlers.

Beep Event Handler

This sample shows you how to create a custom event handler and add it to an RFID process pipeline.

Duplicate Tag Elimination

This sample eliminates duplicates from TagReadEvents and TagListEvents.

BRE Event Handler

This sample demonstrates how to invoke a Business Rule Engine (BRE) policy by using the RuleEnginePolicyExecutor event handler in an RFID process.

Event Cycle Event Handler

This sample has an RFID process with an event handler that collects a set of TagReadEvents in an event cycle. Within the event cycle, duplicates are automatically filtered.

Consume WCF Service

This sample posts a TagReadEvent as a message to a Windows Communication Foundation (WCF) service.

Using BizTalk SQL Adapter in Receive-only Scenario

The BizTalk orchestration in this sample receives tag data from the RFIDsink database by executing the GetAndDeleteEventsForBizTalk stored procedure.

Using BizTalk SQL Adapter in Request-Response Scenario

The BizTalk orchestration in this sample sends a request to execute the GetTagReadEventsWithTimeFilter stored procedure.

Using Web Service Proxies Exposed by BizTalk RFID

This sample demonstrates how to use the Web service proxies exposed by the Microsoft.Rfid.ManagementWebServiceProxies assembly that ships with BizTalk RFID.

Using WCF Service Exposed by a BizTalk Orchestration

This sample demonstrates how to expose a BizTalk orchestration as a WCF service, and how to consume the WCF service from a BizTalk RFID process.

Provider Template

This sample ships with a Visual Studio template that can be used to write Device Service Provider Interface (DSPI) for device providers.

Import Export Rule Store

This sample allows you to import Business Rule Engine (BRE) policies and vocabularies from an XML file into the Rule Engine database, and to export policies and vocabularies from the Rule Engine database to an XML file.

Synchronous Commands

This sample issues a set of commands to BizTalk RFID from a Windows Forms application by using the object model (OM) exposed by BizTalk RFID.

Microsoft BizTalk RFID Standards Pack

BizTalk RFID Standards Pack Tag Data Translator Sample

The Tag Data Standards Sample demonstrates the usage of the Encode, Decode and Translate operations (based on the EPC global ratified standard) one can use from BizTalk RFID applications.

BizTalk RFID Standards Pack LLRP Extended Provider

The LLRP extension provider sample demonstrates how to write a provider which supports LLRP vendor extensions.

BizTalk RFID Standards Pack Web Services Discovery Provider

The WS-Discovery provider sample is a Microsoft Visual C# sample that creates a sample discovery provider, using the Microsoft BizTalk RFID discovery library.

BizTalk RFID Standards Pack Web Services Discovery Simulator

The discovery sample simulates messages sent by a BizTalk RFID device. The sample simulates sending of Hello messages, and responds to a probe from a provider with a ProbeMatch message.

Microsoft BizTalk RFID Mobile

BizTalk RFID Mobile CE Provider Template

The CE Provider Template is a Visual Studio 2005 template that helps you start writing DSPI device providers for BizTalk RFID Mobile.

BizTalk RFID Mobile My First CE Provider

The My First CE Provider sample is a Microsoft Visual C# sample that creates a sample Visual Studio CE DSPI device provider.

BizTalk RFID Mobile Read Tags Application

The Read Tags sample is a Microsoft Visual C# sample that demos the features of the BizTalk RFID Mobile platform.