tags:

views:

25

answers:

1

We would like to transform the outgoing XML from a WCF request if certain conditions are met. Is there a way to intercept the XML stream right before it goes over the wire with WCF? I found an approach where you use Message objects and override OnWriteBodyContents method, bu in there you have to create XML by hand and ideally we would like a simpler method.

A: 

You need to build a message inspector and apply the transform in there:
http://msdn.microsoft.com/en-us/library/aa717047.aspx

Aliostad