Implementing a POX HTTP service

WCF services by default use SOAP as the message format of service operations, which means each message transferred between the client and service is wrapped in a SOAP envelope that contains one SOAP body and some SoapHeaders. However, sometimes our WCF service will need to work with some legacy POX (Plain Old XML) clients or our WCF-based client will need to talk to some POX-style service. In such cases, it is necessary to let our WCF client or service generate arbitrary XML messages without strictly obeying the SOAP standard.

How to do it...

We will use a CustomBinding to build a POX-enabled WCF service and consume it with a POX-enabled WCF client program. Let’s have a look at the complete steps:

  1. The first thing to ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.