First let's create a simple WCF service that Biztalk server will call.
Here is my ServiceContract and Implementation of the Service Contract.
I am Hosting this WCF service in Console Application (Self hosting).
Now I need to actually start up my WCF service host. Now BizTalk can interrogate this service to extract the necessary metadata. Within Visual Studio.NET, I chose “Consume WCF Service” from the “Add Generated Items” project menu.
Now create Empty Biztalk Project. Right click on the project and select Add Generated Items as shown below.
From Add Generated Items Dialog select Consuming WCF Service Template.
Now Follow the BizTalk WCF Service Consuming Wizard.
Here Edit the WCF Service MEX endpoint URL
Before doing above step make sure that WCF service UP and Running ( Remember We hosted this service in console App).
Now we are successfully finished the Wizard.
WCF Service Consuming Wizard Generates the following files.
Now Open the SreeniImpl.odx Orchestration Create a message for the WCF Service Add Operation and configure the Receive and Send Ports.
Now Build and Deploy the Application and Open up the Biztalk 2009 Admin Console.
Our WCF service build with Basic HTTP binding so in Biztalk we need to configure send port Transport type as WCF-Basic HTTP as shown below.
Now configure the send port as shown below.
Now configure the Receive port as shown below .
Now test the Biztalk application.
Input XML Message
when we drop the input XML message in Receive Location Biztalk server call WCF service Add Operation.
Output XML Message:
<?xml version="1.0" encoding="utf-8" ?>