我正在尝试对cucm运行axl查询。我这里有一个可用的例子(不知羞耻地窃取):https://gist.github.com/darrenparkinson/9978397我试着简单一些,用一个sql查询替换soap部分,当我使用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尝试这样做时,我得到
node device.js SyntaxError:令牌无效或意外
下面是我尝试用node.js发送的soap部分:
如有任何帮助,我们不胜感激!
发布于 2018-06-06 08:09:07
试一试这种格式,这对我使用SoapUI很有效
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.cisco.com/AXL/API/8.0">
<soapenv:Header/>
<soapenv:Body>
<ns:executeSQLQuery sequence="?">
<sql>select count(*) from device</sql>
</ns:executeSQLQuery>
</soapenv:Body>
</soapenv:Envelope>
https://stackoverflow.com/questions/45748514
复制相似问题