This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web services and Components?

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Anyone can tell me the difference between Web Services and Components?
Regards,
Guru
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please first explain what you think they do have in common?
 
Zubair Mushtaq
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i think that web services are basically used for online and they use SOAP(protocol) while components donot use any protocol
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while components donot use any protocol

EJB Containers of EJB components are distributed using the RMI/IIOP protocol.You can also use Secure Sockets Layer (SSL) protocol to protect IIOP connections to RMI or EJB remote objects.
So I am not sure why you'd think components do not use any protocol.
regards
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Components provide interfaces. These interfaces may be accessible using a network protocol such as JRMP, CORBA, or only using an in-process protocol such as method calls within a JVM. Or both. For what it's worth, a component might expect the client to use a well-known protocol called "write a file into my directory and I'll tweak it for you." What I'm trying to say is that every component must use a protocol but the nature of that protocol can be almost anything.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Components provide interfaces. These interfaces may be accessible using a network protocol such as JRMP, CORBA, or only using an in-process protocol such as method calls within a JVM.

Webservices also provide a set of well defined interfaces that client application can invoke over the internet. So can't websevice also be called as a component.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure.
 
David Attard
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please remember that although SOAP is the most common used protocol that web services use, they can sue other protocols, and are not tied down to SOAP.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please remember that although SOAP is the most common used protocol that web services use, they can sue other protocols, and are not tied down to SOAP.
Depends on what do you mean by "web service". To me, a web service is only a web service if it uses SOAP bindings (SOAP over HTTP, SOAP over SMTP, SOAP over TCP, SOAP over Flying Doves, etc). In other words, I wouldn't call custom XML over HTTP a web service.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, webservice IS-A component. Webservice/ component represents generalization/specialization relationship.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Webservice/ component represents generalization/specialization relationship.

*Glonk* ... That was the sound of me getting dropped from the wagon...
I can't see what you're referring to with generalization/specialization when talking about web services as components. Could you elaborate a bit?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean since webservice "IS-A" component. Cant I say that Webservice is a specialization of Component?
Let me know if I am wrong?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A webservice certainly can be a component. But is *every* webservice a component? What is a component?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But is *every* webservice a component?

I am still a novice to web services but from the definition is a component to me. Lasse agrees as well.

[ September 09, 2003: Message edited by: Pradeep Bhat ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic