Java – how does soap support asynchronous calls but rest does not?

Through soap vs rest on the Internet, I found that most people said that soap supports asynchronous calls, but rest did not, but I didn't get any specific examples Can someone help me?

This is one of the resources I refer to

http://web.archive.org/web/20120421084456/http://www.prescod.net/rest/rest_vs_soap_overview/ http://searchsoa.techtarget.com/tip/REST-vs-SOAP-How-to-choose-the-best-Web-service http://seanmehan.globat.com/blog/2011/06/17/soap-vs-rest/

According to my understanding, both should be synchronized In both cases, the client invokes the web service through soap or rest, and the client waits for the response to return from the service So what if soap supports asynchronous behavior and rest does not?

Solution

Rest is purely a call based on HTTP transmission, and you will receive a 200 response

Soap uses two varieties,

>Synchronous messaging over HTTP > asynchronous messaging over HTTP

Through synchronous messaging, the requester makes a request, and the transport layer code block waits for a response from the provider The requester receives the response on the same HTTP connection that the requester originally established to send the request Synchronous switching is usually easier to implement and requires the provider to generate a response in a short time, especially in a time less than the HTTP timeout value (usually 120 seconds) [using a single HTTP connection itself is synchronous]

Through asynchronous messaging, the requester can release the transmission specific resources after the responder confirms the request and knows that the response will eventually be received When the provider completes processing the message, it sends the response back to the requester over a new HTTP connection [here, we use two HTTP connections to realize asynchronous messaging

>First use the HTTP connection to send the request and receive the acknowledgement HTTP response 200 / OK > the second HTTP connection is used to receive the callback and respond to HTTP response 200 / OK]

Rijoy https://soascribbles.wordpress.com/

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>