【发布时间】:2019-10-13 00:41:43
【问题描述】:
我已经生成了一个 wsdl 文件,我用它来编写一个 springboot soap ws,但是当我在soapUi 中加载该 wsdl 文件以创建一个测试我的 ws 的请求时,我收到一个请求,其中包含缺少命名空间前缀的嵌套标签。在触发该请求时,由于没有前缀标签,springboot 给出 saaj soap 异常并出现 404 错误。
当我手动为所有标签添加命名空间前缀时,ws 工作正常。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.studentinfo.com/">
<soapenv:Header/>
<soapenv:Body>
<web:studentData>
<student>
<name>?</name>
<roll_number>?</roll_number>
<address>
<house_number>?</house_number>
<street>?</street>
<city>?</city>
<state>?</state>
</address>
</student>
</web:studentData>
</soapenv:Body>
</soapenv:Envelope>
如果我在标签内的所有嵌套标签中添加“web:”,我的 ws 会按预期工作,但对于上述请求,它不会。由于我无法将 wsdl 格式更改为某个第三方应用程序的输出,有什么办法可以通过调用此请求本身来让我的 ws 工作。
【问题讨论】:
标签: spring-boot soap