File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Web services and Components? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Web services and Components?" Watch "Web services and Components?" New topic
Author

Web services and Components?

Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Hi,
Anyone can tell me the difference between Web Services and Components?
Regards,
Guru
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Can you please first explain what you think they do have in common?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Zubair Mushtaq
Greenhorn

Joined: Sep 06, 2003
Posts: 10
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

Joined: May 15, 2002
Posts: 3404
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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.


Groovy
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Sure.
David Attard
Greenhorn

Joined: May 13, 2003
Posts: 26
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.


There's no place like 127.0.0.1
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Feb 27, 2002
Posts: 8919

So, webservice IS-A component. Webservice/ component represents generalization/specialization relationship.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Jul 11, 2001
Posts: 14112
A webservice certainly can be a component. But is *every* webservice a component? What is a component?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web services and Components?