Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Types of webservices  RSS feed

 
Saxena Sajal
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

We classify webservices in Soap or Rest criterias. But i have been always hearing so many versions like..JAX RPC , JAX WS , SOAR over HTTP , SOAP over JMS, Apache AXIS , Amazon webservice, Rest Based .
It makes me confuse , Can anyone properly give a classification of those. It will really helpful. Thanks in advance.
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, check out http://www.coderanch.com/how-to/java/WebServicesFaq. It'll clear most of your confusion.

What it does not cover:
First thing to understand is, SOAP is simply a remote method call expressed in special XML. A remote server interprets that XML, executes the method requested in that XML along with
parameter values in that XML, and returns a return value or exception object, again expressed in that special XML. That XML can be included in absolutely any kind of network protocol.

SOAP over HTTP: A HTTP request or response packet contains a data payload. Normally, the packets that are sent between a browser and website contain HTML payloads.
But payload can be anything. If you take a SOAP XML payload and stick it in a HTTP request or response packet, it becomes SOAP over HTTP.

SOAP over JMS: JMS is a JavaEE standard for reliable asynchronous communication. Using JMS, a process can send a request to a server via a message broker and
forget about that request. At some future point of time, the broker will reliably forward that message to server for processing. SOAP over JMS is simply a way
of sending SOAP requests via JMS. It's useful if a sending process is not interested in waiting for a response or handling any failures/retries by itself.
Note that it is possible to implement reliable asynchronous communication even over other protocols including over HTTP, but using JMS and a readymade broker product
lessens the effort.

Amazon Web Services (AWS): This is a totally different beast and does not belong at all in this question!
All the others here are technologies, frameworks, or standards.
But AWS is none of these; it's simply a brand name for a commercial *product*.
It provides infrastructure services in the cloud, so that companies don't have to manage and scale their own server/storage/networking hardware.
A name like "Amazon Cloud Infrastructure" or "Amazon Software based Datacentre" describes its true nature much better than "Amazon Web Services".
That said, every software product has to be built using technologies/frameworks/standards, and it just so happens that AWS, the product, is exposed to its customers through web services
technologies (mostly RESTful services; they deprecated SOAP based services a while ago).
 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karthik
just a general question, why did Amazon replace SOAP based web services in favour of Restful services. I thought SOAP web services were more secure or was is it down
to performance (i.e. overhead) and the type of service that they are providing (i.e. security not required).

Mat
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mat Anthony wrote:just a general question, why did Amazon replace SOAP based web services in favour of Restful services. I thought SOAP web services were more secure or was is it down
to performance (i.e. overhead) and the type of service that they are providing (i.e. security not required).

As a developer, my opinion of SOAP based web services is that they impose too much effort on developers. Development cost and time when using SOAP are much higher than when not. Everything seems more hard, more complex and ultimately less fun with SOAP for both, the providers and the consumers.
The AWS development team too seems to have observed the same as far back as 2006. Refer blog 1, blog 2 and blog 3.

Regarding security, I don't consider SOAP inherently any better. All it offers are some standards for authentication, authorization, federated identity, etc promoted by a few a 3-lettered multibillion dollar company. But offering a standard does not mean providers have to implement it all, and it sure doesn't make life easier for developers.
AWS REST services mandate authentication, offer authorization and don't really need federated identity for their use cases; so I don't think they suffer in any way for not using SOAP WS.
 
Afzal Rehman
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read really good article about Java Web Services that might help.
http://www.javaworld.com/javaworld/jw-09-2003/jw-0912-fop.html
 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hI karthik,
thanks for the feedback. I have only implemented spring web services. The major problems I faced have been mapping schemas to java request/response objects. The secutiry side was very simple to implement.
I have only looked at a few examples of restful web services and they did not seem to define a wsdl. Since the wsdl defines the contract between the client and the provider up front, before any code is written, is
spring web services not better approach.

Mat
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mat Anthony wrote:I have only looked at a few examples of restful web services and they did not seem to define a wsdl. Since the wsdl defines the contract between the client and the provider up front, before any code is written, is spring web services not better approach.

A WSDL is a SOAP concept; some REST implementations (like Jersey) have something similar for REST WS called WADL. I don't know if Spring WS implements REST at all, but their SOAP implementation is not "better" than some REST implementation just because it implements something that only applies to SOAP to begin with, and for which an equivalence in the REST world exists.
 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks Ulf

Mat
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have only looked at a few examples of restful web services and they did not seem to define a wsdl. Since the wsdl defines the contract between the client and the provider up front, before any code is written, is spring web services not better approach.

There is no WSDL in RESTful web services.

Regarding WSDL contracts:
WSDL is ideal in situations where 1) contracts themselves are complex and any vagueness or differences in understanding may impose a major cost later on in the development cycle. 2)interoperability with other systems is required. 3) Implementation on both sides happens concurrently.
It makes sense to formalize the contracts before hand in such situations, where upfront development costs (like designing and agreeing on a WSDL contract, developer efforts, etc) are preferred to incompatibilities an one year down the line. Such situations are more common in enterprise to enterprise integration that involve design by committees and take years to complete.

For the consumer web however, companies want as many consumers as quickly as possible. It's in their interest to lower the barriers of entry. SOAP imposes upfront costs and constraints on developers. Remember that SOAP's perception and support is ok in java and .NET, but pathetic in other languages.
Also, SOAP is not really as interoperable as hyped up. Notice how many discussion threads are there on developers facing practical problems when consuming SOAP web services between java and .NET.
Secondly, in the consumer web, it's not really in the producer's interest to support interoperability, because consumers may then migrate and take their money to another interoperable service. Lock-in is good for revenues.
Thirdly, in consumer web, implementation does not happen concurrently; always, the producer first implements and publicises, and then consumers purchase and consume. So a contract prior
to implementation is useless.

Regarding Spring web services:
Spring is a framework useful only to java programmers. Perhaps it makes SOAP WS implementation easier for java developers, but where does that leave the millions of ruby, python, PHP, javascript and other
language developers?
 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Karthik,
It all makes sense especially "the producer first implements and publicises, and then consumers purchase and consume. So a contract prior to implementation is useless".
Since I will be developing for the consumer web in the future, I will def be having a further look at Restful web services.

Regards
Mat
 
Saxena Sajal
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Karthik..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!