R4R
Right Place For Right Person TM
 
R4R SOAP FAQS SOAP Subjective Questions and Answers

 


Tolal:27 Click: 1 2
Previous Home Next

SOAP Interview Questions And Answers

Page 1

Ques: 1 How you define SOAP?

Ans:
SOAP is stand for Simple Object Access Protocol. SOAP is an protocol based on XML used for accessing a Web Services.I have given you some main points about SOAP.These are given below: 1.SOAP is protocol used for communication. 2.SOAP is used to enable communication between applications. 3.SOAP is an format for sending messages. 4.In SOAP communicates via Internet. 5.SOAP is an platform independent protocol. 6.SOAP is an language independent protocol. 7.SOAP is an protocol based on XML. 8.SOAP is simple and extensible. 9.SOAP allows you to get around firewalls. 10.SOAP is an W3C recommendation.

Ques: 2 Why we use SOAP?

Ans:
It is important for application development use to allow Internet communication b/w the programs. Now days we communicate applications using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this purpus. RPC is used to represents a compatibility and security problem. This kind of traffic can normally block by firewalls and proxy servers. will normally block this kind of traffic. It's a good way to communicate between applications is over HTTP because HTTP is supported by all Internet browsers and servers. Using SOAP we can communicate between applications running on different operating systems with different technologies and programming languages.

Ques: 3 Tell me rules to write syntax of SOAP?

Ans:
When you write syntax of SOAP than please keep these points in mind. 1. We must encoded a SOAP message using XML. 2. A SOAP message must uses the SOAP Envelope namespace. 3.A SOAP message must uses the SOAP Encoding namespace. 4.A SOAP message must NOT be contain a DTD reference. 5.A SOAP message must NOT contain XML Processing Instructions. Syntax of SOAP message: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... </soap:Header> <soap:Body> ... <soap:Fault> ... </soap:Fault> </soap:Body> </soap:Envelope>

Ques: 4 Tell me advantages of SOAP over standard http requests?

Ans:
Their are many advantages of SOAP over standard http request.Some main are given below: 1.SOAP is a firewalls friendly way use to make remote procedures call. 2.SOAP provides us a shared language that is used for mapping structured data transmitted over the wire.This is used to enable processes of different platforms and architectures use to decode the serialized data structures.

Ques: 5 Which Protocol is used by Web service and Web service consumer to communicate with each other ?


Ans:
SOAP is a protocol that is used by Web service and Web service consumer to communicate with each other and it is independent of operting system and language.

Ques: 6 What do you mean by SOAP encoding?

Ans:
SOAP uses XML format to encode data. I have provide you two ways to perform this task: 1.It can maps high level datatypes like: integers, arrays to a serialized XML format Section 5 encoding and Literal encoding. Section 5 encoding is also known as SOAP encoding, is has named after the section in the SOAP 1.1 specification that is use to define it. 2.We can also use Literal encoding to uses a XML Schema to validate them.

Ques: 7 What do you understand byh loosely coupled?

Ans:
Loosly coupled means services that use by you are reusable.In this a service does not depend upon the other sevices.Means if we change Java service shall not affect another service that was developed in PHP.In this all components that are necessary for an application that are not tightly coupled.So, That we perform a single change in some class that it can changes all other parts of the application.Instead to break the whole application into small parts.

Ques: 8 What do you mean by ESB?

Ans:
ESB is stands for Enterprise Service Bus.ESP is standard based which is most important component of Service Oriented Architecture(SOA).Using ESP we can connect applications through service interfaces.

Ques: 9 How we can say that SOAP is different from traditional RPC?

Ans:
The main difference b/w SOAP and Traditional RPC are given below: In SOAP we used procedures which has named parameters and order is irrelevant Where as in XML-RPC order is relevant and parameters do not have names.

Ques: 10 What is SOAP Version 1.2?
Ques: 11 How you define Transport methods in SOAP?

Ans:
Suppose, If wanted to transfer messages from one end to another end using with Internet application layer.Using SOAP we can transport many productsfrom one end to another end. To perform this task without any error we use one of SMTP and HTTP protocols(Used in transfering information).

Ques: 12 How to explain HTTPS in SOAP?

Ans:
We can say that HTTPS is similar to HTTP But the main difference b/w them is that HTTPS has an additional layer underneath the internet application layer which is use to make encrypted data. HTTPS protocol is much better and widely than other protocols like IOP or DCOM because these procols can filtered by firewalls. HTTP protocol provide us security when we want to transfer secured data by using advocates WS-I method.

Ques: 13 How you define the role of XML in SOAP?

Ans:
XML use by many large companies due to its open source nature. XML is an standard format than it is accepted by many organization. Their is a wide variety of tools are available on shelves which is use to ease the process of transition to SOAP. Significance of XML is that to reduce the speed and efficiency. Future format of XML is binary XML.

Ques: 14 What are the advantages of SOAP?

Ans:
Some main advantages of SOAP are given below: 1. SOAP has huge collection of protocols 2. SOAP is an platform and independent. 3. SOAP is an language independent. 4. Most important feature of SOAP is that it has Simple and extensible by nature.

Ques: 15 What are the disadvantages of SOAP?

Ans:
Yes,SOAP has many advantages.But it has some disadvantages also. 1. It is much slower than middleware technologies. 2. Because we used HTTP for transporting messages and not use to defined ESB or WS-Addressing interaction of parties over a message is fixed. 3. Application protocol level is problematic because usability of HTTP for different purposes is not present.

Ques: 16 What are the element that we used in SOAP?

Ans:
I have given you element that we used in SOAP: 1. An envelope element is used to identifies and translates the XML document into a SOAP message. 2. A header element is used to contain header message. 3. A body is used to contain call and response message. 4. Fault element is used to communicate about the errors occurred during the process.

Ques: 17 How you define SOAP envelope elements? 

Ans:
We can called SOAP envelope element as root element of a SOAP message. SOAP Envelope Element: This is use to define an XML document as SOAP message. Syntax: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... To write information message here ... </soap:Envelope> The xmlns:soap Namespace is used to defines the Envelope as a SOAP Envelope. If we different namespace is used,Than the application generates an error and discards that message. The encodingStyle Attribute: It is used to define the data types that we used in the XML document. Attribute may show on any SOAP element. In SOAP message their is no default encoding. Syntax: soap:encodingStyle="URI" Example: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... To write infomation message here ... </soap:Envelope>

Ques: 18 Explain Header Element in SOAP?

Ans:
We use SOAP Header element to store the application specific information about the SOAP message.like: authentication, payment etc. If our Header element is present,it should be the first child element of the Envelope element. One thing I want to clear you all immediate child elements of the Header element must be namespace-qualified. <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> <m:Trans xmlns:m="http://www.w3schools.com/transaction/" soap:mustUnderstand="1">234 </m:Trans> </soap:Header> ... </soap:Envelope> Above example has a header with a "Trans" element and a "mustUnderstand" attribute with a value of 1 and a value of 234. Here, SOAP defines three attributes in the default namespace ("http://www.w3.org/2001/12/soap-envelope"). These three attributes are: 1. mustUnderstand attribute 2. actor attribute 3. encodingStyle attribute We use attribute in the SOAP header to define how a recipient should process the SOAP message. 1. mustUnderstand attribute: This is used to inform that a header entry is mandatory or optional for the recipient to process. When we add mustUnderstand="1" to a child element of the Header element it show that the receiver processing those Header must have recognize them. Suppose that if receiver has unable to recognize elements when we process the header they will failed. Syntax: soap:mustUnderstand="0|1" Example: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> <m:Trans xmlns:m="http://www.w3schools.com/transaction/" soap:mustUnderstand="1">234 </m:Trans> </soap:Header> ... </soap:Envelope> 2. actor attribute: You shpould know that by passing different endpoints along with the message path SOAP message may travel from a sender to a receiver . We can address the Header element to a specific endpoint by using SOAP actor attribute. Syntax: soap:actor="URI" Example: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> <m:Trans xmlns:m="http://www.w3schools.com/transaction/" soap:actor="http://www.w3schools.com/appml/">234 </m:Trans> </soap:Header> ... </soap:Envelope> 3. encodingStyle attribute: Using this attribute we can define data types that we used in the document. we can use this attribute in element's contents and all child elements.encodeingStyle attribute can be appear on any SOAP element. No default encoding has in SOAP message. Syntax: soap:encodingStyle="URL"

Ques: 19 How to explain Body Element in SOAP?

Ans:
We use Body element in SOAP to contains the actual SOAP message specify the ultimate endpoint of the message. Example: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body> <m:GetPrice xmlns:m="http://www.w3schools.com/prices"> <m:Item>Mangos</m:Item> </m:GetPrice> </soap:Body> </soap:Envelope> Above example has write to requests the price of Mangos.In this m:GetPrice and Item elements botha re called as application specific elements. I want to confirm you both elements are not a part of SOAP namespace. I have given you a SOAP response code according to above SOAP request. Example: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body> <m:GetPriceResponse xmlns:m="http://www.w3schools.com/prices"> <m:Price>1.90</m:Price> </m:GetPriceResponse> </soap:Body> </soap:Envelope>

Ques: 20 How you explain Fault Element of SOAP?

Ans:
We used SOAP Fault element to contains errors and the status information for a SOAP message. Fault element can come only once in a SOAP message.When Fault element is present that is will show like child element in Body element. I have given you sub elements that are in Fault element of SOAP. <faultcode> This is used code to identifying the fault. <faultstring> This is an explanation of the fault which can easily read by human. <faultactor> This is used get reason of fault happening. <detail> This is used to Holds application specific error information those are related to the Body element. SOAP Fault Codes: Some Fault Codes of SOAP are given below: VersionMismatch This is used to Find an invalid namespace for the SOAP Envelope element. MustUnderstand This is an immediate child element of the Header element with an mustUnderstand attribute which we set to '1'. Client This is used to contain incorrect information. Server If a problem exists with the server.Than message could not proceed.


Goto Page:

1 2
Share |

SOAP Objective

SOAP Objective Questions And Answers

SOAP Interview Questions And Answers

SOAP Interview Questions And Answers

R4R,SOAP Objective, SOAP Subjective, SOAP Interview Questions And Answers,SOAP,SOAP Interview,SOAP Questions ,SOAP Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R