iTunes upgrades and the WSO2 Mashup Server

Maybe it’s just me and my Vista, or my version of the Java Runtime (1.5.0_10) but anytime I get an iTunes upgrade (such as the recent version 8 which I just installed), the WSO2 Mashup Server fails to launch.  Hate that!  Now I don’t know much about Java and environment variables, but here’s what I do to solve this problem:

  1. Right click on "Computer" and get properties, then select "Advanced System Settings…".  Or, open up the Control Panel and search for "environment variables" and select the "Edit the system environment variables" task.
  2. Click on "Environment Variables."
  3. Double click on the "CLASSPATH" variable and find the segment (separated by ‘:’) that contains QTJava.  Delete this path segment and close all the windows.

The Mashup Server should now launch fine.  Now back to work…

Mapping REST services to operations

Keith has created a nice REST demo to show how WSDL 2.0 can be used to describe a RESTful interaction, and posted the resulting mashup here.  This is in response to an old post he found from Stefan Tilkov.

One of the area Stefan explores is the difference between the conceptual models of "operations" versus "resources":

It seems to me that the right thing would be to get rid of the operations (or map them to the HTTP verbs, which is essentially the same thing as getting rid of them).

Keith indeed mapped each combination of "verb", "uri template" into a WSDL operation.  So what Stefan describes as "GET on /customer/{id} - get customer details" Keith maps to a "getCustomerDetails" operation which takes an "id" parameter.  I think this is a very reasonable mapping, and one that looks a lot like the "getCustomerDetails(id)" construct which is present in some form in every programming language.

I don’t call this "getting rid of the operations" either, if by that is meant writing a WSDL that has only four operations (GET, PUT, POST, DELETE). I would instead say that an operation encapsulates the combination of the http method, the http location uri pattern or template, and the input and output types into a construct that maps well to familiar programming constructs and provides a level of abstraction that can prove valuable (e.g. the uri location can change, security can be applied, even the transport protocols can change without perturbing the development experience).

Having a WSDL 2.0 description of the service in terms of operations also had the beneficial effect of documenting which combinations of verb/uri template are supported, with the effect of also documenting which combinations aren’t supported.  Stefan had to notate these as "unused" in his diagram, important because some of the combinations aren’t obvious (why can’t a customer be deleted?)

It still baffles me why there isn’t more demand for WSDL 2.0 and its REST description features.  Hopefully Keith’s post helps demonstrate the value of this technology.