【发布时间】:2018-12-07 00:02:57
【问题描述】:
Soap 请求生成的 Java 应用程序 [失败]
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dir="http://xxxxxxxxxx">
<soapenv:Body>
<xxxxxxxxxxx>
</soapenv:Body>
</soapenv:Envelope>
SoapUI 生成的 Soap-request [成功]
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:dir="http://xxxxxxxxxx">
<soap:Header/>
<soap:Body>
<dir:ping/>
</soap:Body>
</soap:Envelope>
如何将命名空间 uri“http://schemas.xmlsoap.org/soap/envelope/”更改为“http://www.w3.org/2003/05/soap-envelope”。我还没有创建任何客户端,我刚刚创建了 java 类并运行我能够发送请求并获得错误代码响应,因为上面的 uri 链接。我发现是版本不匹配,但我不知道如何更改。
【问题讨论】:
-
添加你的 java soap 客户端代码 sn-p 没有它,很难回答。
-
Link to code snippet 我在此链接中显示的答案中使用了相同的代码.....