SOAP Client
调用 SOAP Web 服务。
从凭据加载 WSDL,使用 args 调用一个 SOAP 操作,并返回解析后的结果对象。
工作原理
- 解析配置。
connection_id、method和args(默认{})缺失时回退到输入 payload 中的同名键;connection_id和method为必填。 - 解析凭据:WSDL URL 为
config.wsdl(或config.url);username、password和token取自密钥。 - 下载 WSDL 并构建客户端。存在
username和password时设置 HTTP Basic 安全;否则若存在token,则设置 Bearer 安全。 - 以
args调用method操作,并以{ result }从out返回响应的第一个元素(解析后的结果对象)。
在工作流中
节点在工作流文件(draft_nodes[])中的写法,以及一次成功运行的 envelope。
{
"node_id": "node-get-quote",
"label": "Get quote",
"operator_slug": "io.soap",
"operator_version": "1.0.0",
"config": {
"connection_id": "pi-credential-xxxx",
"method": "GetQuote",
"args": {
"Symbol": "{{ $json.symbol }}"
}
}
}{
"ok": true,
"data": {
"result": {
"GetQuoteResult": {
"Symbol": "ACME",
"Price": "42.17"
}
}
},
"port": "out"
}配置
-
connection_idstring 必填 -
SOAP 端点/WSDL 的凭据。接受 `basic-auth`(用户名 + 密码)或 `object`(WSDL URL + 高级配置)类型的凭据。
-
methodstring 必填 -
argsobject 可选
代码中的行为
除 schema 描述之外,实现代码对这些键的实际处理。
-
connection_id - 接受配置中含
wsdl(或url)的basic-auth或object凭据。以http://、https://或localhost开头的值会直接用作 WSDL URL,不带认证。 -
args - 一个对象,其键为该操作输入消息中的元素名称。
输出端口
out 默认 操作返回且没有 SOAP fault。result 为转换为 JavaScript 对象的响应正文。
数据
{
"result": {
"GetQuoteResult": {
"Symbol": "ACME",
"Price": "42.17"
}
}
}error 缺少必填字段、无法加载 WSDL、操作不存在,或服务器返回 SOAP fault 或 HTTP 错误。
数据
{
"error": "Method \"GetQuote\" not found in WSDL"
}在表达式中
后续节点可通过 $("SOAP Client").item.json.<路径> 读取此节点输出中的内容(请把 SOAP Client 换成你的节点标签)。Editor 标记工作流编辑器在 Previous Nodes 中提示的路径(输出契约);Worker 标记 worker 实际通过 out 返回的路径,依据“端口”一节所示的输出。
| 表达式 | Editor | Worker |
|---|---|---|
$("SOAP Client").item.json.resultSOAP 结果 | ||
$("SOAP Client").item.json.result.GetQuoteResult | — |
— Worker: worker 会返回它,但编辑器不会提示:请手动输入。对象内部的键可能取决于你的数据或配置(例如每个标签一个键)。
错误
| 消息 | 端口 | 原因与处理 |
|---|---|---|
WSDL URL not found in connection config | error | 凭据配置中既没有 wsdl 也没有 url。 |
Method "<method>" not found in WSDL | error | WSDL 中没有该名称的操作。请使用 WSDL 中声明的原始操作名。 |
<SOAP fault or HTTP error message> | error | 服务器拒绝了调用。请检查 args 是否与该操作的输入消息一致。 |
method is required | error | 配置和输入 payload 中都没有操作名(凭据缺失时对应 connection_id is required)。 |
输入契约
-
connection_idstring 必填 -
methodstring 必填 -
argsobject 可选
输出契约
-
resultobject 可选 -
SOAP 结果
契约(JSON Schema)
与编排器声明完全一致的定义。All 是完整的 *.definition.js;可与上方各节对照,找出文档与 schema 之间的差异。发布前可用它校验节点。
{
"slug": "io.soap",
"name": "SOAP Client",
"category": "io",
"version": "1.0.0",
"description": "Make SOAP Web Service calls.",
"capabilities": [
"soap",
"api",
"xml",
"legacy"
],
"config_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "SOAP Credential",
"description": "Credential for the SOAP endpoint / WSDL. Accepts credentials of type `basic-auth` (username + password) or `object` (WSDL URL + advanced config).",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"basic-auth",
"object"
],
"types": [
"soap"
]
}
},
"method": {
"type": "string"
},
"args": {
"type": "object"
}
},
"required": [
"connection_id",
"method"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"method": {
"type": "string"
},
"args": {
"type": "object"
}
},
"required": [
"connection_id",
"method"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "SOAP Result"
}
}
},
"ports": [
{
"port_id": "out",
"label": "Response",
"description": "Soap response",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Soap fault or error",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"required_resources": [],
"compatible_worker_pools": [
"standard-io",
"legacy-io"
],
"tags": [
"api",
"legacy"
],
"is_stateful": false,
"publisher": {
"identity": "org_link_loom",
"profile": {
"name": "Link Loom",
"verified": true,
"url": "https://me.veripass.com/link-loom",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "SOAP Credential",
"description": "Credential for the SOAP endpoint / WSDL. Accepts credentials of type `basic-auth` (username + password) or `object` (WSDL URL + advanced config).",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"basic-auth",
"object"
],
"types": [
"soap"
]
}
},
"method": {
"type": "string"
},
"args": {
"type": "object"
}
},
"required": [
"connection_id",
"method"
]
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"method": {
"type": "string"
},
"args": {
"type": "object"
}
},
"required": [
"connection_id",
"method"
]
}{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "SOAP Result"
}
}
}[
{
"port_id": "out",
"label": "Response",
"description": "Soap response",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Soap fault or error",
"is_default": false,
"supports_condition": false
}
]执行
- 执行方式
async- 有状态
- 否
- 凭据
- 在服务器端根据
connection_id解析,密钥不会进入工作流。 - 能力
soapapixmllegacy- 标签
apilegacy
说明与限制
- 每次运行都会下载并解析 WSDL。无超时,也不重试。
- 仅返回解析后的结果,不提供响应的原始 XML 和 SOAP 头。
已对照编排器代码核实 · 31e874b · 2026-11-26