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

How to get multiple phones in a request with SelectCmDevices

Caigang1234
Level 1
Level 1

Hi all:

I had met this problem, i can get only one phone with this request:

"<soapenv:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +

"xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soap=\"http://schemas.cisco.com/ast/soap/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"> " +

"<soapenv:Header>" +

"<AstHeader xsi:type=\"soap:AstHeader\">" +

"<SessionId xsi:type=\"xsd:string\">1234567</SessionId>" +

"</AstHeader>" + "</soapenv:Header>" + "<soapenv:Body>" +

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

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

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

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

"<Class xsi:type=\"ns1:DeviceClass\">Phone</Class>" +

"<Model xsi:type=\"xsd:unsignedInt\">255</Model>" +

"<SelectItems>" + "<Item>" + macadd +

"</Item>" + "</SelectItems>" + "</CmSelectionCriteria>" +

"</soap:SelectCmDevice>" + "</soapenv:Body>" +

"</soapenv:Envelope>";

But how can i to get multiple phones in a request? i had tried many methods, but all of them are not work. Thanks for any helps!

4 Replies 4

Caigang1234
Level 1
Level 1

Does anybody know that? Thanks in advanced!

If you don't have any items in selectItems, it will return you first 200 phones.

Hi msabir:

Thanks for your help. Yea,i don't want to get the first 200 phones, i just want to get the phones which are listed in the items.For example:

"SEP0013192F15DU"+

"SEP000E839C1479"+

"SEP00131A4D3B34"+

"SEP001D450BF4CF"

,then i just want to get the four phones, but when i do like this,i always just got one phone,why is that? Then i changed to use Array like this:

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

"" +

"" +

""+

""+

"10"+

"Phone" +

"255" +

"Any" +

"Name" +

"" +

""+

""+

""+

""+

""+

"SEP001D450BF4CE"+

""+

""+

"SEP00131A4D3B34"+

""+

""

But it alway throws this error:

soapenv:Server.generalExceptionERROR: SelectBy is null

why? Thank you very much!

Does anybody know that? Any help is very precious!