【发布时间】:2018-02-10 06:00:42
【问题描述】:
我在我的 java 项目中使用 spring 服务并使用 maven pom 管理依赖项。像这样的:
<dependency>
<groupId>org.springframework.ws</groupId>
<version>2.3.1-RELEASE</version>
</dependency>
问题在于默认情况下它使用 SOAP V1.1 进行通信。 是否可以通过更改 pom 文件中的某些属性使其使用 V1.2?我在问这样的错误:
Cannot process the message because the content type 'text/xml;
charset=utf-8' was not the expected type 'application/soap+xml;
charset=utf-8'
据我了解,这是因为我的 SOAP 版本是 V1.1(text/xml) 而另一端想要 V1.2 (application/soap+xml) 另外,有没有办法将内容类型动态设置为“text/xml”或“application/soap+xml”?还是依赖于 SOAP 版本,无法动态配置?
谢谢!
【问题讨论】:
标签: java spring maven web-services soap