Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Â
Rest vs soap
1. What are SOAP Web Services?
Simple Object Access Protocol (SOAP) Web Services are the newest advent of technology on the
internet and are more complex than XML. Web Services make it possible for diverse applications to
discover each other and exchange data seamlessly. It is a modular application that is published, located,
and invoked through the Web and can be called by using SOAP over RPC.
Each "service" exposes a business functionality and means of interacting with a data set at run-time. A
service is uniquely defined by an individual business source. EAN is one of the first to introduce Web
Services to the affiliate world and continues our lead at the forefront of affiliate technology.
To learn more about this new technology visit MSDN - XML Web Services Basics.
It's just two different ways to transfer "raw" database content depending on the scripting methods and the server
platform a partner uses.
Both data platforms contain the same data and all the same request types.
Each platform is structured to suit the way it travels across the web for that method of transfer.
Web Services and XML
back to top
What's the difference between XML and SOAP Web Services?
The majority of public services offer REST (Representational State Transfer) interfaces while some
offer both REST and SOAP (Simple Object Access Protocol) and very few offer just SOAP. Despite all
of the talk about SOAP, the majority of developers seem to use and like the simple REST approach.
There are some complex applications where SOAP may be a better choice, but technologies that have a
simple XML (Extensible Markup Language) over HTTP (Hypertext Transfer Protocol) approach seem
to be preferred overall because it offers the most flexibility and is the most straightforward.
XML is a 'RESTful' method. REST can dictate HTTP GET with a query string. However, there are
some services (such as with EAN XML) that, while not “true REST,” use more than HTTP GET
methods. These exist because the service allows you to submit a large quantity of data which cannot be
sent as part of a query string. If the query string exceeds the maximum query string length that a web
server can accept , then the service will allow HTTP POST of the XML request document, and respond
with an XML document in return. Everything goes through the same URI (Uniform Resource
Identifier). The action is indicated either as part of the query string or in a POST body. For the mos part,
when using EAN XML, you should be sending all RESTful or XML requests to EAN using POST
to bypass any issues with unlimited characters in query strings.
Web Services uses SOAP over RPC (Remote Procedure Call) and is identical except that you’re
required to use XML Namespaces and XML Schemas which are defined in a WSDL (Web Services
Description Language). A WSDL specifies the data types, parameter lists, operation names, transport
bindings, and the endpoint URI, so that client developers can access a service. There are
interoperability issues when trying to generate the SOAP envelope in sending or parsing the SOAP
2. envelope that’s returned. XML Namespaces and XML Schemas can be problematic for some. In theory,
namespaces are good identifiers, even if the XML Namespaces can be tricky. XML Schemas can also
be confusing. However, it does allow you to validate the response, which most people find to be
somewhat useful if they go this route.
The real problem with SOAP is that the specification is confusing so people have difficulty building
interoperable clients and servers. People know how to generate arbitrary XML since it's generally text
based, straightforward and sends an HTTP POST request. They also know how to parse XML when the
structure is documented so they know what to expect. What they have difficulty doing is "decoding" a
WSDL file to determine what combination of XML the server is expecting. They also have difficulty
with how to repeatedly hammer their SOAP client into producing the expected combination of XML
necessary that satisfies the SOAP server. That’s the difference between RESTful XML and SOAP. It is
the complexity of trying to understand the XML specifications of the SOAP client in order to generate
the request correctly. Because the SOAP message is also 'bloated' with excessive amounts of schema
definitions and SOAP tags, the transfer is difficult to read, difficult to debug, 'heavy' with definition
tags, and weighted with an excessive amount of bytes that do not exist when using XML. SOAP is also
rigid and unforgiving. There can be no deviation to the definitions or schemas or simple processing will
fail.
One benefit of using HTTP over using SOAP is that you get caching built in to the architecture, which
you can start using as soon as you ask for it in the headers. This boosts scalability.
Technical XML Web Services
Attributes
Communication REST based text transfer over SOAP based object transfer over RPC
HTTP
Messaging Request / Response messages use Request / Response messages are generated
simple elements and attributes against WSDL / XSD definitions, leading to an
alongside encoded characters to excessive data structure
structure all data
Debugging Easy to decipher as messages are Use of specialist SOAP debugging tools are
embedded within meaningful tags necessary to decipher messages
Architecture Utilize simple text, protocol and Reliance on complex definitions, protocol, and
message structure structure designed for machine to machine data
exchange, but often complex for human
interpretation
Performance Lightweight and efficient due to Heavyweight, detailed Request / Response
compact Request / Response Message structure constitutes slower transfer
Message structure time
3. Interoperability Flexibility to be consumed by Consumed by environments specifically
numerous scripting languages and configured to parse and process SOAP based
server environments Web Service messages
Any developers not able to successfully implement a SOAP Web Services application are advised to
simplify the process by using the XML method
=====================================================
link : http://www.youtube.com/watch?v=v3OMEAU_4HI
==========================================================