karate - 发送带有文件附件的 SOAP 请求
问题描述
我需要发送一个 SOAP 请求并包含一个文件。
我已阅读空手道框架文档,可以查看使用 json 请求上传文件的示例,但无法弄清楚如何针对 SOAP 请求进行修改。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddDocumentRequest>
<applicationId>123213</applicationId>
<siteId>siteid</siteId>
<username>User</username>
<token>token</token>
<documentName>testfile.txt</documentName>
<documentFile>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:12324"/>
</documentFile>
<description>payslip</description>
<isPrivate>true</isPrivate>
</AddDocumentRequest>
</soap:Body>
</soap:Envelope>
我通常使用soap ui 进行此测试,但希望使用空手道框架实现与我使用空手道进行所有api 和性能测试相同的事情。
解决方案
推荐阅读
- r - R中的分组以表示地图上每个县的计数?
- list - Haskell List 生成无限循环
- themes - Magento 2.4 - 构建通过作曲家安装的主题的子主题父
- python - 如何制作频道并将某人添加到其中
- npm - 如何防止 azure devops 将信息和警告视为错误?
- flutter - 从另一个应用程序返回后地图显示为空白?
- node.js - Node.js:像堆栈一样操作文件
- java - 我的一项活动是出错,这就是为什么我无法连接到我的管理页面,因为无法从包中获取字符串
- sql - 在 SQL Server 2012 中将 varchar 值转换为日期时间
- django-forms - Django中/logout/的ValueError