先说结论:提供。
SoapUI webservice
带大家过一遍 SoapUI 向一个 webservice 服务 发送请求
前提
大家可以先使用 axis 框架生成的一个 webservice 服务
创建 SoapUI 接口
接着我们需要创建一个 SoapUI 接口,选择 New Soap Project

然后再弹窗中,填入必要的信息:
- Project Name 也就是项目名
- WSDL/WADL 也就是URL

填入请求参数
创建完,我们就可以看到 Request1 和 Request2

我们现在把请求参数填入右侧的参数框中

发送 webservice 服务
最后就可以发送啦,得到返回的 xml 结果~

Apifox
如果你想更快速地去发送 webservice 的话,可以使用 Apifox 这款出色的工具。
创建 webservice 接口
在 Apifox 中调试 WebService 接口,我们需要填入接口必须的信息:
- 接口 URL
- 接口 方法
- 接口 名称

接着设置 Body 格式为 xml
,你可以在此定义发起请求的数据结构。

然后手动设置 Header Content-Type
的值为text/xml; charset=utf-8
或application/soap+xml
(根据实际情况来)

设置一下返回响应的数据格式为 xml

以上的必要设置都完成后,点击保存即可,然后来到运行页。
填写请求参数
进入“运行”界面,我们需要填写请求参数,形如:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/">
<ubiNum>500</ubiNum>
</NumberToWords>
</soap:Body>
</soap:Envelope>

发送 webservice 接口
最后一步就是点击 发送,即可发送此接口,并获得到 xml 的响应结果!

Apifox
Apifox 是一体化 API 协作平台,可以实现 API 文档、API 调试、API Mock、 API 自动化测试,是更先进的 API 设计/开发/测试工具。Apifox 提供了一种全面的 API 管理解决方案。使用 Apifox ,你可以在统一的平台上设计、调试、测试以及协作你的 API,消除了在不同工具之间切换和数据不一致的问题。 简化了你的 API 工作流,并确保了前端、后端和测试人员之间的高效协作,点击免费使用。
