简体   繁体   中英

log request/response of .net SOAP web service

I'm consuming a third party .NET SOAP WebService (.asmx). I want to log request and response. I have seen some solutions using SoapExtensions . But I like to integrate logging in my system, some like this:

public class MyWebService : ThirdPartyWebService
{
    public string Request { ... }
    public string Response {... }
}

Could i do this? Is there another solution?

UPDATE: I like avoid to serialize request and response object. But I´m doing this now.

you can use Fiddler: fiddler2.com/fiddler2/

or Web development helper: projects.nikhilk.net/WebDevHelper

Here is soap extension sample: http://www.codeproject.com/Articles/38986/Trace-SOAP-Request-Response-XML-with-TraceExtensio.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM