开发者

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

I want to architecture our soft开发者_运维问答ware 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?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜