Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retreive Data from DB thru Web Services  RSS feed

 
Rick Bose
Greenhorn
Posts: 3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL,

I am a new member in this forum and very excited to have registered to one the biggest Java Forums.

I am very new to Web Services.
Suppose,I am querying a web service by a method() say getPersonDetails() sending a request and getting the desired data as response and extract it using response.getPersonName() say.
How the web service in the background works to get the data from the DB? Does it query the DB or how the data is put to the web service?

Please Reply.
Or, if it's an already existing thread,Please let me know.

Thanks in advance.

Regards,
Rick.
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a specific web service in mind? If so then to find out the details of its implementation, ask its owner.

Or are you asking a general question? The general answer is that when you want information from a database, you have to query the database. Don't imagine that a web service is some kind of magic super-powered thing, it's just programming like any other programming.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application X12 --------------> Web Service A ---------------> Application 475 ---------> Database 3

Application ABC --------------> Web Service A ---------------> Application 475 ---------> Database 3

Application J ------------------> Web Service A ---------------> Application 475 ---------> Database 3

Web services enable two or more applications to communicate. In is an integration technology, not an implementation technology.

In regards to data-oriented web services, there still is an application that connects and retrieves data from a database. In the example above, Application 475 is this application. Applications X12, ABC and J all use the same web service to access Database 3.

It is important to not confuse the web service with the application that it exposes, i.e. provides access to. These are not the same thing.
 
Rick Bose
Greenhorn
Posts: 3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Thanks for the clarifications and replies.They were really helpful.
Actually, being new to web services, I got confused.

In connection to the above,
Application X12 --------------> Web Service A ---------------> Application 475
Here, Application X12 sends some request to the Web Service A to get data from Application 475.How does the communication between Web Service A ---------------> Application 475 takes place?
Does the Web Service A query the Application 475? If yes, then, How?

Please Help.

Regards,
Rick.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application X12 --------------> Web Service A ---------------> Application 475 ---------> Database 3

Application X12 is a web service client. Conceptually, it makes request for data from
Database 3 using Web Service A. It does not know anything about Application 475 and does not care.
It also does not know where the Database 3 is located or how the data is stored in the DB, and does not care.

In regards to the communication between Web Service A and Application 475, the design of this depends highly upon
the API of Application 475. For example, code in the server-side of the web service can send a message or it can have a direct
reference to an object in Application 475. There are many ways in which the web service code can connect.

Good luck!
 
Rick Bose
Greenhorn
Posts: 3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jimmy,

Thank You very much again.

Seems like I have started understanding.....................

For example, code in the server-side of the web service can send a message or it can have a direct
reference to an object in Application 475. There are many ways in which the web service code can connect



Can you provide me some info/link regarding the above? Howe these actually happen in the background?


Thanks in advance.

Regards,
Rick.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds good. It is best to learn from many sources, so I suggest that you plan as such. A random and good starting point would be the Apache Axis framework. Vist their web page and start to get a feel for how it works and make sure to purchase a few "printed books."

To learn how to write code that connects to a relational database, you should study the Java Database Connectivity API.

And welcome to the JavaRanch - A friendly place for Java Greenhorns!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!