Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rest vs soap

210 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Rest vs soap

  1. 1. What are SOAP Web Services?Simple Object Access Protocol (SOAP) Web Services are the newest advent of technology on theinternet and are more complex than XML. Web Services make it possible for diverse applications todiscover 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. Aservice is uniquely defined by an individual business source. EAN is one of the first to introduce WebServices 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. Its 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 topWhats the difference between XML and SOAP Web Services?The majority of public services offer REST (Representational State Transfer) interfaces while someoffer both REST and SOAP (Simple Object Access Protocol) and very few offer just SOAP. Despite allof 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 asimple XML (Extensible Markup Language) over HTTP (Hypertext Transfer Protocol) approach seemto 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 aresome services (such as with EAN XML) that, while not “true REST,” use more than HTTP GETmethods. These exist because the service allows you to submit a large quantity of data which cannot besent as part of a query string. If the query string exceeds the maximum query string length that a webserver can accept , then the service will allow HTTP POST of the XML request document, and respondwith an XML document in return. Everything goes through the same URI (Uniform ResourceIdentifier). 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 POSTto bypass any issues with unlimited characters in query strings.Web Services uses SOAP over RPC (Remote Procedure Call) and is identical except that you’rerequired to use XML Namespaces and XML Schemas which are defined in a WSDL (Web ServicesDescription Language). A WSDL specifies the data types, parameter lists, operation names, transportbindings, and the endpoint URI, so that client developers can access a service. There areinteroperability issues when trying to generate the SOAP envelope in sending or parsing the SOAP
  2. 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 its 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 AttributesCommunication REST based text transfer over SOAP based object transfer over RPC HTTPMessaging 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 dataDebugging Easy to decipher as messages are Use of specialist SOAP debugging tools are embedded within meaningful tags necessary to decipher messagesArchitecture 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 interpretationPerformance Lightweight and efficient due to Heavyweight, detailed Request / Response compact Request / Response Message structure constitutes slower transfer Message structure time
  3. 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 ==========================================================

×