I have a bunch of great, working code that access various REST (and sometimes SOAP) apis. It is all WCF in .NET 4.0 based.
But sometimes the system I access returns bad xml (ahhhh, developers who build xml with strings... bad people!).
So the XML is bad,,, and WCF throws (as it should)... system.invalidoperationexception ... error in xml document ... [The string FOO is not a valid Boolean value][or some other parsing error]...
I need to log the full raw xml of the HTTP POST/GET response (the response that failed to deserialize). For some reason, I can't seem to figure out where in WCF land to find this.