cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
430
Views
0
Helpful
3
Replies

CCM 6.1 - Get list of Devices + IP Address of each device

chriscrowe
Level 1
Level 1

I am trying without much success to get a list of devices and their associated IP Address.

I have seen reference to an in MEMORY DB that you can not use SQL to query.

I saw a reference to using AXL and SelectCmDevice

When I tested this I get the following error:

"No Handler found for SelectCmDevice"

Why is there no real samples to do this as it is quite common. What was once a simple called to GetDeviceListX has got a lot more complex.

Does anyone have a working copy of code to pull this data?

The AXL example I have follows here:

<?xml version="1.0" encoding="utf-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<ns1:SelectCmDevice soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">

<StateInfo/>

<CmSelectionCriteria soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:CmSelectionCriteria" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://schemas.cisco.com/ast/soap/">

<MaxReturnedDevices>200</MaxReturnedDevices>

<Class>Phone</Class>

<Model>255</Model>

<Status>Any</Status>

<SelectBy>Name</SelectBy>

<SelectItems soapenc:arrayType="ns2:SelectItem[2]" xsi:type="soapenc:Array">

<item soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:SelectItem" xmlns:ns3="http://schemas.cisco.com/ast/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

<Item>SEP1234</Item>

</item>

<item soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:SelectItem" xmlns:ns3="http://schemas.cisco.com/ast/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

<Item>SEP1235</Item>

</item>

</SelectItems>

</CmSelectionCriteria>

</ns1:SelectCmDevice>

</soapenv:Body>

</soapenv:Envelope>

But this generates the following error response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>No Handler found for SelectCmDevice</faultstring><detail><axl:Error xmlns:axl="http://www.cisco.com/AXL/API/1.0"><axl:code>5003</axl:code><axl:message>No Handler found for SelectCmDevice</axl:message><request>SelectCmDevice</request></axl:Error></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

Please help me as I do not know where to go next.

3 Replies 3

stephan.steiner
Spotlight
Spotlight

Are you using the sample I posted? (sep1234 and 1235 sound suspicious).. if so, that request should work.. however then the question is where to you submit it to, and do you send the appropriate header and method when making the request?

Thanks for the reply.

Yes I would assume it was your sample code. I found that I was posting to the wrong URL originally when I got the error "No Handler found for SelectCmDevice"

I was posting to /AXL instead of /realtimeservice/services/RisPort

But I now get an HTTP 500 Internal Server Error when I post to the RisPort service.

My post URL is : https://10.3.24.23:8443/realtimeservice/services/RisPort

I add this header:

SOAPAction: "http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice"

I am using a POST http verb

I am using a content type of text/XML

I am using an accept header of text/XML

My latest XML for the soap request is:

http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://schemas.cisco.com/ast/soap/" xmlns:types="http://schemas.cisco.com/ast/soap/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

10.1.1.18-2006-02-01T07:16:21

http://schemas.xmlsoap.org/soap/encoding/">

4294967295

Phone

0

Any

Name

SEP0015632CE38B

And when I do this I get internal server error as a response.

Chris

Do you get the same error when you use my sample again (replace SEP1234 and SEP1235 with the actual phones)?

I see a SessionId in your second request and I don't recall using such an element in my own code... error 500 means the request you send is invalid (or if you're using a stateinfo element it could also be that you didn't wrap the stateinfo into a cdata element (the documentation doesn't tell you that but I had to find out the hard way)).

I wasted a lot of time trying to untable the whole ref thing in the sample that cisco provides.. but my untangled version has worked fine since and I wouldn't dare touch the code again (except that stateinfo thing that I still need to modify.. once you're at that point where things work if you're interested in StateInfo I think I got the point now (I have a case open so I'm going back and forth with the engineer to get all the details))

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: