views:

45

answers:

2

Is it possible implement an Android application as a web service?

On the official site I've read:

Note: If you want to develop a server-side application, we recommend that you implement your application as a servlet running in a servlet engine like Tomcat or full-blown JSEE container like Geronimo. If you prefer to implement a server-side application based on our HttpService, we'll assume that you know what you're doing and that you don't need help in figuring out which interceptors need to be configured.

How can I implement this? Apache TOMCAT can run on Android?

A: 

I think they're saying that you can write a server-side application for an Android user to access, not that you'd run Tomcat on the Android device itself.

Curtis
Thanks for your reply! I think this too...but have you an idea to implement a web-service?
Deborah
You might try something like this: http://code.google.com/p/i-jetty/I haven't used this particular project, so I can't vouch for anything about it. But I HAVE used Jetty before on the desktop. Jetty can act as your Servlet container, and you just create your web service from there.
Curtis
+2  A: 

Is it possible implement an Android application as a web service?

You can create an Android service that will open up some server socket and will listen for HTTP requests. However, Android will eventually kill off that service, either automatically after it is unused or at user request. And, nobody will be able to access the service except on the same WiFi LAN.

IMHO, truly implementing a Web service on Android is pointless.

CommonsWare
Hi! Thanks for your reply! I don't Know if this application is useful or not, probabily is pointless. But I want to test this question!
Deborah