且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SOAP Web服务仅支持“POST”吗? http方法

更新时间:2022-04-23 06:09:26

我总是使用POST,但根据 W3C标准,SOAP支持POST和GET方法。

I always used POST but according to the W3C standard, SOAP supports both POST and GET methods.

编辑:经过一些研究,似乎并不完全正确,正如你所看到的此处。理论上理论上可以使用GET,因为POST和GET是HTTP传输协议的方法,SOAP可以通过HTTP使用。

Edit : After some research, it seems that it's not completely true, as you can see here. It is theoretically possible to use GET because POST and GET are methods of HTTP transport protocol and SOAP can be used over HTTP.

但是当你知道,GET在查询字符串中包含请求。 SOAP请求(XML消息)通常过于复杂和冗长,无法包含在查询字符串中,因此几乎每个实现(例如JAX-WS)都只支持POST。

But as you know, GET includes the request in the query string. SOAP requests (XML messages) are usually too complex and verbose to be included in the query string, so almost every implementation (for example JAX-WS) supports only POST.