What is the standard way of accessing a restful service from silver开发者_C百科light (I am targetting v3 of silverlight)?
In .net i use REST Starter KIT but its not compatible with Silverlight - although i did find a port but unsure weather to try it.
Is there a standard way to access rest from silverlight?
Any good examples or tutorials?
Also is there an equivelant of ReadAsDataContract for populating a .net class from the restful service?
Any help really appreciated
Thanks
here is a pretty basic tutorial on that: http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-3-using-networking-to-retrieve-data-and-populate-a-datagrid.aspx
Use ClientHttpStack and System.Runtime.Serialization
Take a look at the Client HTTP Stack for Silverlight, you'll need this to implement REST properly.
You can turn your ResponseStream into an object using System.Runtime.Serialization's DataContractSerializer.
精彩评论