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.
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.
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
MessageContract source code:
Service implementation code:
BizTalk test message I used for my sample:
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 firstname.lastname@example.org.
Visit my blog http://biztalk-ssis-ssas.blogspot.com/.
Microsoft EI Professional
- 30th March, 2008: Initial post
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/