利用SoapUI 测试web service的方法介绍
2015-11-09 20:07
483 查看
1. 简介
SoapUI是用java开发的测试web service的工具。2. 安装
2.1. 下载地址http://www.soapui.org/
2.2. 安装
By downloading and installing soapUI using the windows installer from SourceForge soapUI Web Site, which includes the required 1.6 JRE (Java Runtime Environment). Use the installer if you are unsure about your systems Java installation or if you want startup menu icons and an uninstaller.
1.6 JRE 环境
双击安装就可以使用了。
2.3. 使用说明
http://www.soapui.org/userguide/index.html
3. 开始测试
3.1. 准备soapUI已经安装成功
知道要测试的服务的地址,这里以EBI的WSDbfetch为例wsdl地址为:
http://www.ebi.ac.uk/Tools/webservices/wsdl/WSDbfetch.wsdl
3.2. 启动程序
![](http://boyun.sh.cn/blog/wp-content/uploads/2009/06/soapui-25-beta2-300x175.jpg)
soapui-25-beta2
3.3. 新建计划
File->New soapUI Project
![](http://boyun.sh.cn/blog/wp-content/uploads/2009/06/soapui-25-beta22-300x144.jpg)
新建计划
Ok后,查看提供的web service的服务。
![](http://boyun.sh.cn/blog/wp-content/uploads/2009/06/soapui-25-beta23.jpg)
web service的服务列表
3.4 示例1 getSupportedDBs(不需要编辑请求)
双击Request1,显示Request界面,点击绿色的提交按钮,就会递交请求,同时会在右侧返回结果,请求与结果都为XML格式。
![](http://boyun.sh.cn/blog/wp-content/uploads/2009/06/soapui-25-beta25-300x202.jpg)
3.5 示例2 fetchBatch(编辑请求)
请求的页面有问号的地方,都是需要你编辑,如同查询时你选择数据库输入查询结果一样。
![](http://boyun.sh.cn/blog/wp-content/uploads/2009/06/soapui-25-beta26-300x249.jpg)
fetchBatch
<soapenv:Body>
<wsd:fetchBatch soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/“>
<db xsi:type=”xsd:string”>uniprotkb</db>
<ids xsi:type=”xsd:string”>WAP_MOUSE,WAP_RAT</ids>
<format xsi:type=”xsd:string”>default</format>
<style xsi:type=”xsd:string”>default</style>
</wsd:fetchBatch>
</soapenv:Body>
提交返回结果
相关文章推荐
- VS2008LINK : fatal error LNK1000: Internal error during IncrBuildImage编译错误解决办法
- ios Bluetooth 蓝牙
- wait_queue_head_t 使用
- 1101. Quick Sort
- HDU 4296 Buildings(贪心)
- iOS 如何获取系统的个人热点,进行配置UI
- webservice报错Message part refundRequest was not recognized. (Does it exist in service WSDL?)
- easyUi在后台加载异步树
- UIGestureRecognizer(高级)
- UIAlertView弹出框的简单使用
- 关于Intellij IDEA菜单项中Compile、Make和Build的区别
- How Did Watson Answer? —— About Question Analysis
- UIView 杂记
- UI设计工具
- 【转】jmeter 进行java request测试
- 自定义UICollectionViewFlowLayout
- easyui-combobox 取值问题
- UIButton 的属性与方法
- NQueens 与 递归,回溯
- androidUI——PopWindow