File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Webservice vs JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice vs JMS" Watch "Webservice vs JMS" New topic

Webservice vs JMS

raj joe
Ranch Hand

Joined: Mar 17, 2005
Posts: 99
When do i go for an webservice or JMS.
What are the guiding paramaters to choose b/w these technologies
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Web services and JMS are not competing technologies. JMS is like a transport layer, while web services provide capabilities above and beyond that. While web services almost always use HTTP as the transport layer, they can use JMS (or email) instead.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

WebServices is based on open standards like SOAP,WSDL,XML. JMS provides loose coupling like Web Services but it does provide a service interface where one could define a set of operations to be invoked.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Note that while JMS messages can be bridged to non-Java clients, you will get the best results if all parties involved are Java. JMS also provides for several different content types - Java object, text, byte[] etc. where a web service basically moves text. As Ulf said, JMS can move SOAP messages for a web service application.

Manhar Puri
Ranch Hand

Joined: Aug 23, 2005
Posts: 41
I was just wondering, when creating a webservice as a wrapper to a legacy app. running on the mainframe, one side of my webservice will be handling SOAP messages from its clients and the other side needs to interact with the mainframe.

How could this be done? Do we need to put a JMS provider that interacts with the mainframe and then a JMS client interacts with my webservice or is there another solution?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
@Manhar: That depends on how you can access your legacy app. JMS would be a possibility, but if the web service is used in a synchronous fashion (i.e., a response is expected right away), an asynchronous communications medium like messaging seems the wrong approach. If the web service runs on the same machine as the legacy app, a more direct method is probably possible.

If you have further questions, it is better to start a new thread, than hijacking this one.
[ October 23, 2005: Message edited by: Ulf Dittmer ]
I agree. Here's the link:
subject: Webservice vs JMS
It's not a secret anymore!