views:

19

answers:

1

I know SL 3 didn't have this but from reading about SL 4, it sounds like it supports WebHttpBinding for REST...

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

+1  A: 

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

marc_s