WCF services by default are restful or soap based?
Asked Answered
G

2

6

I am new to WCF and just have made a sample service. Please guide me by default WCF services are soap or restful if we not specify anywhere ? I tried to run URL of my services and got this page. I am feeling it is SOAP based. Kindly guide.

Thanks

Gownsman answered 7/1, 2012 at 21:17 Comment(0)
V
10

WCF services by default are SOAP - unless you use the webHttpBinding which is REST (and this for now is the only RESTful binding). To test your SOAP based services, you cannot just navigate to an URL in your browser - you need to use a SOAP test app, like SoapUI or the WCF Test Client.

WCF Data Services and WCF RIA Services are based on webHttpBinding and thus are REST-based. REST services can be tested by just browsing to the URL - you'll get back XML that can be shown in your browser (or JSON which you can store to a file and look at)

Vascular answered 7/1, 2012 at 22:28 Comment(0)
A
0

By default, WCF services are soap based if you use the project item "WCF Service" in visual studio.

Ancilla answered 7/1, 2012 at 21:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.