【发布时间】:2017-08-18 04:20:40
【问题描述】:
我正在尝试对 cucm 运行 axl 查询。 我在这里有一个工作示例(无耻地被盗): https://gist.github.com/darrenparkinson/9978397 我试图简单并用 sql 查询替换肥皂部分,当我使用 curl 发送请求时,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<axlapi:executeSQLQuery sequence="1"
xmlns:axlapi="http://www.cisco.com/AXL/API/8.0"
xmlns:axl="http://www.cisco.com/AXL/API/8.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.cisco.com/AXL/API/8.0 axlsoap.xsd">
<sql>select count(*) from device</sql>
</axlapi:executeSQLQuery>
当我尝试使用 node.js 时,我得到了
节点设备.js SyntaxError: 无效或意外的令牌
这是我尝试使用 node.js 发送的肥皂部分:
感谢任何帮助!
【问题讨论】:
-
FWIW,您最好使用实际的 SOAP 客户端,而不是尝试依赖手工拼接 XML(并希望它在未来继续工作)。
标签: javascript node.js soap