Click here to Skip to main content
13,189,884 members (61,676 online)
Click here to Skip to main content
Add your own
alternative version


17 bookmarked
Posted 4 Mar 2009

Invoking a Web Service without using a Proxy by using WCF Adapter in BizTalk Server 2006 R2

, 4 Mar 2009
Rate this:
Please Sign up or sign in to vote.
Invoking a Web Service without using a Proxy by using WCF adapter in BizTalk Server 2006 R2

Introduction - WCF Adapters for BizTalk Server 2006

The BizTalk Adapters for Windows Communication Foundation (WCF) allow Microsoft BizTalk Server 2006 R2 to communicate with WCF-based applications. The BizTalk WCF adapters include five physical adapters that represent the WCF predefined bindings.

The screen shot below depicts the list of WCF Biztalk adapters on the Biztalk Server 2006 R2 Server:


The TASK at Hand

In this article, we shall invoke a Web Service using the WCF adapter, but without using a web service proxy which is done typically. This can be any web service which has a WSDL file to describe itself.

Understanding the Solution Structure

The screen shot below shows the solution structure:


  • EmployeeSchemas - A BizTalk project which holds all the internal domain specific schemas. This has no references to any other project.
  • ProcessEmployee - A BizTalk project which contains an orchestration to process internal domain specific schemas, this has no knowledge about the web service schemas to be invoked.
  • EmployeeMaps - A BizTalk project which holds all the web service specific schemas and maps. This of course would have references to domain specific schemas. The maps are used to transform the domain specific message into a web service request message and vice versa.

Using the WCF Adapter Wizard

Once the Web Service is setup and running, right click on the BizTalk Project, select "Add" -> "Add Generated Items..." and select "Consume WCF Service". Follow the screen shots below...

  • Select Metadata exchange point and select the web service end point.


  • Specify the web service URL address to generate the WSDL.


  • Finally specify the namespace and click finish to generate the schemas.


The following files would be generated by the WCF wizard:

EmployeeInfoServicePort.BindingInfo.xml - For transport type : WCF-BasicHttp
EmployeeInfoServicePort_Custom.BindingInfo.xml - For transport type : WCF-Custom

Open the file EmployeeInfoServicePort.BindingInfo.xml and note the 'Operation name' which is RetrieveEmployeeInfo. This must match the Send Port operation name. Observe the screen shot below for more clarity:


NOTE: The orchestration (*.odx) file and the WCF-Custom binding which were auto-generated can be safely deleted.

Configure the Maps in the WCF Send Port

Once the orchestration has been coded and deployed, import the bindings file which has been auto generated. This would generate a WCF send port. Now specify the maps which convert the message from domain-specific into a web service request using the send port 'Filters and Maps' section. Observe the screen show below.


Common WCF Adapter - Error Condition


Consuming BizTalk WCF Service Adapter Wizard: Object reference not set to an instance of an object.


This happens when no target namespace is specified for a schema tag in the WSDL. Open the WSDL file, observe the tag xsd:schema and add the attribute targetNamespace.

<xsd:schema targetNamespace="http://com.naveen.employee">


  • We have separated the web services schemas from the domain specific schemas. The orchestration has no knowledge of the web service schemas.
  • Using the Send Port maps, the web service end point and the schemas can be changed without re-deploying/modifying/recoding/recompiling the orchestration.


  • 4th March, 2009: Initial post


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


About the Author

Naveen Karamchetti
Architect AT&T Wi-Fi Services
United States United States
Naveen has done his Masters (M.S.) in Computer science, has started his career programming the mainframes and now has more than a decade of programming, development and design experience. Naveen has a sharp eye and keen observation skills. Naveen has worked for several companies and strived hard to build large scale business applications and bringing better solutions to the table.
Quite recently Naveen has built a fairly complex integration platform for a large bank. His hobbies include training, mentoring and research. Naveen spends his free time visiting National Parks nationwide.

Naveen has developed the BizTalk Control Center (BCC)

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171016.2 | Last Updated 4 Mar 2009
Article Copyright 2009 by Naveen Karamchetti
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid