cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1320
Views
0
Helpful
4
Replies

Serviceability SOAP Issue

Michael Tierney
Level 1
Level 1

I have constructed a SOAP request to get the status of one phone (envelope below). However, it appears that my SelectItems/Item criteria is being ignored and I'm just getting a random response from the RISPORT service. As you can see below, my request asks for info on phone SEPC8F9F9D6D6B5 and the response contains info on phone SEP0004F2EEB7D0. I must be misunderstanding the <soap:Item> criteria specification - can someone please point me in the right direction?

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">

   <soapenv:Header/>

   <soapenv:Body>

      <soap:selectCmDevice>

         <soap:StateInfo></soap:StateInfo>

         <soap:CmSelectionCriteria>

            <soap:MaxReturnedDevices>1</soap:MaxReturnedDevices>

            <soap:DeviceClass>Phone</soap:DeviceClass>

            <soap:Model>255</soap:Model>

            <soap:Status>Registered</soap:Status>

            <soap:NodeName>CUCM04</soap:NodeName>

            <soap:SelectBy>Name</soap:SelectBy>

            <soap:SelectItems>

               <soap:item>

                  <soap:Item>SEPC8F9F9D6D6B5</soap:Item>

               </soap:item>

            </soap:SelectItems>

            <soap:Protocol>Any</soap:Protocol>

            <soap:DownloadStatus>Any</soap:DownloadStatus>

         </soap:CmSelectionCriteria>

      </soap:selectCmDevice>

   </soapenv:Body>

</soapenv:Envelope>

Response:

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns1:selectCmDeviceResponse xmlns:ns1="http://schemas.cisco.com/ast/soap">

         <ns1:selectCmDeviceReturn>

            <ns1:SelectCmDeviceResult>

               <ns1:TotalDevicesFound>1</ns1:TotalDevicesFound>

               <ns1:CmNodes>

                  <ns1:item>

                     <ns1:ReturnCode>Ok</ns1:ReturnCode>

                     <ns1:Name>10.129.0.13</ns1:Name>

                     <ns1:NoChange>false</ns1:NoChange>

                     <ns1:CmDevices>

                           <ns1:Name>SEP0004F2EEB7D0</ns1:Name>

                           <ns1:DirNumber>82294-Registered</ns1:DirNumber>

                           <ns1:DeviceClass>Phone</ns1:DeviceClass>

                           <ns1:Model>431</ns1:Model>

                           <ns1:Product>330</ns1:Product>

                           <ns1:BoxProduct>0</ns1:BoxProduct>

                           <ns1:Httpd>Yes</ns1:Httpd>

                           <ns1:RegistrationAttempts>0</ns1:RegistrationAttempts>

                           <ns1:IsCtiControllable>true</ns1:IsCtiControllable>

                           <ns1:LoginUserId xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                           <ns1:Status>Registered</ns1:Status>

                           <ns1:StatusReason>0</ns1:StatusReason>

                           <ns1:PerfMonObject>2</ns1:PerfMonObject>

                           <ns1:DChannel>0</ns1:DChannel>

                           <ns1:Description>Gordon Palmer- OIT A306 Conference</ns1:Description>

                           <ns1:H323Trunk>

                              <ns1:ConfigName xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:TechPrefix xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:Zone xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:RemoteCmServer1 xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:RemoteCmServer2 xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:RemoteCmServer3 xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:AltGkList xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:ActiveGk xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:CallSignalAddr xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                              <ns1:RasAddr xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                           </ns1:H323Trunk>

                           <ns1:TimeStamp>1423154357</ns1:TimeStamp>

                           <ns1:Protocol>SCCP</ns1:Protocol>

                           <ns1:NumOfLines>1</ns1:NumOfLines>

                           <ns1:LinesStatus>

                              <ns1:item>

                                 <ns1:DirectoryNumber>82294</ns1:DirectoryNumber>

                                 <ns1:Status>Registered</ns1:Status>

                              </ns1:item>

                           </ns1:LinesStatus>

                           <ns1:ActiveLoadID>apps37sccp.1-4-4-0</ns1:ActiveLoadID>

                           <ns1:InactiveLoadID xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                           <ns1:DownloadStatus>Unknown</ns1:DownloadStatus>

                           <ns1:DownloadFailureReason xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                           <ns1:DownloadServer xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                           <ns1:IPAddress>

                              <ns1:item>

                                 <ns1:IP>10.132.24.183</ns1:IP>

                                 <ns1:IPAddrType>ipv4</ns1:IPAddrType>

                                 <ns1:Attribute>AdministrativeAndSignaling</ns1:Attribute>

                              </ns1:item>

                           </ns1:IPAddress>

                        </ns1:item>

               </ns1:CmNodes>

            </ns1:SelectCmDeviceResult>

            <ns1:StateInfo>&lt;StateInfo>&lt;Node Name="CUCM04" SubsystemStartTime="1415940819" StateId="10806" TotalItemsFound="535" TotalItemsReturned="1"/>&lt;/StateInfo></ns1:StateInfo>

         </ns1:selectCmDeviceReturn>

      </ns1:selectCmDeviceResponse>

   </soapenv:Body>

</soapenv:Envelope>

4 Replies 4

dstaudt
Cisco Employee
Cisco Employee

The following request seems to work for me:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.cisco.com/ast/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

   <soapenv:Body>

      <soap:SelectCmDevice soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <StateInfo xsi:type="xsd:string"></StateInfo>

         <CmSelectionCriteria xsi:type="soap:CmSelectionCriteria">

            <MaxReturnedDevices xsi:type="xsd:unsignedInt">1</MaxReturnedDevices>

            <Class xsi:type="xsd:string">Phone</Class>

            <Model xsi:type="xsd:string">255</Model>

            <Status xsi:type="xsd:string">Registered</Status>

            <NodeName xsi:type="xsd:string">DS-UCM105</NodeName>

            <SelectBy xsi:type="xsd:string">Name</SelectBy>

            <SelectItems xsi:type="soap:SelectItems" soapenc:arrayType="soap:SelectItem[1]">

               <item>

                  <Item>IPCMRAEU5UCM5X7</Item>

               </item>

            </SelectItems>

         </CmSelectionCriteria>

      </soap:SelectCmDevice>

   </soapenv:Body>

</soapenv:Envelope>

I suspect if you remove the restriction to return only 1 result, you may find that a bunch of results get returned, suggesting that the <SelectItems> array is somehow getting ignored.  Note that the 'SelectItem[1]' portion of the <SelectItems> portion is important, as it indicates how many select items the request is sending.

Interesting - when I send your message (substituting my own node name and phone name of course) I get the following:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server</faultcode>

         <faultstring>org.apache.axis2.databinding.ADBException: Unexpected subelement StateInfo</faultstring>

         <detail/>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

I'm not a soap expert, and namespaces always confuse me. Any suggestions?

What version of UCM are you using this with?

Version 9.1.2