rest - How to start with writing a RESTful service? -
rest - How to start with writing a RESTful service? -
i trying create restful web service accepts json arguments , gives out json response.
what want take http requests made url endpoint. like,
post /the/endpoint http/1.1 host: mywebsite.com
{"name":"yourname", "department":"your_department"}
do db read @ backend , give relevant parameters like, manager name, salary etc json object, response.
what's best way go it? thinking of using java servlets this? there improve way?
ps - getting started detailed answers or links tutorials how implement much appreciated.
thanks.
yes can servlets , json libs marshalling /unmarshalling json object java object.
you can create utilize of json libs jackson , gson etc
but must know rest application doesnt end handling request , response , needs take care of other non-functional requirements
authentication authorization security etcbuilding scratch servlet overkill , waste of time when there ready made frameworks these things favorite spring mvc 3.0
check project site more details
just show how easy set 1 in spring mvc , check below tutorial spring 3 rest tutorial
pls rate post if helps , cheers.
rest servlets
Comments
Post a Comment