【问题标题】:Cisco Unified Messenger SOAP (AXL) query, how to return all values?Cisco Unified Messenger SOAP (AXL) 查询,如何返回所有值?
【发布时间】:2013-02-06 16:42:38
【问题描述】:

针对 CUCM 的 AXL Web 服务使用 SOAP,有许多查询调用。
获取线 获取设备配置文件 获取用户

等等。

WDSL 显示:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
  <soapenv:Header/>
  <soapenv:Body>
    <ns:getDeviceProfile sequence="?">
      <!--You have a CHOICE of the next 2 items at this level-->
      <name>?</name>
      <uuid>?</uuid>
      <!--Optional:-->
      <returnedTags ctiid="?" uuid="?">
        <!--Optional:-->
        <name>?</name>
        <!--Optional:-->
        <description>?</description>
        <!--Optional:-->
        <product>?</product>
        <!--Optional:-->
        <model>?</model>
        <!--Optional:-->
        <class>?</class>
        <!--Optional:-->
        <protocol>?</protocol>
        <!--Optional:-->
        <protocolSide>?</protocolSide>
        <!--Optional:-->
        <userHoldMohAudioSourceId>?</userHoldMohAudioSourceId>
        <!--Optional:-->
        <vendorConfig>
          <!--You may enter ANY elements at this point-->
        </vendorConfig>
        <!--Optional:-->
        <versionStamp>?</versionStamp>
        <!--Optional:-->
        <traceFlag>?</traceFlag>
        <!--Optional:-->
        <mlppDomainId>?</mlppDomainId>
        <!--Optional:-->
        <mlppIndicationStatus>?</mlppIndicationStatus>
        <!--Optional:-->
        <preemption>?</preemption>
        <!--Optional:-->
        <lines>
          <!--You have a CHOICE of the next 2 items at this level-->
          <!--Zero or more repetitions:-->
          <line uuid="?" ctiid="?">
            <!--Optional:-->
            <index>?</index>
            <!--Optional:-->
            <label>?</label>
            <!--Optional:-->
            <asciiLabel>?</asciiLabel>
            <!--Optional:-->
            <display>?</display>
            <!--Optional:-->
            <dirn uuid="?">
              <!--Optional:-->
              <pattern>?</pattern>
              <!--Optional:-->
              <routePartitionName uuid="?">?</routePartitionName>
            </dirn>
            <!--Optional:-->
            <ringSetting>?</ringSetting>
            <!--Optional:-->
            <consecutiveRingSetting>?</consecutiveRingSetting>
            <!--Optional:-->
            <ringSettingIdlePickupAlert>?</ringSettingIdlePickupAlert>
            <!--Optional:-->
            <ringSettingActivePickupAlert>?</ringSettingActivePickupAlert>
            <!--Optional:-->
            <displayAscii>?</displayAscii>
            <!--Optional:-->
            <e164Mask>?</e164Mask>
            <!--Optional:-->
            <dialPlanWizardId>?</dialPlanWizardId>
            <!--Optional:-->
            <mwlPolicy>?</mwlPolicy>
            <!--Optional:-->
            <maxNumCalls>?</maxNumCalls>
            <!--Optional:-->
            <busyTrigger>?</busyTrigger>
            <!--Optional:-->
            <callInfoDisplay>
              <!--Optional:-->
              <callerName>?</callerName>
              <!--Optional:-->
              <callerNumber>?</callerNumber>
              <!--Optional:-->
              <redirectedNumber>?</redirectedNumber>
              <!--Optional:-->
              <dialedNumber>?</dialedNumber>
            </callInfoDisplay>
            <!--Optional:-->
            <recordingProfileName uuid="?">?</recordingProfileName>
            <!--Optional:-->
            <monitoringCssName uuid="?">?</monitoringCssName>
            <!--Optional:-->
            <recordingFlag>?</recordingFlag>
            <!--Optional:-->
            <audibleMwi>?</audibleMwi>
            <!--Optional:-->
            <speedDial>?</speedDial>
            <!--Optional:-->
            <partitionUsage>?</partitionUsage>
            <!--Optional:-->
            <associatedEndusers>
              <!--Zero or more repetitions:-->
              <enduser>
                <!--Optional:-->
                <userId>?</userId>
              </enduser>
            </associatedEndusers>
            <!--Optional:-->
            <missedCallLogging>?</missedCallLogging>
          </line>
          <!--Zero or more repetitions:-->
          <lineIdentifier>
            <!--Optional:-->
            <directoryNumber>?</directoryNumber>
            <!--Optional:-->
            <routePartitionName>?</routePartitionName>
          </lineIdentifier>
        </lines>
        <!--Optional:-->
        <numberOfButtons>?</numberOfButtons>
        <!--Optional:-->
        <phoneTemplateName uuid="?">?</phoneTemplateName>
        <!--Optional:-->
        <speeddials>
          <!--Zero or more repetitions:-->
          <speeddial>
            <!--Optional:-->
            <dirn>?</dirn>
            <!--Optional:-->
            <label>?</label>
            <!--Optional:-->
            <asciiLabel>?</asciiLabel>
            <!--Optional:-->
            <index>?</index>
          </speeddial>
        </speeddials>
        <!--Optional:-->
        <busyLampFields>
          <!--Zero or more repetitions:-->
          <busyLampField>
            <!--Optional:-->
            <blfDest>?</blfDest>
            <!--You have a CHOICE of the next 1 items at this level-->
            <!--Optional:-->
            <blfDirn>?</blfDirn>
            <!--Optional:-->
            <routePartition>?</routePartition>
            <!--Optional:-->
            <label>?</label>
            <!--Optional:-->
            <asciiLabel>?</asciiLabel>
            <!--Optional:-->
            <associatedBlfSdFeatures>
              <!--Zero or more repetitions:-->
              <feature>?</feature>
            </associatedBlfSdFeatures>
            <!--Optional:-->
            <index>?</index>
          </busyLampField>
        </busyLampFields>
        <!--Optional:-->
        <blfDirectedCallParks>
          <!--Zero or more repetitions:-->
          <blfDirectedCallPark>
            <!--Optional:-->
            <label>?</label>
            <!--You have a CHOICE of the next 2 items at this level-->
            <!--Optional:-->
            <directedCallParkId>?</directedCallParkId>
            <!--Optional:-->
            <directedCallParkDnAndPartition>
              <!--Optional:-->
              <dnPattern>?</dnPattern>
              <!--Optional:-->
              <routePartitionName uuid="?">?</routePartitionName>
            </directedCallParkDnAndPartition>
            <!--Optional:-->
            <labelAscii>?</labelAscii>
            <!--Optional:-->
            <index>?</index>
          </blfDirectedCallPark>
        </blfDirectedCallParks>
        <!--Optional:-->
        <addOnModules>
          <!--0 to 2 repetitions:-->
          <addOnModule uuid="?">
            <!--Optional:-->
            <loadInformation special="?">?</loadInformation>
            <!--Optional:-->
            <model>?</model>
            <!--Optional:-->
            <index>?</index>
          </addOnModule>
        </addOnModules>
        <!--Optional:-->
        <userlocale>?</userlocale>
        <!--Optional:-->
        <defaultProfileName>?</defaultProfileName>
        <!--Optional:-->
        <currentProfileName uuid="?">?</currentProfileName>
        <!--Optional:-->
        <loginTime>?</loginTime>
        <!--Optional:-->
        <loginDuration>?</loginDuration>
        <!--Optional:-->
        <singleButtonBarge>?</singleButtonBarge>
        <!--Optional:-->
        <joinAcrossLines>?</joinAcrossLines>
        <!--Optional:-->
        <loginUserId uuid="?">?</loginUserId>
        <!--Optional:-->
        <ignorePresentationIndicators>?</ignorePresentationIndicators>
        <!--Optional:-->
        <dndOption>?</dndOption>
        <!--Optional:-->
        <dndRingSetting>?</dndRingSetting>
        <!--Optional:-->
        <dndStatus>?</dndStatus>
        <!--Optional:-->
        <emccCallingSearchSpace uuid="?">?</emccCallingSearchSpace>
        <!--Optional:-->
        <alwaysUsePrimeLine>?</alwaysUsePrimeLine>
        <!--Optional:-->
        <alwaysUsePrimeLineForVoiceMessage>?</alwaysUsePrimeLineForVoiceMessage>
        <!--Optional:-->
        <softkeyTemplateName uuid="?">?</softkeyTemplateName>
        <!--Optional:-->
        <callInfoPrivacyStatus>?</callInfoPrivacyStatus>
        <!--Optional:-->
        <currentConfig>
          <!--Optional:-->
          <userHoldMohAudioSourceId>?</userHoldMohAudioSourceId>
          <!--Optional:-->
          <phoneTemplateName uuid="?">?</phoneTemplateName>
          <!--Optional:-->
          <mlppDomainId>?</mlppDomainId>
          <!--Optional:-->
          <mlppIndicationStatus>?</mlppIndicationStatus>
          <!--Optional:-->
          <preemption>?</preemption>
          <!--Optional:-->
          <softkeyTemplateName uuid="?">?</softkeyTemplateName>
          <!--Optional:-->
          <ignorePresentationIndicators>?</ignorePresentationIndicators>
          <!--Optional:-->
          <singleButtonBarge>?</singleButtonBarge>
          <!--Optional:-->
          <joinAcrossLines>?</joinAcrossLines>
          <!--Optional:-->
          <callInfoPrivacyStatus>?</callInfoPrivacyStatus>
          <!--Optional:-->
          <dndStatus>?</dndStatus>
          <!--Optional:-->
          <dndRingSetting>?</dndRingSetting>
          <!--Optional:-->
          <dndOption>?</dndOption>
          <!--Optional:-->
          <alwaysUsePrimeLine>?</alwaysUsePrimeLine>
          <!--Optional:-->
          <alwaysUsePrimeLineForVoiceMessage>?</alwaysUsePrimeLineForVoiceMessage>
          <!--Optional:-->
          <emccCallingSearchSpaceName uuid="?">?</emccCallingSearchSpaceName>
          <!--Optional:-->
          <deviceName>?</deviceName>
          <!--Optional:-->
          <model>?</model>
          <!--Optional:-->
          <product>?</product>
          <!--Optional:-->
          <deviceProtocol>?</deviceProtocol>
          <!--Optional:-->
          <class>?</class>
          <!--Optional:-->
          <addressMode>?</addressMode>
          <!--Optional:-->
          <allowAutoConfig>?</allowAutoConfig>
          <!--Optional:-->
          <remoteSrstOption>?</remoteSrstOption>
          <!--Optional:-->
          <remoteSrstIp>?</remoteSrstIp>
          <!--Optional:-->
          <remoteSrstPort>?</remoteSrstPort>
          <!--Optional:-->
          <remoteSipSrstIp>?</remoteSipSrstIp>
          <!--Optional:-->
          <remoteSipSrstPort>?</remoteSipSrstPort>
          <!--Optional:-->
          <geolocationInfo>?</geolocationInfo>
        </currentConfig>
        <!--Optional:-->
        <services>
          <!--Zero or more repetitions:-->
          <service uuid="?">
            <!--Optional:-->
            <telecasterServiceName uuid="?">?</telecasterServiceName>
            <!--Optional:-->
            <name>?</name>
            <!--Optional:-->
            <url>?</url>
            <!--Optional:-->
            <urlButtonIndex>?</urlButtonIndex>
            <!--Optional:-->
            <urlLabel>?</urlLabel>
            <!--Optional:-->
            <urlLabelAscii>?</urlLabelAscii>
            <!--Optional:-->
            <serviceNameAscii>?</serviceNameAscii>
            <!--Optional:-->
            <phoneService>?</phoneService>
            <!--Optional:-->
            <phoneServiceCategory>?</phoneServiceCategory>
            <!--Optional:-->
            <vendor>?</vendor>
            <!--Optional:-->
            <version>?</version>
            <!--Optional:-->
            <priority>?</priority>
          </service>
        </services>
        <!--Optional:-->
        <featureControlPolicy uuid="?">?</featureControlPolicy>
      </returnedTags>
    </ns:getDeviceProfile>
  </soapenv:Body>
</soapenv:Envelope>

现在&lt;returnedTags&gt; 子树控制返回的内容。我之前打了一些电话,我得到了所有的值(这就是我想要的),然后我去做了一些改变(不确定是什么),突然我开始只取回我要求的东西。

对我来说关键是,让 AXL 返回它在所引用对象上的所有数据,而不是在请求中明确列出它们的诀窍是什么?

即我想要一个简单的查询:

    <soapenv:Envelope xmlns:ns="http://www.cisco.com/AXL/API/8.5" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
    <ns:getLine sequence="?">
      <uuid>{02CF73CE-140E-AD9A-9E0E-B56134636D71}</uuid>
      <returnedTags uuid="?"/>
    </ns:getLine>
  </soapenv:Body>
</soapenv:Envelope>

然后取回填充在 Line 上的所有数据。但是,如果我只包含一个空的&lt;returnedTags/&gt; 标签,我将一无所获。如果我列出空节点以显示我想要的属性,我会取回那些显式的节点。那么我应该发送什么来返回所有属性呢?

【问题讨论】:

    标签: soap wsdl cisco cucm cisco-axl


    【解决方案1】:

    虽然这个问题已经超过几个月了,但我还是会试一试。最近我也参与了一个 cisco axl 项目。我还没有那么多经验,所以我可能错了。

    我一直在处理 getPhone 和 getUser 请求(因为它们非常简单),我得到一个完全填充的结果,查询很简单:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:getUser sequence="?">
             <!--You have a CHOICE of the next 2 items at this level-->
             <userid>ID</userid>
          </ns:getUser>
       </soapenv:Body>
    </soapenv:Envelope>
    

    换句话说:也许您可以尝试从您的请求中删除 。如 WSDL 所示,它是完全可选的。

    【讨论】:

    • 答案是(可在 Cisco 邮件列表/论坛上找到该产品的支持)这取决于电话。 ListDevice 与 getDevice。 ListDevice 需要您想要返回的特定标签,指定。和GetDevice一样,没有returnTags意味着返回所有标签。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-15
    相关资源
    最近更新 更多