How to read this blog
Do the Axis lot really get REST?
So there are a number of SOAP engines out there and they support lots of neat WS-* stuff. A recent development with Axis 2 is the purported support of REST natively within the implementation, indeed here is an article with a REST and Axis 2 living happily together.
I thought, oo, cool – best of both worlds. I did however approach with caution as I’d heard from one of my colleagues that there had been some dispute about the RESTiness of the implementation. So I read the article and go through the example and laugh heartily and the fundamental lack of understanding of the principles of REST. Indeed even in the wikipedia article, the section on resources in REST clearly describes a key principle and what is very very wrong with the example in the Axis article.
Whats wrong with it? Well, REST would say if you want to get the version from something you’d call http://somedomain/version with a GET. Simple. It need only have one node in the XML, perhaps version?<version>1.0</versionPerhaps this would be sufficient?
Now look at the Axis example… The URL is:
http://127.0.0.1:8080/axis2/services/version/getVersionSpectacular – the URL already tells you you’re dealing with version but to make doubly sure – getVersion on the end. (long live RPC) and the response?
<ns:getVersionResponse> <return> 1.0 </return> </ns:getVersionResponse>
hmm… the S in SOAP was supposed to stand for Simple. I would argue then that the Axis folks don’t really understand REST, and indeed this demonstrates to me some of the key failings of the WS-* movement. Still, I’ll admit the implementation was better than I was expecting.