开发者

http get for SOAP (web services)

We have a server process that replies to HTTP POST only.

The framework that I use, gsoap, provides an HTTP GET plugin.

I would like to ask what is the purpose of http GET in soap. What开发者_开发百科 are the benefits? Could you please share your experience, if any?


It represents different message exchange pattern. When you send POST you are issuing SOAP request and receiving SOAP response - that is called request-response message exchange pattern. When using GET you are calling "resource" by URI and including Accept HTTP header to request SOAP response - that is called response message exchange pattern.

These two patterns are used with HTTP binding defined in SOAP 1.2 (not every API supports this binding). Each message exchange pattern has its own purpose:

  • Response message exchange pattern is only for data retrieval. It should never change any data on the server.
  • Request/response message exchange pattern is for both retrieval and data modification on the server.

The benefit of HTTP GET can be anything related to differences between GET request and POST request. For example responses to HTTP GET requests can be cached on HTTP proxies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜