O'Reilly logo

Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications by Steven Cheng

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a custom MessageEncoder

MessageInspector can intercept the underlying messages of WCF service operation calls. However, this is not the only way for intercepting and customizing messages in a WCF service. In WCF extension architecture, there is another powerful component called MessageEncoder, which can also perform customization on the underlying messages of WCF service operation calls.

In this recipe, we will demonstrate how we can use a custom MessageEncoder to alter the raw message of a WCF service operation.

How to do it...

The sample service will use a custom MessageEncoder component to customize the SOAP XML content of each service operation call. The entire process will be as follows:

  • Create a custom MessageEncoder type
  • Create a custom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required