views:

76

answers:

1

What is the best way to access a Rails 3 REST-ful web service, developed using standard Active Resource techniques including HTTP authentication over SSL, from a VB.NET consumer?

Consumer can be .NET 4.0 if that is necessary.

Are there any .NET libraries yet that can bridge the gap?

I have already come across links like this (http://aspguy.wordpress.com/2008/10/10/dealing-with-rest-web-services/), which use Linq.XML or XML.XPath to parse responses and generate post data for REST-ful web services. I have in fact coded a system similar to the one at that link, except for a different geo-coding provider and using XPath instead of Linq.

I'm looking for something more like Rails Active Resource, rather than hand-coding the XML or JSON encoding/decoding of every single data model?

A: 

Have you tried using RestSharp to consume the service from the .NET application? (Coincidentally enough, the ad for it is just to the right of this box while I'm typing.)

David
@David, thank you for that link, I had not seen it yet. I will check that out. Are there any other libraries of this sort you are aware of, or any that are specifically favored by the Rails3 community for easing interactions?
Shmidentity
@Shmidentity: Not that I know of. I haven't done anything with REST services yet (for some reason I don't like them... I think I had a bad experience with one poorly implemented vendor service that's left a sour taste in my mouth), and my Rails experience has been minimal. Ideally, however, the fact that the service is in Rails or any other non-.NET environment shouldn't matter to the consuming client. If it does matter, I'd consider that a fail of the service boundary.
David
@David: Ok, I looked at the source code of <a href="http://github.com/johnsheehan/FoSharp">FoSharp</a>, which uses RestSharp to access the Notifo web service, and this appears to be exactly the layer I was looking for. Thanks so much.
Shmidentity