How to read this blog

If you're looking for stuff about me and my journal click here. If it's techie stuff you're after click here or career stuff is here. Meanwhile, my world of warcraft news are here. Finally I have stories about my pets and my interest in T'ai chi. If you want to read the whole lot go here. The archives on the right will take you to my old stuff. Creative Commons Licensed

Do the Axis lot really get REST?

written by CraigBeattie on December 7th, 2006 @ 05:00 PM. edit (admin only)

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</version
Perhaps this would be sufficient?

Now look at the Axis example… The URL is:

http://127.0.0.1:8080/axis2/services/version/getVersion
Spectacular – 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.

Post a comment

Options:

Size

Colors