小编MSU*_*SUH的帖子

不同的WCF绑定,它们的差异以及与其他平台的兼容性

我正在寻找关于WCF绑定主题的一些很好的技术细节,我有兴趣知道以下事情.

  1. 不同WCF绑定列表及其特殊用途和限制.
  2. 与其他平台的兼容性/互操作性,如在Java,PHP客户端中使用WCF服务.支持哪种绑定,哪种绑定不支持.
  3. 如果我想通过服务API获取/发布安全数据,如果客户端应用程序是Java或Php,我应该使用哪种绑定?

我通过互联网浏览了不同的材料,但它没有详细而且有些分散.等待一些好的回应.

.net php c# java wcf

19
推荐指数
2
解决办法
3万
查看次数

POST/PUT restful服务的URI模板

我打算写一个宁静的API,我的要求是在"Transaction"对象上调用方法,我想知道如何使用适当的URI模板调用Post/PUT,以便我可以创建/更新Transaction资源而不使用"verbs"在Uri映射.

[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/Transaction/{**What to write here ????**}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
public Transaction AddTransaction(Transaction transaction)
{
    return AddTransactionToRepository(transaction);
}

[OperationContract]
[WebInvoke(Method = "PUT", UriTemplate = "/Transaction/{**What to write here ????**}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] 
public Transaction UpdateTransaction(Transaction transaction)
{
    return UpdateTransactionInRepository(transaction);
}
Run Code Online (Sandbox Code Playgroud)

请考虑我想为uri映射应用最佳实践,并且不要在其中使用"动词",只需要"名词".还告诉我客户端如何使用唯一URI访问Post和Put的这些方法.谢谢

api rest wcf c#-4.0

10
推荐指数
1
解决办法
3万
查看次数

标签 统计

wcf ×2

.net ×1

api ×1

c# ×1

c#-4.0 ×1

java ×1

php ×1

rest ×1