Friday 20 January 2017

How does SOAP work?
·   SOAP is used to provide a UI that can be achieved from the client object and the request that it sends, goes to the server that can be achieved by using the server object.

·   The UI creates some files or methods that consists of server object and the name of the interface to the server object. It also consists of other information like name of the interface and method.

·   It uses HTTP to send the XML to the server using the POST method. The server parses the method and send the result to the client side.

·  The server creates more XML that consists of responses of the user interface’s request that is used using HTTP.

Describe the SOAP mustUnderstand attribute?
The SOAP mustUnderstand attribute can be used to indicate whether a header entry is mandatory or optional for the recipient to process. 

If you add mustUnderstand="1" to a child element of the Header element it indicates that the receiver processing the Header must recognize the element. If the receiver does not recognize the element it will fail when processing the Header.
Syntax>  soap:mustUnderstand="0|1"

What is the difference between a fault and exception in Apache SOAP?

The difference lies in where the error occurs - on the client side (during the generation of the soap request or the unmarshalling the response) - or on the server side (when un marshalling the request, processing the message or marshalling the response).
The client side raises an exception whereas the server side sends a SOAP response to the client indicating an error occurred on the server side.

Describe the SOAP encodingStyle Attribute?
The encodingStyle attribute is used to define the data types used in the document.

Explain about the actor element?
A SOAP message has to travel a very long distance between its client and server but during the process a part of the message may be intended to be deployed to another destination which is made possible by the SOAP elements actor attribute which address the header element to a particular location.



What happens if RestFull resources are accessed by multiple clients? Do you need to make it thread-safe?
Since a new Resource instance is created for every incoming Request there is no need to make it thread-safe or add synchronization. Multiple clients can safely access RestFull resources concurrently.

No comments:

Post a Comment