Search code examples
androidrestmobileejbjax-ws

Creating a customized API for a mobile app to access your web app (Java EE 6)


Here is my dilemma.

  1. We have an existing web application. Created in Java 1.4 and had been running is Websphere Application Server 6.1 (J2EE 1.4) for the past x years. Just late last year it was migrated to Webshere 8 (Java EE 6).

  2. There is a plan to create a downloadable mobile app version of our web application. A different vendor is to create this for our client, not us. Plan is to give them our own API (jar file) so the mobile app can access the current web app to be able to do some of its functions. Note: it will not have all of its functions, only selected.

  3. Problem is how should we do this API in the back end? what would be best? RMI-IIOP (EJB) ? Web Services? others? in the top of my mind is JAX-WS since the mobile app would be using secure functions of the web app. Are there better alternatives?

  4. Assumptions:

a. Mobile App is created in JAVA (e.g. Android) b. There may be a plan to do this for IOS but that is a later priority.


Solution

  • I wouldn't bother handing them a jar file. I highly suggest that you use RESTful web services (i.e. - the JAX-RS implementation Apache Wink provided by WAS 8.x).

    If you really must hand them a jar, then go with JAX-WS.

    And yes, you can secure JAX-RS resources. I would suggest not using OAuth 2.0 and implementing a solution using API Keys.