0

我正在开发一个使 CUCM 活动自动化的项目。目前我正在尝试做的是更新现有用户并与新设备建立关联并删除现有关联。我正在尝试使用 Python 来实现这一目标。以下是它的 XML 结构:

<SOAP-ENV:Envelope xmlns:SOAP- 
ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
<SOAP-ENV:Body>    
  <axl:updateAppUser xmlns:axl="http://www.cisco.com/AXL/API/1.0" 
   sequence="12055">         
  <userid>atest</userid>         
  <associatedDevices>
  <device>TCTVINU</device>      
 </associatedDevices>    
 </axl:updateAppUser >
 </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

但是当我运行代码时,它显示用户不存在,但用户在 CUCM 中。有没有其他替代方法可以实现这一目标。

4

1 回答 1

0

知道我犯了什么错误,有两种类型的用户 AppUser 和 EndUser,我试图做的是将设备与 EndUser 相关联。AppUser 不能与设备关联。因此,正确的 XML 如下所示:

 <SOAP-ENV:Envelope xmlns:SOAP- 
  ENV="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
 <SOAP-ENV:Body>    
  <axl:updateUser xmlns:axl="http://www.cisco.com/AXL/API/1.0" 
 sequence="12055">         
 <userid>atest</userid>         
 <associatedDevices>
 <device>TCTVINU</device>      
 </associatedDevices>    
 </axl:updateUser >
 </SOAP-ENV:Body>

于 2018-08-10T09:42:47.793 回答