REST / SOAP endpoints for a WCF service

前端 未结 6 1446
囚心锁ツ
囚心锁ツ 2020-11-22 03:05

I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before?

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 04:10

    MSDN seems to have an article for this now:

    https://msdn.microsoft.com/en-us/library/bb412196(v=vs.110).aspx

    Intro:

    By default, Windows Communication Foundation (WCF) makes endpoints available only to SOAP clients. In How to: Create a Basic WCF Web HTTP Service, an endpoint is made available to non-SOAP clients. There may be times when you want to make the same contract available both ways, as a Web endpoint and as a SOAP endpoint. This topic shows an example of how to do this.

提交回复
热议问题