In this blog post, I am going to show you what is Web service, API and the difference between SOAP (Simple Object Access Protocol) & REST (Representational State Transfer) and how are they related. With competing technologies both have value, the challenge is to know when to use each one. In the Oracle Integration cloud, you can choose one depending on your needs.
If you are new to Oracle Integration Cloud (OIC), then check out our blogs below as these contain all the key points that a beginner should know about Oracle Integration Cloud (OIC), creating Oracle Integration Instance and Consoles walkthrough.
- Oracle Integration Cloud (OIC) For Beginners Overview
- Create Oracle Integration Cloud Instance: Step-by-Step
- Console Walkthrough of Oracle Integration Cloud (OIC) Service
What Is Web Services?
- A web service is any piece of software that makes itself available over the internet and uses a standardized messaging system. Plain text, HTML, XML, and JSON are used to encode all communications to a web service depending upon the requirement.
- Web services are self-contained, modular, distributed, dynamic applications that can be described, published, located, or invoked over the network to create products, processes, and supply chains. These applications can be local, distributed, or web-based. Web services are built on top of open standards such as TCP/IP, HTTP, Java, HTML, and XML.
- Web services are XML-based information exchange systems that use the Internet for direct application-to-application interaction. These systems can include programs, objects, messages, or documents.
What Is An API?
- API is a piece of software that plugs one application directly into the data and services of another by granting it access to specific parts of a server. APIs let two pieces of software communicate, they’re the basis for everything we do on mobile, and they allow us to streamline IT architectures, and make easier to share data sets.
- Like all software, APIs can be pretty straightforward or incredibly complex, and there are different ways to program one with different attributes that are better suited to your application.
Types Of Web Service APIs
There are four types of web service APIs SOAP, REST, XML-RPC and JSON-RPC and the most popular are SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) APIs in Oracle Integration cloud used to integrate the business applications to the cloud.
Although SOAP was long the standard approach to web service interfaces, although it’s being dominated by REST in recent years, with REST now representing more than 70% of public APIs.
SOAP (Simple Object Access Protocol)
SOAP is a protocol that was designed before REST and came into the picture. The main idea behind designing SOAP was to ensure that programs built on different platforms and programming languages could exchange data in an easy manner.
It provides the following advantages:
- SOAP is a protocol. REST is an architectural style. An API is designed to expose certain aspects of an application’s business logic on a server, and SOAP uses a service interface to do this while REST uses URIs.
- SOAP requires more bandwidth; REST requires fewer resources (depending on the API). There’s a little more overhead with SOAP out of the gate, on account of the envelope-style of payload transport. Because REST is used primarily for web services, its being lightweight is an advantage in those scenarios.
- Security is handled differently. SOAP supports WS-Security, which is great at the transport level and a bit more comprehensive than SSL, and more ideal for integration with enterprise-level security tools. Both support SSL for end-to-end security and REST can use the secure version of the HTTP protocol, HTTPS.
- Language, platform, and transport-independent (REST requires the use of HTTP)
- Works well in distributed enterprise environments (REST assumes direct point-to-point communication) JAX-WS is the Java API for SOAP web services.
- SOAP requires more bandwidth and resources than REST.
- Provides significant pre-build extensibility in the form of the WS* standards
- Built-in error handling
- Automation when used with certain language products
REST (Representational State Transfer)
This was designed specifically for working with components such as media components, files, or even objects on a particular hardware device. Any web service that is defined on the principles of REST can be called a RestFul web service. A Restful service would use the normal HTTP verbs of GET, POST, PUT and DELETE for working with the required components.
It provides the following advantages:
- REST APIs access a resource for data (a URI); SOAP APIs perform an operation. REST is an architecture that’s more data-driven; SOAP is a standardized protocol for transferring structured information that’s more function-driven.
- REST permits many different data formats including plain text, HTML, XML, and JSON, which is a great fit for data and yields more browser compatibility; SOAP only uses XML.
- REST calls can be cached, SOAP-based calls cannot be cached. Data can be marked as cacheable, which means it can be reused by the browser later without having to initiate another request back to the server. This saves time and resources.
- Expensive tools are not required to interact with the Web service
- Smaller learning curve
- JAX-RS is the Java API for RESTful web services.
- REST requires less bandwidth and resources than SOAP.
- Efficient (SOAP uses XML for all messages, REST can use smaller message formats)
- Fast (no extensive processing required)
- Closer to other Web technologies in design philosophy
Note: If you want to enhance your knowledge and become a certified Oracle Cloud Platform Application Integration 2019 Associate then check on the blog on certification exam [1Z0-1042].
Summary
In Summary, SOAP is clearly useful and important. For instance, an application to interface with my bank it would definitely need to use SOAP. All three features above are a must for bank transactions. For example, transferring money from one account to another, one would need to be certain that it completes. Retrying it could be catastrophic if it were to succeed the first time, but the response failed.
Related Links/References:
- Oracle Integration Cloud (OIC) For Beginners Overview
- [Free Masterclass] Oracle Integration Cloud Services
- 6 Docs Every Oracle Cloud Integrator Must Read
- Oracle Integration Cloud (OIC) Instance Edition, Message Pricing, and License Types
- Oracle Cloud Documentation Links: OIC | SOA-CS | OCI
- Enabling Clone Utility On OIC-C (Doc ID 2481520.1)
- Oracle Documentation: Clone an Integration
Next Task for you:
Begin your journey towards becoming an Oracle [1Z0-1042] Certified Cloud Integration Expert by joining our FREE Masterclass.
Click on the below image to Register for the FREE MASTERCLASS Now!
The post SOAP Vs REST APIs In Oracle Integration Cloud (OIC) appeared first on Oracle Trainings.