在浏览器中测试wcf服务 [英] testing wcf service in browser

查看:76
本文介绍了在浏览器中测试wcf服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在浏览器中测试wcf服务?我的意思是如果我只在浏览器中输入url它应该只给我相关的xml

How can i test a wcf service in a browser? I mean if i only enter the url in the browser it should give me only relevent xml

推荐答案

这取决于什么类型的WCF您有以下服务:

It depends on what type of WCF service you have:


  • 如果您使用的是WCF REST服务( webHttpBinding ),那么你应该能够导航到服务地址,例如 http://yourserver/somedir/service.svc

  • if you're using a WCF REST service (webHttpBinding), then you should be able to just navigate to the service address, e.g. http://yourserver/somedir/service.svc

如果您正在使用其他任何东西,你有一个SOAP服务,你不能在Web浏览器中测试SOAP服务 - 浏览器只是不理解和说SOAP。但是,在C:\驱动器中有一个 WCF测试客户端应用程序你可以用于此目的的地方。

if you're using anything else, you have a SOAP service, and you cannot test a SOAP service in a web browser - the browser just doesn't understand and speak SOAP. There's however a WCF Test Client app in your C:\ drive somewhere which you can use for that purpose.

这篇关于在浏览器中测试wcf服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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