aspose file tools*
The moose likes Web Services and the fly likes Difference between Webservice and XML over HTTP?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Difference between Webservice and XML over HTTP??" Watch "Difference between Webservice and XML over HTTP??" New topic
Author

Difference between Webservice and XML over HTTP??

Saurabh Agrawal
Ranch Hand

Joined: Oct 07, 2003
Posts: 244
Hi All,

A very basic question but I am not clear that what is the difference between a Webservice and XML over HTTP?

Can someone elaborate this? i have checked the FAQ of webservices but could not find any answers there.

Many thanks in advance,

Saurabh


Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42929
    
  68
Web service is the more general term. While "web" always implies "HTTP", the payload need not be XML (although it often is). Plain text or JSON might also be sent.

A subdivision of "XML over HTTP" is SOAP vs. REST.
Saurabh Agrawal
Ranch Hand

Joined: Oct 07, 2003
Posts: 244
Originally posted by Ulf Dittmer:
Web service is the more general term. While "web" always implies "HTTP", the payload need not be XML (although it often is). Plain text or JSON might also be sent.

A subdivision of "XML over HTTP" is SOAP vs. REST.


Thanks. Does that mean it is safe to say that a webservice is XML over HTTP?
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Does that mean it is safe to say that a webservice is XML over HTTP?

No. As Ulf already pointed out a web service can deal with any content-type, not just XML. Right now, in the majority of cases "web service" actually means "SOAP Web Service" though strictly speaking that is incorrect.

"XML over HTTP" classifies as a web service. HTML sent by a web server is meant to be interpreted by a browser which performs the layout of the information for human consumption. Programs have always been used for screen scraping to obtain needed information. However it's easier to extract information from meta-data (XML) tags than from (HTML) layout tags (XHTML5 can serve both needs). So the idea that applications submit and retrieve data over the web in XML is captured in "XML over HTTP".

XML-RPC was an early and quick web service formalization of "XML over HTTP" for the purpose of making remote procedure calls.

SOAP is XML and SOAP web services receive and send SOAP messages over HTTP. However the SOAP protocol aims to be transport agnostic so that it can use transports other than HTTP (which would still be SOAP but no longer a web service). This means that it cannot use the HTTP protocol to its full potential - it basically "tunnels" though it. SOAP is a specialization of "XML over HTTP" as long no attachments are involved. Once a SOAP envelope is used in combination with attachments (which still classifies as SOAP in general) the HTTP payload is a MIME envelope rather than XML.

RESTful web services do not place any restrictions on the content-type of the HTTP request/response. The content-type could be XML but it doesn't have to be. However REST embraces the HTTP protocol and the original design principles of the web which is "resource" based. Sometimes it is assumed that "using HTTP" means being RESTful - it doesn't.

Then there are web services that don't meet any of the above criteria. For example some RIA support web services exchange JSON but don't follow REST design principles.
[ February 05, 2008: Message edited by: Peer Reynders ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Webservice and XML over HTTP??