Can you call WCF web service methods from a web browser for testing purposes?

I was thinking about moving from ASMX to WCF to implement web services. One thing that is sometimes very practical with ASMX web services is that you can simply enter the url of the asmx file in a web browser and have a simple UI that allows you to call web methods directly from the browser, for example testing / debugging (at least as long as the methods don't take any complex parameters).

Is this also possible for WCF based web services (hosted in IIS or Windows service)?

+2


source to share


2 answers


The standard WCF messages are SOAP messages, and the browser doesn't usually do SOAP, so no - you can't just invoke WCF messages from the web browser. WCF also does not provide a "test" ASPX page like ASMX.

But WCF provides, as Yasser already pointed out, a rather powerful and useful little SOAP tester called WcfTestClient that should already be on your machine.



If you are doing WCF REST (webHttpBinding), then of course you are just exchanging XML documents over HTTP, so you can use a web browser in this case to click on your URLs and receive the data payload as XML.

Mark

+6


source


Have you tried WCFTestClient ? it is not a web browser, but it does the job



+6


source







All Articles