I'm looking for sample code (a complete, working system, even) that
exemplifies how to support SOAP, REST and JSON inputs and outputs with
the same underlying business logic... And at that, I'm looking for
"real" REST, like the kind described here:
http://wso2.org/library/3726
Seems like Axis2 is set up to do SOAP out of the box, and then also do
something REST-like without too much trouble. "Real" REST requires
WSDL-tweaking that seems unnatural (to me)... And, JSON seems to
require even more effort.
(I base all of this on a couple day's worth of reading everything I
can find on the subject. Apologies if this characterization is
woefully inaccurate.)
What I'm trying to get a handle on is how realistic it is to attempt
to write the core logic just once (the part that reads data from a
database, and writes it back out, for example), and then leverage it
to provide SOAP, REST and JSON interfaces simultaneously. And if it's
realistic, how hard is it -- and how hard is it to maintain, as
features/services are added?
The key, for me, is interoperability -- most of my clients won't be
using Axis2 on the client side, nor even Java (most likely). A great
many will use Javascript (ala AJAX), or perl, or other technologies.
I want to make the resulting service offerings as useful and flexible
as possible, to accommodate as many of my users as possible. I'm
hopeful that Axis2 can help.
Pointers appreciated.
Thanks!