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

Consuming WCF Services in BizTalk Server 2006 R2 - Add Generated Items (WCF Services)

, 30 Mar 2008 CPOL
Rate this:
Please Sign up or sign in to vote.
Consuming WCF Services in BizTalk Server 2006 R2 - Add generated items (WCF Services)

Introduction

A long time back, I was thinking of coming up with this article, and just now found the time to write about WCF services and its implementation with BizTalk Server 2006 R2. I have designed a few small solutions in the past few months to deal with scenarios like Information Integration and SOA with BizTalk Server R2, where I found the great chance to work upon the WCF adapter series as well as Web Service Factory: Modeling Edition. Both made me a big fan of them, it's great to work on both, I am not focusing on WebService Factory modeling in this article, but will discuss about WCF services consumption inside BizTalk and few videos might help people to work on them.

I would like to share few images below, by reading these images you can understand the service I have coded for the sample. If you are interested in the sample code please mail me, and I promise you will find that sample someday in your mail box... when, that I don't know. Smile | :) But I will try and send it to you as soon as possible.

I feel that the best way to consume WCF services inside BizTalk solution is by using WCF Services Consume Wizard which you can find in Visual Studio Template. This wizard will power you by generating schema and port binding configuration files for your solution based on service descriptions. I am not going deep into how this works internally here but I will focus on the practice I went through.

The below image shows Generated Items and Visual Studio Template.

Click to enlarge image

Please have a look to the below Video Presentation where you can find what steps I followed to generate my sample project. Hope it will surely help you in any manner while working with WCF and BizTalk together.

To view walk through video presentation, please visit my blog http://biztalk-ssis-ssas.blogspot.com/.

As a result of the Wizard, you will get schema and binding files inside your solution. That schema will be generated on the basis of the metadata of the consumed services and it could be used as multipart messages in case of request-response services. The below snaps will show you the BizTalk schema presentation against the .NET message contracts and data contracts.

DataContract source code

Click to enlarge image

MessageContract source code:

Click to enlarge image 

Service implementation code:

Click to enlarge image

BizTalk schema:

Click to enlarge image

BizTalk test message I used for my sample:

Click to enlarge image

You can analyze yourself the presentation of Inbound message and the Contract representation inside WCF Implementation upon the above snaps. You can consume the generated schema in routine BizTalk solutions and patterns. While deploying such solution, you can use generated binding information for such implementation with Endpoint transportation and Behavior information regarding WCF hosting and services. It is a very good feature provided by the wizard which makes our life very easy. Let's have a look at the below video presentation on the WCF Http and Custom Adapter configuration inside through BizTalk administrator console.

To view walk through video presentation, please visit my blog http://biztalk-ssis-ssas.blogspot.com/

Hope you liked this article and it will give you a fair idea about the BizTalk Server 2006 R2 and WCF coupling in Solution. From a system/solution designer point of view, I really enjoyed working with these two made for each other technologies and it provides such ease to workout most complex scenarios regarding service orientation and integration. I also realize the solution's capability to work over Internet Integration where security is the major concern and we generally prefer to go with ws-HTTP or HTTP channels for integration. On such scale, it can help us to give such secured integration system.

Please provide your feedback about the article at nilayparikh@gmail.com.

Visit my blog http://biztalk-ssis-ssas.blogspot.com/.

Nilay Parikh
Microsoft EI Professional

History

  • 30th March, 2008: 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

Nilay Parikh
Software Developer
United Kingdom United Kingdom
My primary skill set comprise of EAI, ETL and EDI with immense experience in Microsoft BizTalk v2004/2006/R2, Web Services, .net v2.0/3.0 (WCF, WWF), SQL Server 2000/2005 (SSIS/SSAS/BIDS). I have very good proficiency with the BizTalk 2004/2006, SSIS, SS Service Broker, Workflows and MS SOA supportive technologies like WCF/MSWSE 2.0, with thorough knowledge of various Integration System Development Strategies like integration patterns, EAI concepts, B2B integration and securities, SOA. Specialties: BizTalk v2004/2006/R2, SSIS, SSAS, .net 2.0/3.0, WinCF, WinWF, Host Integration Server 2004/2006
 
Personal Technology Blog: http://biztalk-ssis-ssas.blogspot.com/

Comments and Discussions

 
QuestionCan you please provide the sample code for biztalk custom pipeline component Consuming WCF service. PinmemberMember 310789920-Apr-12 12:37 

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 30 Mar 2008
Article Copyright 2008 by Nilay Parikh
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid