简体   繁体   English

以XML格式获取WCF Web服务响应

[英]Get WCF webservice response as XML

I have created a simple WCF web service. 我创建了一个简单的WCF Web服务。 How can I view it's response as XML? 如何查看XML的响应?

Do I create a consuming client application and then output the results as XML somehow? 我要创建一个消耗性客户端应用程序,然后以某种方式将结果输出为XML吗?

You can also use the Wcf testing tool provided to you by visual studio. 您还可以使用Visual Studio提供的Wcf测试工具。 Its pretty straight forward to use. 它非常简单易用。

You can find it in C:\\Program Files\\Microsoft Visual Studio 10.0\\Common7\\IDE\\WcfTestClient 您可以在C:\\ Program Files \\ Microsoft Visual Studio 10.0 \\ Common7 \\ IDE \\ WcfTestClient中找到它

SoapUI might be useful for you. SoapUI可能对您有用。 Will also help you to test your service. 还将帮助您测试服务。 Point it at the WSDL and away you go. 将其指向WSDL,然后离开。

You may use WCF tracing utility - SvcTraceViewer.exe. 您可以使用WCF跟踪实用程序-SvcTraceViewer.exe。 Just configure tracer in your config file. 只需在配置文件中配置跟踪器。

Take a look at this source(at the bottom, system.diagnostics section): 看一下此源(在底部的system.diagnostics部分):

http://xenta.codeplex.com/SourceControl/changeset/view/068ddfd6bf36#trunk%2fSrc%2fHst%2fIisHost%2fWeb.config http://xenta.codeplex.com/SourceControl/changeset/view/068ddfd6bf36#trunk%2fSrc%2fHst%2fIisHost%2fWeb.config

This is how we use WCF tracing in our project. 这就是我们在项目中使用WCF跟踪的方式。

我建议您使用XMLSpy ,因为它提供了WSDL,SOAP,xsd的良好视图。

Below are all the things I'd suggest: 以下是我建议的所有内容:

Try this, and please report back! 试试看,请报告! :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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