Android programming: Authentication and data exchange with Java EE -
i having java application running in tomcat server using spring, hibernate, etc. , 2 web interfaces, 1 implemented in tapestry 5 , other 1 using flex blazeds , spring-blazeds.
in first android application log in server , retrieve data.
i´m wondering how achieve in secure way. first of need know technology best retrieve data server , how can restrict access users have been authenticated.
with read until try implement httpservlet on server , make server calls via http client. in servlet use httpsession check if request comes authenticated user. , data try send serialized (json). unfortunately, i´ve never done things , maybe i´m on wrong way , there more comfortable solutions.
oh yes there many ways communicate server android. method 1 mentioning, every request have servlet or controller intercept request , send appropriate response. every time have add new requirement make controller or servlet , add entry in mapping file etc.
second method use service oriented architecture expose services , android consume services method easy , takes less time implement things.
another way can use sockets. udp or that.
Comments
Post a Comment