What is the difference of web service

P

pleasenta

Hi there,
I am wondering about lots of things about web services. But firstly I
want to learn how the web service is useful to us.
Here is the thing: A user can use a web service via internet and can
get the results via xml.
So what is the difference between a web service and JSP or Servlet. I
can write a jsp that takes parameters and send them in an xml format.
The client can parse that xml and take the result. What is the
difference of web service from this. Can someone tell me?
 
S

Scott M.

A WebService is not just a request that returns XML. It is a remote
procedure call that happens over HTTP (via SOAP) in XML and the response
from the remote procedure is in XML format.

The point of a WebService is to remotely (over HTTP) invoke some class's
methods. The request and the responses are made in standardized XML and
SOAP calls.
 
P

pleasenta

Scott M. yazdi:
A WebService is not just a request that returns XML. It is a remote
procedure call that happens over HTTP (via SOAP) in XML and the response
from the remote procedure is in XML format.

The point of a WebService is to remotely (over HTTP) invoke some class's
methods. The request and the responses are made in standardized XML and
SOAP calls.

Does "to remotely invoke some class's methods" means that I create an
object and call its method in the server side instead of my computer?
If it is so, does the object is destroyed after sending the xml.
 
S

Scott M.

Does "to remotely invoke some class's methods" means that I create an
object and call its method in the server side instead of my computer?

Usually, a web server would be the client (consumer) of a web service. It
calls the web service (which runs on a different server). The web server
hosting the service returns the result back to the first web server and that
web server can use the results in a response that it would send to a client
(a person sitting at their pc looking at a web page or, yet another server
that contacted the first server).
If it is so, does the object is destroyed after sending the xml.

In the .NET platform, the object will be destroyed when the .NET Garbage
Collector deems it necessary. .NET Web Services can also be cached if their
results don't change often, reducing the amount of load on the web service
server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top