views:

901

answers:

4

I am looking for a code generator than can generate C# code to access RESTful web services described by WADL files in a way similar to how wadl2java works.

Doing som searching I came across the rest-api-code-gen project on Google Code, but although the latest source does in fact support C#, the REST Describe & Compile demo site does not. (The C# button is there, but it's disabled.)

I realize I could download the source and set up my own server with the latest version, but I would prefer not to, as what I need is a command line tool and not a web application with dependencies to Google Web Toolkit. I guess I could write my own a command line tool based on the same source code, but if it has already been done, or other tools can do the job, I'd rather avoid it.

So, I'm wondering, are there any tools like that out there?

A: 

You could try WADL for WCF

Randolpho
The only feature supported by this tool seems to be the printing of a usage string. None of the parameters work and it doesn't produce any output, which seems to make sense if you look at the provided source code, it's just an empty shell with no implemented functionality.
Anders Sandvig
I honestly just did a google search. I don't bother with REST for web services, I think SOAP is more appropriate.
Randolpho
A: 

I personally wouldn't bother with non-standard formats like WADL. There's too much chance of a change when they are standardized (I'm doing Sun the courtesy of assuming WADL will be standardized more than Java is).

John Saunders
Interesting opinion. Do you have other suggestions for generating code to use web services, preferably in multiple languages (Java, Python and C# would be a good start)?
Anders Sandvig
No, I don't. I hope WADL or something like it becomes a standard. I've just seen a lot of change in the past between the proprietary version of a protocol and the standardized one.
John Saunders
I see. I don't think this is much of an issue as long as I have control over both the generation and the processing of the WADL, which I do in my case. If we run into any compatibility issues, I hope I can resolve them by manually editing the WADL file.
Anders Sandvig
A: 

Keep an eye on ABSE (http://www.abse.info) and AtomWeaver (http://www.atomweaver.com) to be released this winter. It will do what you need.

Rui Curado
can you provide a more specific link? It says q1 of 2010, something will be coming....
Nathan Feger
AtomWeaver is currently available in Alpha to Early Access participants, nearing public Beta. First release scheduled to go out in June.
Rui Curado
A: 

Another possible answer: http://code.google.com/p/rest-api-code-gen/

Nathan Feger