http - Raw Soap requests/responses in citrus
问题描述
Is there any way to send raw soap requests and responses in Citrus-framework as client or server ? I have a plain text of a soap-request and want to send it to a server. Afterwards I want to validate the plain text/ xml - response.
Regards, Suspicious Dee
解决方案
默认情况下,Citrus 将自动处理 SOAP 信封并为您包装/解包有效负载主体。如果您想保持 SOAP 信封原样以便自己提供整个 SOAP 消息,您需要在服务器端点上进行设置:
<citrus-ws:server id="soapServer"
port="8080"
auto-start="true"
keep-soap-envelope="true"/>
现在keep-soap-envelope="true"
,您可以在处理此服务器端点上的消息时自己指定 SOAP 信封。在验证中,您现在可以提供整个 SOAP 信封作为预期的消息内容。
在客户端,您需要http-client
在 Citrus 中使用普通组件,因为该soap-client
组件目前无法保留 SOAP 信封。
当然,也可以使用客户端和服务器端的核心 http 组件来发送和接收带有测试人员提供的 SOAP 信封的 SOAP 消息。
推荐阅读
- algorithm - 找到一个连续的子数组,它加起来是一个目标数,并使用分治法打印出子数组
- ios - 如何获取 AVDepthData 对象中的子像素差异
- python - 如何将 pandas 中的格式应用于导出的 excel 文件(特别是尝试填充空白单元格)
- java - 如何在 JSONArray 上应用平面图并在 Spark 中转换为 JSONObject?
- node.js - 浏览器同步不工作权限问题
- flutter-web - 如何选择文件
- javascript - DeviceMotionEvent 的 IOS safari 13.1 权限
- angular - 创建一个指令来监视角度生命周期钩子
- batch-file - .vbs 脚本在批处理文件中运行,但在通过任务调度程序运行时不运行
- c# - 与 Xamarin.Forms Android 项目建立 WebSocket4Net 连接时遇到问题