Using a WCF Service in Microsoft Office

One interesting and useful interoperate scenario of WCF service development is how to consume a WCF service from a Microsoft Office client such as Word, Excel, or Outlook. Currently, there are several possible solutions for WCF service consumption in an Office client, which include:

  • Creating a .NET client proxy and exposing it as a COM object
  • Using the XML HTTP component to consume the WCF service over plain HTTP in VBA code
  • Directly using VSTO and .NET-managed code to consume WCF services

In this recipe, we will demonstrate a different approach for consuming a simple WCF service in a Microsoft Office client, which utilizes the WCF service moniker component.

How to do it...

The sample service here will use Office ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.