开发者

Consuming OpenRasta services

Following advice on here, I am looking at whether to replace WCF with OpenRasta.

In Visual Studio, how do I consume an OpenRasta in the same way as I would a WCF/ASMX service e.g. Add a service reference, this handles the types using WSDL开发者_开发知识库.

I can't find any examples which don't require a custom WebRequest and parse the xml, which for us is a significant step backwards for utilising a service in code.


OpenRasta is designed to give you RESTful services. To consume that, you might want to look at something like RestSharp which is designed to act as a client/consumer for RESTful services.


As Colin says, ReSTful services are by definition hypermedia oriented, so generating lots and lots of RPC style code a la WSDL is not doable, it would break hypermedia.

You can still happily generate datacontract-style classes from an xsd and read those from the xml, it's at most 4 lines of code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜