51Testing软件测试论坛

标题: 使用Jmeter中的SOAP/XML-RPC Request取样器的问题 [打印本页]

作者: jumperzzz    时间: 2016-4-20 11:24
标题: 使用Jmeter中的SOAP/XML-RPC Request取样器的问题
本帖最后由 jumperzzz 于 2016-5-4 16:38 编辑

在用SOAP/XML-RPC Request进行Soap测试的时候,URL和Soap/XML-RPC data都是正确的(我用SoapUI验证过),但是当运行的时候,请求的内容却不正常,导致响应内容是错误的,Web服务器根本就没接收到。请问有人能帮我回答下怎样才能让请求成功么?

[attach]100881[/attach]
[attach]100880[/attach]

错误的响应格式:
[attach]100882[/attach]




2016-05-04
今天才发现原贴有些不合理,因为大家并不知道这个接口正确的响应内容是什么,特此补充。

正确的响应内容格式如下图:
[attach]101006[/attach]

作者: jingzizx    时间: 2016-4-20 16:51
没看出来哪里有问题,建议你重新测试一个接口,简单发送的,不要这么复杂,先通了再说
作者: jumperzzz    时间: 2016-4-21 14:38
jingzizx 发表于 2016-4-20 16:51
没看出来哪里有问题,建议你重新测试一个接口,简单发送的,不要这么复杂,先通了再说

好吧 谢谢
作者: jumperzzz    时间: 2016-4-21 14:38
jingzizx 发表于 2016-4-20 16:51
没看出来哪里有问题,建议你重新测试一个接口,简单发送的,不要这么复杂,先通了再说

好吧 谢谢
作者: shudaixiong02    时间: 2016-5-3 14:25
我也碰到同样的问题,在soapui中可以正常返回,但是在jmeter中却返回一堆wsdl的东东,现在楼主有解了没?
作者: jumperzzz    时间: 2016-5-4 16:32
shudaixiong02 发表于 2016-5-3 14:25
我也碰到同样的问题,在soapui中可以正常返回,但是在jmeter中却返回一堆wsdl的东东,现在楼主有解了没?

我已经放弃这个取样器了 Jmeter中还有个取样器 叫WebService(SOAP) Request 我现在用这个在测
作者: shudaixiong02    时间: 2016-5-5 13:57
jumperzzz 发表于 2016-5-4 16:32
我已经放弃这个取样器了 Jmeter中还有个取样器 叫WebService(SOAP) Request 我现在用这个在测

你是用的哪个版本啊,我用的2.13没有那个版本
作者: jumperzzz    时间: 2016-5-5 17:14
问题已解决,是因为SOAP/XML-RPC Request中的URL有误,把“?wsdl”去掉即可
作者: lovewang0306    时间: 2016-9-9 17:05
请问一下,soupUI中解析的可以直接放在jmeter中使用吗?我的解析出来如下,
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xmethods-delayed-quotes">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:ACCESS_CODE_GET_REPORT_INFO soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <dedicated_ica xsi:type="xsd:string">160301497I</dedicated_ica>
      </urn:ACCESS_CODE_GET_REPORT_INFO>
   </soapenv:Body>
</soapenv:Envelope>

放在jmeter中就一直返回
<?xml version ='1.0' encoding ='UTF-8' ?>
<definitions name="enablepatientdata"
targetNamespace='http://127.0.0.1/VasqscanSysPortal1.1.2beta-at/module/report_api/main/'
xmlns:tns='http://127.0.0.1/VasqscanSysPortal1.1.2beta-at/module/report_api/main/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://127.0.0.1/VasqscanSysPortal1.1.2beta-at/module/report_api/main/">
</xsd:schema>
</types>
<message name='GETPATIENTINFORequest'>
<part name="insid" type="xsd:string"/>
<part name="apikey" type="xsd:string"/>
<part name="startdate" type="xsd:string"/>
<part name="enddate" type="xsd:string"/>
</message>
<message name='GETPATIENTINFOResponse'>
<part name="result" type="xsd:string"/>
</message>
<message name='ACCESS_CODE_GET_REPORT_INFORequest'>
<part name="dedicated_ica" type="xsd:string"/>
</message>
<message name='ACCESS_CODE_GET_REPORT_INFOResponse'>
<part name="result" type="xsd:string"/>
</message>
<portType name='FunctionList'>
<operation name='GETPATIENTINFO'>
<input message='tns:GETPATIENTINFORequest'/>
<output message='tns:GETPATIENTINFOResponse'/>
</operation>
<operation name='ACCESS_CODE_GET_REPORT_INFO'>
<input message='tns:ACCESS_CODE_GET_REPORT_INFORequest'/>
<output message='tns:ACCESS_CODE_GET_REPORT_INFOResponse'/>
</operation>
</portType>
<binding name='reportSoap' type='tns:FunctionList'>
<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='GETPATIENTINFO'>
<soapperation soapAction='http://www.cwtservice.cn/newOperation/'/>
<input>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
<operation name='ACCESS_CODE_GET_REPORT_INFO'>
<soapperation soapAction='http://www.cwtservice.cn/newOperation/'/>
<input>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>

</binding>
<service name='ReportingWS'>
<port name='reportSoap' binding='tns:reportSoap'>
<soap:address location='http://124.127.126.78/VasqscanSysPortal1.1.2beta-at/module/report_api/main/server.php'/>
</port>
</service>
</definitions>

我把url后边的?wsdl去掉还是不可以,盼回复
作者: jumperzzz    时间: 2016-10-12 15:52
lovewang0306 发表于 2016-9-9 17:05
请问一下,soupUI中解析的可以直接放在jmeter中使用吗?我的解析出来如下,

   

在soapui录制完成后 将显示的路径放到取样器的URL里 将内容放入取样器的data输入框中 我看到你的回复我就又去试了一下 是可行的 抱歉回复的这么晚 刚看到




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2