Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a webservice for existing JSP application

 
Tejas Nitya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks,
Tejas
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to look at how to expose EJB 3 beans as a web service like this.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic