我想知道我是否可以使用WCF,以便客戶端可以通過更改URL來設置適當的綁定。一些示例:WCF可以用於擁有REST API URL,如http://yourhost.com/{service-contract}.{binding}?op={target-method}嗎?
URL:http://yourhost.com/orders.json?op=getall
描述:獲取所有訂單爲JSON。
URL:http://yourhost.com/orders.xml?op=getall
描述:獲取所有訂單爲XML。
URL:http://yourhost.com/orders.soap?op=getall
描述:獲取所有訂單作爲符合WSI的SOAP。
URL:http://yourhost.com/orders.soap?wsdl=yes
描述:顯示SOAP服務的WSDL。
這個策略有點類似於Twitter在它的API中使用的。
這是可能與WCF?