views:

424

answers:

3

How can I add a reference to the REST web service to an ASP.NET application? The REST is generating the WADL file. How can I add a reference to my application . I tried the regular way, using Add Web Reference option, but that gives me an error.

+1  A: 

You already asked this question a few days ago. You cannot do it, nor should you try to do it. One of the major objectives of REST is to decouple the client from the server, if you start generating proxy code on the client based on WADL you are likely to embed information into the client that with create coupling.

A REST message is supposed to be self descriptive therefore WADL should be completely unnecessary for a correctly built REST service.

Darrel Miller
So how i can use REST web service developed in Java, in my web application ? please guide me....
Lalit
Usually REST services are done with HTTP. Therefore, use a Http Client library to access the representation at the root url of the site and that should lead you to everything you need. Kind of like going to a web site with a web browser!
Darrel Miller
Lalit
Either HTTPWebRequest/HttpWebResponse, or take a look at the new Microsoft.Http.HttpClient class that is in the WCF REST Starter Kit Preview 2, it is a really nice client library.
Darrel Miller
By this Microsoft.Http.HttpClient , sury i can access REST wadl file ?...please guide me.....how can i code...
Lalit
No! REST clients should not use a WADL. At best, WADL is a way of doing some automatic documentation for a RESTful interface.
Darrel Miller
Thnaks Darrel,Yet problem as it is... see I generated the REST webservice from Java netbean. when i accessing its URL it showing me WADL file. ok ? now i want to use this REST webservice in my asp.net + c# web application. What steps i have to follow to do same....?
Lalit
A: 

So how i can use REST web service developed in Java, in my web application ? please guide me....

Lalit
wow, you answered your own question with a different question.
Jason Rowe
A: 

Sounds encouraging as I am having the same issue while retrieving my Amazon S3 contents. Hope WCF REST Starter Kit will help to refer the REST api.

Jeson Vary