使用Postman进行WebService接口测试、Wizdler插件的使用
- WebService
- 2020-06-20
- 16热度
- 0评论
例如WebService接口地址:http://www.webxml.com.cn/zh_cn/web_services.aspx

WebService接口地址如下:
POST /WebServices/MobileCodeWS.asmx HTTP/1.1
Host: ws.webxml.com.cn
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://WebXml.com.cn/getMobileCodeInfo"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getMobileCodeInfo xmlns="http://WebXml.com.cn/">
<mobileCode>string</mobileCode>
<userID>string</userID>
</getMobileCodeInfo>
</soap:Body>
</soap:Envelope>
使用Postman进行WebService接口测试 :
1.打开postman工具添写接口地址,请求方法,请求头信息,如下所示:

2.填写请求数据,请求的数据格式要按照接口地址给的示例去写:

备注:xml 怎么填写,分4步
1、浏览器安装插件:Wizdler插件下载,这个插件的作用是解析wsdl文件,并生成soap信息。
2、浏览器访问地址:http://www.oorsprong.org/websamples.countryinfo/countryinfoservice.wso?WSDL ---显示的是xml文档
3、点击Wizdler,会弹出节点信息。
4、选择一项后会进入一个新的xml页面。
3.修改参数mobileCode,userID可不填,参考如下:


4.运行postman工具,查询接口返回的数据情况:

ok,到此,我们使用Postman进行WebServices的接口测试就做完了。

鲁ICP备19063141号
鲁公网安备 37010302000824号