Sunday, October 15, 2006

SWSDL - Simple WSDL format, and my swsdl2wsdl

Hand writing WSDL (Web Service Description Language, stop reading here if that doesn't mean much to you?) is a pain. The GUIs I have seen (whether XML Spy or Eclipse WTP or...) don't really change the fact that typing (or clicking, same thing) type and message and then a portType and then binding again and then finally a service... jeez!

Let's not go into the Contract First (writing WSDL and XSD) versus Code First (e.g. Java first and then generating WSDL and XSD from it) debate here. Let's assume you think doing SOA with Contract First makes sense, describing a service interface in XML Schema is sensible, but what bothers you too is having to write that WSDL, because you are lazy, and like me you think that might be a Good Thing.

Now, of course, there is WSDL 2.0 which promises some (!) simplification on the horizon, or maybe not (on the horizon even, or simplification)... whatever, it's not here today. Other ideas and tools which float around include e.g. WSCF (and jWSCF), but all I really wanted is a simple, platform/language-neutral form to describe a "service", referencing an XSD file for the Schema -like how hard is that? If "extensibility" is really needed, that "form" could allow extensions, but the normal most common use case should be simple.

So I designed SWSDL - Simple WSDL, a swsdl.xsd and a little converter (swsdl2wsdl) that generates WSDL 1.1 from my SWSDL. Here is a page where I compare hand-written SWSDL (Simple-WSDL) and the auto-generated standard WSDL by wsdl2swdl. Interested? Download swsdl-distribution-0.5.zip and give it a shot!

If you find this useful, let me know (post a comment on the blog) what you think. I might put this thingie on Sourceforge or Java.net or somewhere. For now, the src is in the swsdl-project-0.5.zip, but do try the swsdl-distribution-0.5.zip first as it has an example and launch script.