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.
You need to build a message inspector and apply the transform in there:
http://msdn.microsoft.com/en-us/library/aa717047.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With