soap 1.2 是否可以处理具有 content-type:text/xml 的请求?我有一个要求,在不更改客户端的情况下,我将增强 SOAP 服务以支持 1.2 绑定(bind)。如果有办法/解决方法,请为我指明正确的方向。
最佳答案
这在客户端/服务器绑定(bind)中不匹配,其中服务中的消息版本使用 SOAP 1.2(需要 application/soap+xml),而客户端中的版本使用 SOAP 1.1(发送 text/xml)。 WSHttpBinding 使用 SOAP 1.2,BasicHttpBinding 使用 SOAP 1.1。
通常一侧是 wsHttpBinding,另一侧是 basicHttpBinding。 不要忘记检查与绑定(bind)相关的代码。所以如果你写:
BasicHttpBinding binding = new BasicHttpBinding();
Be sure that all your app.config files contains
<endpoint address="..."
binding="basicHttpBinding" ...
not the
<endpoint address="..."
binding="wsHttpBinding" ...
大约。
关于java - Soap 1.2 支持 jaxws 中的 text/xml 内容类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19853191/