views:

430

answers:

2

I was thinking about moving from ASMX to WCF to implement web services. One thing that was sometimes very practical with ASMX web services is the fact that you can simply enter the URL of the asmx-file in a web browser and you get a simple user interface that allows you to call the web methods directly from the browser, e.g. for testing/debugging (at least as long as the methods do not take any complex parameters).

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

+4  A: 

did you try the WCFTestClient ? it is not a web browser but it does the job

Yassir
+2  A: 

The standard WCF messages are SOAP messages, and a browser doesn't normally do SOAP, so no - you cannot simply call WCF messages from a web browser. WCF also does not provide a "testing" ASPX page like ASMX did.

But WCF does provide - as Yassir already pointed out - a quite powerful and useful little SOAP tester called WcfTestClient which should be on your machine already.

If you're doing WCF REST however (webHttpBinding), then of course, you're simply exchanging XML documents via HTTP, so you can use a web browser in that case to hit your URLs and get the data payload back as XML.

Marc

marc_s