.net SOAP Web 服务的日志请求/响应
我正在使用第三方 .NET SOAP WebService (.asmx)。我想记录请求和响应。我已经看到一些使用 SoapExtensions。但我喜欢将日志记录集成到我的系统中,有些像这样:
public class MyWebService : ThirdPartyWebService
{
public string Request { ... }
public string Response {... }
}
我可以这样做吗?还有其他解决方案吗?
更新:我喜欢避免序列化请求和响应对象。但我现在正在做这个。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Fiddler:fiddler2.com/fiddler2/
或 Web 开发助手:projects.nikhilk.net/WebDevHelper
这是肥皂扩展示例: http://www.codeproject.com/Articles/38986/Trace-SOAP-Request-Response-XML-with-TraceExtensio.aspx< /a>
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