WCF web service - how can I view the XML request and response inside my application?

I am writing a C # WinForms application that uses a web service using WCF. I would like to be able to display the XML request and response in the application in real time as I call. Is it possible?

+1
source share
1 answer

You might want to use / write your own MessageInspector:

http://msdn.microsoft.com/en-us/library/aa717047%28v=VS.90%29.aspx

Another convenient way to look at the raw message is to enable tracing (but this will result in logging messages outside your application that may not meet your needs):

http://msdn.microsoft.com/en-us/library/ms733025.aspx

+3
source

Source: https://habr.com/ru/post/912155/


All Articles