Google Maps Compoenent is ready to use. I tried to integrate Google Web Toolkit into our project. The method I worked on was to use GWT’s rpc support and then to use the generated stub of it inside jsp. Since it is a very good practice to write platform independent AJAX code in totally JAVA I chose this method by I concluded that it is actually not a good idea.
This week, I tried to build a simple system where I combine EJB and Android technologies. The idea was simple, I would have an EJB application at server-side which has an Entity Bean to fetch some data and using a Session Bean I would forward this data to a Dynamic Web Application (a Local JSP Client). And another Remote Android Client would show this data too.
To begin my experiment, I first installed JBoss5 Application Server, XDoclet, Eclipse Java EE and its related plugins.
After lots of experiments and trying to follow this tutorial, I was able to create an Dynamic Web Project having a JSP which gets it data from an EJB Project’s Session Bean. Before I began to connect a database to this EJB Project using an Entity Bean, I tried to bind a Remote Android Client to this EJB. But, unfortunately there was no sources for this at web and I couldn’t get it done myself. Also from what I read at blogs, It seems that it’ll be wise to use Web Service approach instead of EJB.
So, I tried to implement a Web Service using my EJB Project. But, it was also another mystery for me. There is no good documentation/tutorial about how to create anything using Eclipse. Using Murat’s previous notes, I tried to generate my EJB based Web Service but, It was also another failure. So I simply create a regular Web Service using regular Java Classes.
But there is also a problem about Web Service approach. Android SDK doesn’t support a high level remote protocol like SOAP. To have SOAP support, we must use kSoap2 engine, which I had no time to look up.
This week was most of a failure for me, next week I’m planning to reach my regular Web services using Android with kSoap2.
In this short how-to, I’ll explain how to basically develop and deploy a web service using Eclipse IDE. In this tutorial, these technologies are used:
- Programming Language: Java
- IDE: Eclipse
- Web Service Protocol: SOAP
- SOAP Implementation: Axis
- Client Application Type: Java Servlet
- Servlet Container: Apache Tomcat