Web Service

J

javajedi

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?
 
T

Tomek

javajedi napisal(a):
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?

ok, try to list some things :)
- Webserwises can work on many transports , not only over HTTP as
servlets do , so you can JMS, SMTP or whatever you want.
 
H

Howard Brazee

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?

I can write CoBOL to do the same thing - in fact I have.

But a full XML environment seems easier with Java web servers than
with our old hodge-podge JSP design, so that's the way we're moving.
 
J

javajedi

So you say:
Web Service can be accessed with many application protocols
and Web Service is easier to use.

I have another question:
Does web service only takes commands from client, and then returns
result them?
I want to mean is there any relation between my first and second call
to web service? Does web service know who I am when I connect it second
time?
For example when I call a web method account.isUser("aaa","aaa");
and then call a method getList() which cannot be called if the boolean
variable isAccess != true, will the web service permit me to get the
result of the second function after I called the first function?

Client:
isUser("aa","aa");
getList();

Server:
public boolean isUser(){
//if user return true
}

public List getList(){
if(isAccess = = true)
return true;
}

Or DO I NEED SESSIONS like in web pages
 
T

Tkachenko Vira

Çäðàâñòâóéòå, javajedi.

Âû ïèñàëè 17 ëèñòîïàäà 2006 ð., 21:54:14:
So you say:
Web Service can be accessed with many application protocols
and Web Service is easier to use.
I have another question:
Does web service only takes commands from client, and then returns
result them?
I want to mean is there any relation between my first and second call
to web service? Does web service know who I am when I connect it second
time?

Yes, they can be either stateless or stateful. You can read about this
here http://www.xml.com/pub/a/ws/2003/07/22/sessions.html

--
Ñ óâàæàíèåì, Òêà÷åíêî Âåðà
[ICQ#230923300] [web: http://www.vera.org.ua]
[mail: toVera(at)ukr.net.del.it] [location: The Earth-Ukraine-Kiev]
 
C

Chris Smith

javajedi said:
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?

There is actually a very fundamental difference that hasn't been
mentioned so far. Web services are intended for interaction between two
pieces of software, which may be domain specific. A regular application
of JSP is designed to communicate with an end-user via a web browser.
It's not generally the case that a "user" uses a web service, except
indirectly.

That being said, it is possible to implement a web service using JSP, of
course, but it is more difficult than it needs to be. By using
something like Axis, most of the time, you can simply write code without
worrying about the XML part at all, and the Axis framework will worry
about making your code into a web service via SOAP or other protocols.
JSP is an implementation technology while web services are a concept for
communication protocols; but JSP is designed for for end-user
interaction.
 
J

javajedi

Chris Smith yazdi:
There is actually a very fundamental difference that hasn't been
mentioned so far. Web services are intended for interaction between two
pieces of software, which may be domain specific. A regular application
of JSP is designed to communicate with an end-user via a web browser.
It's not generally the case that a "user" uses a web service, except
indirectly.

That being said, it is possible to implement a web service using JSP, of
course, but it is more difficult than it needs to be. By using
something like Axis, most of the time, you can simply write code without
worrying about the XML part at all, and the Axis framework will worry
about making your code into a web service via SOAP or other protocols.
JSP is an implementation technology while web services are a concept for
communication protocols; but JSP is designed for for end-user
interaction.

thanks Chris, you are the best.
 

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

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top