After writing Step by Step tutorials on Developing SOAP HTTP Web Service in TIBCO, SOAP JMS Web Service in TIBCO and RESTFul Web Service in TIBCO, some people asked me to write about differences between SOAP and RESTful Web services and also about Pros and Cons of using SOAP or RESTful web services in TIBCO.
In this SOAP Vs REST article, I will talk about key differences between SOAP and REST web services and also discuss about usage scenarios for such web services in TIBCO BW.
What is SOAP?
SOAP (Simple Object Access Protocol) is a well known standards based protocol which is used to develop web services. SOAP exposes web services which are based on a contract (wsdl) with a set of operations with XML based messaging structures.
SOAP uses transport mechanism like HTTP, HTTPS, JMS etc. for enabling communication between SOAP Clients and SOAP Server.
SOAP Web Services comprise of following key structural elements:
- WSDL (Web Services Description Language)
WSDL is a XML based document which describes complete structural details of a web service including its operations, operation’s input, output and fault messages. Concrete WSDL also includes transport details of the web service so that any SOAP Client is able to access the service operations.
- Web Service Operations
SOAP Web Service comprises of a set of operations which can be consumed by a client. SOAP Operations expect some input parameters in XML structure and return back XML based response messages.
- WSDL Messages
Input and output parameters of any operation of a SOAP Web Service are defined by WSDL Messages. WSDL Messages use XSDs (XML Schema Definitions) to represent the message structures.
There are three types of WSDL Messages that can be associated with a Web Service Operation:
- Input Message
- Output Message
- Fault Message
- PortType
SOAP Web Service PortType is same as a Class in Object Oriented Programming. The way methods are included inside a Class in OOP, Operations are included inside a PortType in SOAP Web Services.
What is REST?
REST (Representational State Transfer) is an architectural style for designing Public APIs and networked applications in the form of Web Services. REST is a lightweight and non-standardized approach towards development of Web Services as it doesn’t comply to any hard and fast standards unlike SOAP.
REST based Web Services are called RESTful web services and such services use HTTP Protocol for data transport. XML, JSON etc. are used as data formats for input and output of RESTFul web service operations.
SOAP Vs REST : What is the difference between SOAP and REST?
Below are some of the main differences between SOAP and REST Web Services:
- SOAP is a standard based approach to develop web services while REST doesn’t follow any specific set of standards.
- SOAP supports HTTP(s), JMS, FTP etc. as transport protocols but REST supports only HTTP(s).
- SOAP web services only work with POST method while RESTful web services support POST, GET, PUT and DELETE methods.
- SOAP uses interfaces and named operations to expose business logic. REST uses (generally) URI and methods like (GET, PUT, POST, DELETE) to expose resources.
If you want to learn more about SOAP Vs REST and want to know difference between SOAP and REST in detail, watch below video on YouTube channel of TutorialsPedia.
SOAP Vs REST in TIBCO
Talking specifically about Web Services development in TIBCO, you can use either of the two options as TIBCO provides palettes for Both SOAP and RESTful Web services.
For Development of SOAP web services, you can use SOAP and Service Palette in TIBCO Designer. WSDL Palette also comes into play when developing SOAP services. Refer to my below tutorials to get a complete idea of how we can develop SOAP Web services in TIBCO BW:
Developing TIBCO SOAP Web Service Using HTTP Transport
Developing TIBCO SOAP Web Service Using JMS Transport
Exposing TIBCO Process as SOAP Web Service
For developing RESTFul Web services in TIBCO, REST&JSON Plugin needs to be installed first. Once you have REST & JSON Plugin installed, you will be able to see REST related palette in your TIBCO Designer and then you can proceed with RESTFul Web Service development in TIBCO.
Refer to my below step by step tutorial for details:
Developing RESTful Web Services in TIBCO
I hope you liked the post. Feel free to contact me for any further help. Thanks
Its very handy and useful information to clear at least what is SOPA and REST for beginners!
could you please explain java pallete examples
Nice explanation. Can we use service pallete(HTTP pallete) instead of Rest plugin. What is the drawback if we use it.
Hi , Can u please explain about tibco bw 6 from start (scratch) , i am unable to understand many thing in it..
Thanks
jaggi
And the main difference is State also but you didn’t mention that. SOAP is stateless and Rest Statefull webservice.
What all are integration style or approaches in Tibco and what does they mean ?
How can we achieve message level security while designing a web service ?