Rest – Tool to generate WSDL 2.0 for RESTful URLs and document schemas

code-generationrestweb-serviceswsdl

I need to make a web "service". Since the primary use of this service is going to be to read and write some data that can be encoded as XML documents (the same data both ways), I want to do this as REST interface.

Since I will be asked to provide WSDL, is there a tool to ease the pain of this? Is there something that will let me provide a base URL, suffixes and XML document schemas (or better yet, samples from which cardinality and such can be inferred), and out pops the WSDL 2.0 that you aren't gonna need, but that The Management will require so that Marketing Boxes can be checked off? I don't think I will be asked for WADL, because no VIPs around here know what it is, but WSDL = SOA, so I must comply.

Ideally, this tool should be implementation neutral (read a simple, concise file or file set), rather than relying on scanning the source code for a particular language. It should run on *nix, or at least be a java binary. If I were doing .NET, I guess this would be built in, at least in some form. (Unix, Java, maybe other platforms in the future)

Yes, I'm really lazy, and I'd like to stay that way 🙂


Is there something in Axis2 (java2wsdl?) to make help do this without a lot of make-work code?


Here's a link on why what I am trying to do is "bad" (what part of "The Management" don't you understand?):

http://bitworking.org/news/193/Do-we-need-WADL

but I hope to do it anyway.

Some background on WADL:

http://weblogs.java.net/blog/mhadley/archive/2005/05/introducing_wad.html

http://www.sunlabs.com/techrep/2006/abstract-153.html

Some background on WSDL 2.0

http://en.wikipedia.org/wiki/Web_Services_Description_Language

Best Solution

WSDL 2 does support RESTful services by means of the queryParameterSeparator attribute. I haven't untangled it yet, but I think that if you set it to '/', then you get RESTful urls.

I haven't yet found a (free!) editor that does WSDL 2.

Still working on this myself.