Home > Ask the SOA Experts > SOA governance and standards Questions & Answers > When is it more appropriate to use SOAP or REST?
Ask The SOA Expert: Questions & Answers
EMAIL THIS

When is it more appropriate to use SOAP or REST?

Anne Thomas Manes EXPERT RESPONSE FROM: Anne Thomas Manes

Pose a Question
Other SOA Categories
Meet all SOA Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 12 April 2005
When is it more appropriate to use SOAP or REST?

>

It's more appropriate to compare REST (Represtational State Transfer) with SOA (service oriented architecture) than it is to compare REST with SOAP. REST is an architectural style. SOAP is a messaging protocol. REST applications may use the SOAP protocol, although in many cases they simply send XML messages over HTTP. The key advantage of using SOAP rather than simple XML over HTTP is that SOAP provides a mechanism to cleanly separate infrastructure functionality from application payload. HTTP messages include a header which can be used to pass session and security information, but it's capabilities for separating infrastructure from application payload are quite limited. A SOAP header can contain any type of information, which allows middleware to handle a lot more runtime processing for the application (such as routing, message transformation, security, auditing, persistence, accounting, and many other services).

REST is typically more scalable than SOA, so for very high scalability requirements I would lean more toward REST, but there are many other criteria to consider besides scalability. And you can make SOA scale if necessary.

I think the key consideration that developers and architects should consider when choosing between SOA and REST is the programming style and the experience of the developers. When using SOA, the application typically send a request message to the service indicating the requested operation and supplying input information in the message. The service processes the input message and returns a response message. (SOA can also support other message exchange patterns and asynchronous programming). When using SOA, the infrastructure can also perform automatic mapping of XML into language-specific objects (e.g., XML to Java).

When using REST, the application typically encodes all request information into the URL. (You probably wouldn't want to encode sensitive information, such as a credit card number, into a URL, though.) An application can also submit information for processing, such as a purchase order, using the POST method. When using REST, the application typically works directly with XML.

If developers are accustomed to working with language objects and using RPC or RMI style programming models, they will find SOA more intuitive. If developers are accustomed to working with SAX and DOM and using message style programming models, they will find REST more intuitive.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SOA governance and standards
UDDI clients and UDDI implementations
Creating an enterprise data dictionary
Hard vs. live real time systems
Service contract tools
Open source UDDI tools
SOA policy management
Service reuse rules
WSDM lagging behind WS-Management
The status of JBI
WSDL 1.1 vs. WSDL 2.0

SOAP (Simple Object Access Protocol)
On the road to SOA – Part 1, Boubez on early insights
Progress/Actional SOA diagnostic tool builds on Mindreef purchase
InterSystems Ensemble environment adds binary SOAP messaging
User combines open source ESB with data services to speed customer reports
WSDLs get a report card
Simple Object Access Protocol (SOAP) Tutorial
Web services for Windows CE
SOA for pets uses REST and SOAP
Netrics uses SOAP to clean data
Mindreef updates SOA testing tools
SOAP (Simple Object Access Protocol) Research

Representational State Transfer (REST)
Restlet framework wrestles RESTful Web applications
Mulesoft architect talks REST, ESBs
How do I balance throughput requirements and interoperability?
IBM Sabbah's say on REST for collaborative ALM
Report on REST- REpresentational State Transfer
Are tools available to work with OSGi today?
Expert Query: What is the difference between RESTful transactions and Web Services transactions?
Progress/Actional SOA diagnostic tool builds on Mindreef purchase
SOA goes beyond 'rip, replace, repeat'
Inside the SOA big tent; Azure at PDC; more

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
DIME  (SearchSOA.com)
endpoint reference  (SearchSOA.com)
SOAP  (SearchSOA.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SOA Governance White Papers - BPM, EDA, IT Governance
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2001 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts