laconicdev
laconicdev

Reputation: 6440

Applying XSLT to WCF message

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.

Upvotes: 6

Views: 1357

Answers (1)

Aliostad
Aliostad

Reputation: 81660

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

Upvotes: 2

Related Questions