Exitos
Exitos

Reputation: 29720

Can I expose a service with REST & SOAP via WCF?

I want to architecture our software so that we can expose our API logic using WCF (SOAP and REST).

Im confused as to whether I have to use ASMX files if I want to do SOAP services, or whether .svc file can still do SOAP service?

Upvotes: 3

Views: 1163

Answers (2)

Nathan Tregillus
Nathan Tregillus

Reputation: 6334

Your svc file can provide the restful interface you are requesting. You just have to do a little configuring within your web configuration file, and decorate the svc class with the attributes to describe the behavior of our restful url.

here is a great article going over the steps:

http://www.dotnetfunda.com/articles/show/779/simple-5-steps-to-expose-wcf-services-using-rest-style

Upvotes: 1

Bala R
Bala R

Reputation: 108927

Yes you can. You have to expose a SOAP end-point for your WCF service. This MSDN post has an example.

Upvotes: 3

Related Questions