Tuesday, September 1, 2020

SOAP & REST IQA

 

Q) What Exactly Do You Mean By Serialization?

There are certain stages when XML needs to be converted into a format which is compatible with the Teamwork objective. This process is generally called as serialization. 

There are two types of service available in SOA.

1. Soap Based Service.
2. Restful Service or Rest Service.

Q) What is a Web Service?

Web services are application components, Which are self-contained and self-describing and provide services based on the open protocol communication

(i.e. SOAP UI, HTTP over the net). 

The Web Services Description Language (WSDL) client interface,

"Which defines the input and output messages for this BPEL process flow, the supported client

Interface and operations, and other features. "

This functionality enables the BPEL process flow to be called as a service.

A Web service is a software service used to communicate between two devices on a network.

Q) What Rest Stands For?

REST stands for Representational State Transfer.

Q) What Is Rest?

 uses HTTP Protocol for data communication.

 text, JSON and XML

 A RESTful web service usually defines a URI, Uniform Resource Identifier a service

There are two types of service available in SOA. 

1. Soap Based Service.
2. Restful Service or Rest Service.

Q) What is a SOAP Based Service?

Soap based services are mainly deals with XML messages. WSDL represents SOAP based service.

Q) What is a Restful  Service?

It is a type of Web Services based on REST Architecture

Everything is treated as a resource in Rest Architecture. 

 highly scalable

 easy to maintain

 light weight

Restful service used the HTTP verb, for example Get, Post, Put, Delete.

It mainly deals with both type of message format JSON and XML.

Searching any video on YouTube is a perfect example of restful service or

Liking/commenting/posting some information on Face book is also an example of restful service.

WADL represents the restful service.

Q) Difference between XML & JSON ?

XML and JSON are the data exchange formats used in development of Web Applications/Web Service.

 Syntax of JSON is lighter than XML. as JSON does not contain start and end tags but XML do have start and end tags.

 JSON supports data type and arrays while XML does not provide data type and does not support array.

XML support for Namespaces and Comments while JSON does not support Namespaces and comments.

JSON is extended from the JavaScript while that XML has been extended from SGML.

 XML stands for “Extensible Markup Language” while JSON stands for “JavaScript Object Notation”.

 JSON is better for web services while XML is better for configuration.

Mapping is quite easy in JSON than in XML as JSON is data oriented while XML is document oriented.

Q) Difference between SOAP & REST?

Q) What is SOAP and what are the binding protocols available?

Simple object access protocol and it is a protocol specification for the communication happens between the web services over the network and binding protocol is HTTP.

Q) Difference Between Web Application, web server And Web Service?

Web Application

Any application which reside on server

All user interactivity (the GUI) is done through web pages  but all data is stored and (mostly) manipulated on the server.

Web Service

"It’s a peace of information over a network which enable communicate between  two application  through http in xml formate."

Web server

A webserver is a computer system that delivers web pages. 

Every web server has an IP address and possibly a domain name.

where application are deployed.

Q) Explain The Difference Between Authentication And Authorization

Authentication is the process by which the system identifies the user.

Authorization is process it will check weather users have necessary  permission ?

Q) What Is Client/server?

Client
From software  which we send the request to the server and accept the response from the server.

server
A server has operation system,data management software and network software.

 Q) Hyper Text Transfer Protocol - HTTP

"HTTP defines how messages are formatted and transmitted and  
 action web servers and browsers should take in response to various  commands. "

Q) UDDI
UDDI is an XML-based
 preferred for describing, publishing, and finding net services. (WSDl)
UDDI describes where we can get the web service. 
This is nothing but the implementation of the SOA registry.

Q) Soap
SOAP means Simple Object Access Protocol
SOAP is a type of communication protocol
based on XML standard
" It is developed to enable communication between applications of different platforms
 and programming language via internet. "

Envelope: It defines the start and end of the message.
Header: It is an optional element. Contains information about the message being sent.
Body: It contains the XML data comprising the message being sent.
Fault: It provides the information about errors occurred while processing the message.

Q) WSDL
WSDL describes how we can access the service.
"WSDL describes an internet provider, along with the message layout and protocol details for the web provider."
It describe the webservice, where we have types , message, operation, binding details and service details.

 Q) In Which Scenarios Restful Web Services Are Preferred Over Soap Ones?
The Web Services are completely stateless. 
Schema of data can be agreed between service consumer and service provider. 
depends on the format of data exchange

Q) Define One-to-one Mapping Between http Methods And Crud Operations?
PUT maps to Create
GET maps to Retrieve
POST maps to Update
 DELETE maps to Delete. 

Q) What Is Uri?
URI stands for Uniform Resource Identifier.
Each resource in REST architecture is identified by its URI.

Q) What Is Format Of A Uri In Rest Architecture?
<protocol>://<service-name>/<ResourceType>/<ResourceID>

Q) What Is Statelessness In Restful Web Services?
a RESTful web service should not keep a client state on server.

Q) What Is Caching?
Caching refers to storing server response in client itself 
 so that a client needs not to make server request for same resource again and again.

Q) API
Application Programming Interface
Interaction btn multiple software
Set of tools for building software applications
It’s a toolset of programmers can help to create software.

Invoke REST Service

To invoke the REST service we use the WADL file of REST service. In earlier version of SOA we use HTTP bindings to invoke REST service but in this version we use REST bindings to invoke REST services. REST bindings also provide JSON support in this version.

Once you drag the REST binding to composite file, it opens another wizard where we fill required information to add REST service reference. 

Provide REST service reference name and make sure type is selected as Reference in drop down list. Now we will add required operation of REST service and we will use WADL file for that. To do that click on green plus button in Operation Bindings section and choose “Add operation based on WADL service”.

Create REST Services

REST stands for Representational State Transfer. 

Restful application use HTTP to transfer the data.

In 12c we can integrate external REST API’s and XML, JSON and URL-encoded GET/POST data support is provided.

 Web Application Description Language (WADL) support is also provided, WADL is similar to WSDL only difference is WADL file is used when we create or Invoke REST service and WSDL is used when we create or invoke SOAP service. 

OWSM (Oracle Web Service Manager) policy support is also provided for REST security.


No comments:

Post a Comment

SOA Overview Part-1

  Middleware It provides a mechanism for the process to interact with other processes running on multiple network machines. Advantages...