node.js - Node.js Soap 方法参数解析为字符串而不是相关对象
问题描述
我正在使用 node-soap 来使用 WebService。我以前多次使用过这个库并使用过这个服务,但是这次我遇到了以下情况。
我使用包含方法、输入等的 WSDL 创建客户端:
const soap = require("soap");
const url = "https://servintp.latinoseguros.com.mx:8071/wsCotizadorAutos/cotizador/CotizadorLatino.svc?wsdl";
soap.createClient(url, {}, (error, client) => {
if (error) {
callback(error);
} else {
const describe = client.describe()["CotizadorLatino"]["BasicHttpBinding_ICotizadorLatino"];
console.log(describe["ObtenerMarcas"])
}
});
请求成功并创建了客户端,但是当我描述方法“ObtenerMarcas”时,我收到以下对象:
{
input: { datos: 'q17:DatosRequeridos' },
output: { ObtenerMarcasResult: 'q18:ListMarca' }
}
其唯一的输入参数仅显示为字符串,而它应该是具有不同对象和属性的对象。
当使用Soap Client并输入完全相同的 WSDL 端点时,该方法会按应有的方式进行描述,其中包含预期要传递的所有子项和属性:
这让我相信这与客户端配置有关,或者可能是我没有考虑到的非常基本的东西。
谁能指出我做错了什么?
谢谢!
解决方案
推荐阅读
- python - 如何使用 Python 从文件中读取文本?
- api - 问:(ssg-wsg):“注册”和“评估”API 参考在哪里?
- python - Pyinstaller 无法将 Python 程序打包成可执行文件
- python - Python 3 中字典列表中的嵌套 XML 结构
- javascript - 重置无线电表单的正确方法
- c# - 获取通用列表作为序列化属性
- r - 按具有列名 (R) 的类别分类的图
- python - 如何列出在特定网页上所做的所有更新?
- excel - 如何使用 XL 数据表和 XLOOKUP 进行数据验证
- dependency-injection - 我如何注入可选
与hk2?