File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes How to create a webservice for existing JSP application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to create a webservice for existing JSP application" Watch "How to create a webservice for existing JSP application" New topic

How to create a webservice for existing JSP application

Tejas Nitya

Joined: Jan 16, 2011
Posts: 4
I have an existing EJB3/Hibernate (backend) and JSP (frontend) website. I want to build an api for the business logic so that it can be accessed through an iPhone app or Android app or even a mobile site. So basically I want to create this smartphone applications for my existing web application.
I am reading about two such technologies in java i.e. RESTful webservices and JAX-WS (XML basedd webservice). Which one will be more feasible or are there any other technologies to use.

Please help me out as I am new to the webservices.

Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3887

You might want to look at how to expose EJB 3 beans as a web service like this.

[How to ask questions] [Twitter]
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The first step in creating a web service to connect two applications is to clearly identify data that will be sent back and forth. By stating that you want to create an API for the application's business logic, does this mean that this does not currently exist? Is all of business logic coded in JSP files?

If you have business logic properly coded in plain objects and accessed via Session EJB, then your work is ready to be exposed as a web service. In other words, forget about the existing HTML-based front-end.

There are two main web service technologies, SOAP-based services and RESTful services. Either one will be feasible. Once you get your business logic positioned correctly, it should be relatively easy to switch from one to the other. Keep in mind that Web services is an integration technology, it is not an implementation technology.
I agree. Here's the link:
subject: How to create a webservice for existing JSP application
It's not a secret anymore!