【发布时间】:2016-01-22 02:50:33
【问题描述】:
我尝试从 java web 服务调用一个函数,但不知道如何设置以及如何编写“body data”的内容。
WSDL 定位:localhost:8080/OracleDB/WS?WSDL
function ReturnSet 请求无输入并返回List
在 jmeter 中,我设置 IP=localhost, Port=8080, Path=/OracleDB/WS?WSDL, Method=POST 和正文数据到 HTTP 请求
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ReturnSet>
</ReturnSet>
</soap:Body>
</soap:Envelope>
返回找不到ReturnSet。
更新:
感谢 Dmitri T。
在 SoapUI 中,它发送 XML 如下所示,标题 Content-Type 设置为“text/xml; charset=utf-8”。 在这些更改之后,它就可以工作了。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uses="http://useSQL/">
<soapenv:Header/>
<soapenv:Body>
<uses:ReturnSet/>
</soapenv:Body>
</soapenv:Envelope>
【问题讨论】:
标签: java web-services soap wsdl jmeter