SOAP Web服务仅支持“POST”吗? http方法 [英] Do SOAP Web services support only "POST" http method

查看:254
本文介绍了SOAP Web服务仅支持“POST”吗? http方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一次采访中遇到了这个问题,那么请问一下,SOAP Web服务是否只支持POSThttp方法,还是有一些方法可以接受服务器端的其他方法?

I faced this question on one of interviews, so could you please tell whether SOAP Web services support only "POST" http method or there is some way to accept other methods on the server side?

推荐答案

我总是使用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.

这篇关于SOAP Web服务仅支持“POST”吗? http方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆