从WCF服务捕获SOAP体 [英] Capturing the SOAP body from a WCF service

查看:118
本文介绍了从WCF服务捕获SOAP体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时通讯使用WCF服务和WSDL对象来打造。我需要捕获SOAP meassage身体请求/响应。我不需要编辑短信只是采取偷看或保存/记录它。

Im using a WCF service and WSDL objects to build the body. I need to capture the SOAP meassage body request/response. I don't need to edit the message just take a peek or save/log it.

我已经使用WCF消息记录按这里尝试: http://msdn.microsoft.com/en-us/library/ms730064.aspx

I have tried using the WCF message logging as per here: http://msdn.microsoft.com/en-us/library/ms730064.aspx

和使用Microsoft服务跟踪查看器,然而,这是只显示我的头等等。不管我使用的设置。

And using the Microsoft service trace viewer, this, however, is only showing me the headers etc. regardless of the settings I use.

也试图用小提琴手,而这又似乎忽略请求主体。

Have also tried to use fiddler, which again seems to ignore the request body.

所以...我需要做一些像这里所列出: <一href="http://stackoverflow.com/questions/5493639/how-do-i-get-the-xml-soap-request-of-an-wcf-web-service-request">How我会得到一个WCF Web服务请求的XML SOAP请求?

So... do I need to do something like what is outlined here: How do I get the XML soap request of an WCF Web service request?

跟踪观众看起来不错和放大器;我希望我能捕捉到整个邮件,包括使用本身体。

The trace viewer looks good & I was hoping I could capture the whole message including the body using this.

有关标准的WS服务我已经使用了一个监听器概述在这里: <一href="http://blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx" rel="nofollow">http://blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx

For standard WS services I have used a listener as outlined here: http://blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx

这个工程完全按照我wan't,可以通过在app.config开/关切换

This works exactly as I wan't and can be switched on/off via the app.config

推荐答案

我还没有捕捉使用WCF内建的消息记录整个消息的问题。你有没有打开使用文本编辑器svclog文件,并验证了整个消息不是XML?再看推荐的部署和放大器;在此 MSDN文章调试设置,看看如何记录整个消息。在服务跟踪查看器,请确保你选择的消息视图,并期待在右下方窗格中的消息或XML选项卡中的全部信息。

I haven't had problems capturing the entire message using the WCF built-in message logging. Have you opened the svclog file using your favorite text editor and verified the entire message isn't in XML? Look at the recommended deployment & debugging settings in this MSDN article to see how to log the entire message. In the service trace viewer, make sure you pick the Message view and look for the entire message in the right bottom pane Message or XML tabs.

这篇关于从WCF服务捕获SOAP体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆