Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Applying XSLT to WCF message

Tags:

.net

xml

wcf

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.

like image 889
laconicdev Avatar asked Sep 08 '10 18:09

laconicdev


1 Answers

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

like image 98
Aliostad Avatar answered Oct 07 '22 17:10

Aliostad