Click here to Skip to main content
Click here to Skip to main content

Fax Adapter

, 28 Sep 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
Fax Adapter for BizTalk Server 2006

Introduction

One of the primary design goals of BizTalk Server 2006 is to facilitate the exchange of business documents between trading partners. To help meet this goal, BizTalk Server 2006 includes several adapters that provide connectivity between BizTalk Server and trading partners using commonly recognized data protocols and document formats.

BizTalk Server 2006 includes the following adapters, which are referred to as the "native" or "integrated" adapters: Base EDI, BizTalk Message Queuing, FILE, FTP, HTTP, MQSeries, MSMQ, POP3, SMTP, SOAP, SQL, and Windows Sharepoint Services.

I thought of developing a Custom Biztalk Adapter and it lead to the development of the Fax Adapter.

The Adapter Framework

The following figure shows how an adapter and the Adapter Framework work together to connect your application to BizTalk Server.

  1. Data is received through a receive location that is listening for messages of a certain protocol at a specified address. The receive location is associated with an adapter and a receive pipeline. You can configure both the adapter and the pipeline components to perform certain logic on messages having a predetermined protocol.
  2. After the message is received by the receive location, the message is sent to the adapter, which creates a new BizTalk Server message, attaches the data stream to the message (typically in the body part of the message), adds any metadata pertaining to the endpoint over which the data was received, and then submits that message into the Messaging Engine.
  3. The Messaging Engine sends the message to the receive pipeline where the data is transformed into XML, the message sender is authenticated, the message is decrypted, and the XML is validated.
  4. The Messaging Engine publishes the message to the MessageBox. The MessageBox is a Microsoft SQL Server table containing messages to be processed. Both orchestrations and send ports can subscribe to the MessageBox.
  5. The Messaging Engine sends the message to either an orchestration or a send port subscriber based upon the message context properties matching the specifications set in the filter on the subscriber.

If an orchestration is the subscriber, it processes the message and sends it out using a send port. After the send port has it, or is the only subscriber, the message passes through the send pipeline into a send adapter before being transmitted over the wire.

Adapter Framework

Receive Adapters

Receive adapters are responsible for creating a new BizTalk Server message by attaching the network/data source stream to the message body. It also adds any metadata pertinent to the endpoint over which the data was received, then submits that message to the Messaging Engine.

The adapter deletes the data from the receive endpoint or sends the appropriate acknowledgement message to the client indicating that the data has been accepted into BizTalk Server.

The following figure shows the interfaces implemented by receive adapters.

Receive Adapter

Send Adapters

Send adapters are responsible for sending a BizTalk message to the specified endpoint using its specific transport protocol.

The following figure shows the interfaces that batched and non-batched send adapters need to implement:

Send Adapter

FaxAdapter

The FaxAdapter is written on top of the File Adapter Sample in Microsoft Visual C# .NET to work with Microsoft BizTalk Server 2006. It provides code to build either a dynamic or a static adapter. However, the following procedure only outlines the static adapter. A static adapter is an adapter with a static set of schemas and no custom user interface. A dynamic adapter has a custom user interface and potentially a dynamic set of schemas. Both static and dynamic adapters use the Add Adapter Wizard to add their schemas to a BizTalk project.

The dynamic adapter with a custom user interface and potentially dynamic set of schemas will require additional code in the adapter management side.

What This FaxAdapter Does

Fax Console

When the FaxMessage arrives to the Incoming Archive, the Fax Adapter copies the Tiff Image (FaxMessage) to the temporary folder and runs OCR on the Tiff Image and extracts the text and submits to BizTalk as a message, or takes messages from BizTalk Server and sends to the FaxConsole. It provides code to build either a dynamic or a static adapter; however, the following procedure only outlines the static adapter. A static adapter is an adapter with a static set of schemas and no custom user interface. A dynamic adapter has a custom user interface and potentially a dynamic set of schemas. Both static and dynamic adapters use the Add Adapter Wizard to add their schemas to a BizTalk project.

FaxAdapter Environment

  • Windows Server 2003
  • Microsoft Office 2003 (with Microsoft Document and Imaging)
  • Configured FaxConsole with Modem
  • Microsoft SQL Server 2005
  • Microsoft Visual Studio 2005
  • Microsoft BizTalk Server 2006

The FaxAdapter Project has the references of FaxService (ships with OS Windows Server 2003) and Document Imaging (Ships with Office 2003).

Fax Library to access FaxConsole for incoming and outgoing messages
Fax Console Reference
Imaging Library to perform OCR operation on TIFF Image
Imaging Reference

The following tables show the files in this sample and describe their purpose.

FaxAdapter Description
\Design Time files Contains the design time and management project (FaxAdapterManagement.csproj)
\Runtime files Contains the run-time file-copy receive and transmit projects (FaxAdapter.csproj)

History

  • 29th September, 2006: Initial post

License

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

Share

About the Author

Anil_Kumar_P
Web Developer
India India
Anil is from Hyderabad, Andhra Pradesh. He is Currently Working with VisualSoft Technologies Ltd., As a Software Engineer.
 
Anil has more than 4 yrs of experience in the IT industry working on Microsoft Technologies. He is involved in various project activities like System Architecture, Design, and Development. Technical experience most specifically ASP.NET , Javascript, Biztalk 2004/2006, Webservices, C# and .NET framework. He has have worked on various language and platforms. He is Microsoft Certified professional.
 
The author has won several programming awards within the organizations worked and is well-recognized.
 

--

Comments and Discussions

 
Generalplease help me to use this adapter fax Pinmemberamir33216-Dec-08 21:47 
I con not use this adapter please display this program for me because my need this to use my program
this adapter is very full program for fax
thanks
GeneralUsing the Fax Class PinmemberMohammad Riazi9-Aug-08 23:20 
QuestionRegarding FAXCOMEXLib and MODI assemblies PinmemberRitesh Bhatt8-Jan-08 2:09 
GeneralFax Adapter Pinmembertri59528-Feb-07 0:17 
Generaldeploying fax adapter Pinmemberfvv216-Nov-06 1:22 
GeneralRe: deploying fax adapter PinmemberViorelNeagu24-Jan-07 11:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141223.1 | Last Updated 29 Sep 2006
Article Copyright 2006 by Anil_Kumar_P
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid