How Soap supports asynchronous call while Rest does not?

后端 未结 3 1145
轮回少年
轮回少年 2020-12-30 14:22

I was going thru Soap vs Rest on net and found most of them says Soap supports asynchronous call while Rest does not but did not get any concrete example of that. Can anybod

3条回答
  •  清酒与你
    2020-12-30 14:53

    REST is purely an HTTP transport based call and you will receive a response say 200 OK on the other side,

    SOAP uses two varieties,

    • Synchronous Messaging over HTTP
    • Asynchronous Messaging over HTTP

    With synchronous messaging, the Requestor makes a request and the transport layer code blocks waiting for a response from the Provider. The Requestor receives the response on the same HTTP connection that the Requestor initially established to send the request. Synchronous exchange is usually easier to implement and requires that the Provider be able to generate a response in a short time, specifically in a time less than the HTTP timeout value(generally 120sec). [A single HTTP Connection is used that itself behaves Synchronously]

    With asynchronous messaging, the Requestor is able to release transport specific resources once the request is acknowledged by the responder, knowing that a response will eventually be received. When the Provider completes the processing of the message it sends a response back to the Requestor over a new HTTP connection. [Here we utilize two HTTP Connections to implement an asynchronous messaging

    • first HTTP Connection is used that for sending the Request and receiving an acknowledgement HTTP Response 200/OK
    • second HTTP Connection is used for receiving the callback and responding HTTP Response 200/OK]

    Rijoy https://soascribbles.wordpress.com/

提交回复
热议问题