开发者

WebHttpBinding in Silverlight 4

I know SL 3 didn't have this but from reading about SL 4, it sounds like it supports WebHtt开发者_运维知识库pBinding for REST...

But how do I create one in code? I can't find WebHttpBinding anywhere in the ServiceModel.* assemblies for Silverlight?


You don't get the webHttpBinding per se in SL4:

No analog to the WebHttpBinding provided in WCF is provided. To access pure HTTP, REST, RSS/Atom, or AJAX services from Silverlight 3, use the techniques described in Accessing HTTP and REST-Based Services Directly, such as the WebClient class. To access ASP.NET AJAX services, see Accessing ASP.NET AJAX Services.

(source: Silverlight and WCF Feature Comparison)

but you can access a WCF REST service since it's really "just" XML over HTTP.

Check out this MSDN library article here:

Accessing HTTP and REST-Based Services Directly

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜