• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Calling database using web Service

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please point me to a good example where you can create a web service and get data by connecting to the backend database.
Any good example with eclipse will be great.

Help...
Thank You

 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A web service is for two applications to communicate with each other. So, what you are looking for is a bit confusing.

You can simply create a Java application that connects to a database and retrieves data.

Then, you can create a web service that communicates with the application above.

Then the client applications that need data from the database use the web service to connect to the other application that retrieves the data.


client application ----> web service ----> Java application that gets data



The most important thing here is to recognize that the code of the web service does not contain the database access and data retrieval code. The code of the web service only serves to allow the two applications to communicate with each other using SOAP over HTTP. That is all.

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great Explanation James . AS I was looking for the purpose of using webservice in aProject
 
Good night. Drive safely. Here's a tiny ad for the road:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!