This document was generated from CDN thread Created by: Stephan Steiner on 23-09-2013 03:29:20 PM Sent<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><selectCmDevice xmlns="http://schemas.cisco.com/ast/soap" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><CmSelectionCriteria><MaxReturnedDevices>200</MaxReturnedDevices><DeviceClass>Phone</DeviceClass><Model>255</Model><Status>Any</Status><NodeName>chdevcucm91.nxodev.intra</NodeName><SelectBy>Name</SelectBy><SelectItems><item><Item>SEP000000000001</Item></item><item><Item>SEP000000000002</Item></item><item><Item>SEP000000000003</Item></item></SelectItems><Protocol>Any</Protocol><DownloadStatus>Any</DownloadStatus></CmSelectionCriteria></selectCmDevice></s:Body></s:Envelope>Received<?xml version='1.0' encoding='utf-8'?><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 CmSelectionCriteria</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>And Fiddler complains about a protocol violation.Creating a stub using the old wsdl.exe doesn't work. So I guess it's back to doing things manually yet again
Subject: RE: What's wrong with this selectCmDevice request Replied by: David Staudt on 03-10-2013 04:21:23 PMI got the same error if the <stateInfo> element was ommitted (it could be in previous versions IIR.) The following request works (9.1(1)): 1<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap"> 2 <soapenv:Header/>
3 <soapenv:Body>
4 <soap:selectCmDevice>
5 <soap:StateInfo/>
6 <soap:CmSelectionCriteria>
7 <soap:MaxReturnedDevices>200</soap:MaxReturnedDevices>
8 <soap:DeviceClass>Any</soap:DeviceClass>
9 <soap:Model>255</soap:Model>
10 <soap:Status>Any</soap:Status>
11 <soap:NodeName></soap:NodeName>
12 <soap:SelectBy>Name</soap:SelectBy>
13 <soap:SelectItems>
14 <soap:item>
15 <soap:Item>*</soap:Item>
16 </soap:item>
17 </soap:SelectItems>
18 </soap:CmSelectionCriteria>
19 </soap:selectCmDevice>
20 </soapenv:Body>
21</soapenv:Envelope>
Subject: RE: What's wrong with this selectCmDevice request Replied by: Stephan Steiner on 04-10-2013 01:03:56 PMUmm... I think I must have mixed up something.. the request I meant to post was a SelectCmDeviceExt (note the Protocol and DownloadStatus elements).I then found that SelectCmDeviceExt requires at least 1 SelectItem and it does not support the * item - neither I found in the documentation.However, with that being done I managed to get the command working.Subject: RE: What's wrong with this selectCmDevice request Replied by: David Staudt on 04-10-2013 02:54:37 PMHmm...I ran into the '* not supported' thing, good to know on the <selectItem> requirement as well - will see if we can get these added to the docs.Subject: RE: What's wrong with this selectCmDevice request Replied by: Chester Rieman on 05-11-2013 10:58:25 AMyou can do something like this:<?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 xsi:type="xsd:string"/> <CmSelectionCriteria href="#id0"/> </ns1:SelectCmDevice> <multiRef id="id0" soapenc:root="0" 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 xsi:type="xsd:unsignedInt">0</MaxReturnedDevices> <Class xsi:type="xsd:string">Phone</Class> <Model xsi:type="xsd:unsignedInt">255</Model> <Status xsi:type="xsd:string">Registered</Status> <NodeName xsi:type="xsd:string" xsi:nil="true"/> <SelectBy xsi:type="xsd:string">Name</SelectBy> <SelectItems soapenc:arrayType="ns2:SelectItem[1]" xsi:type="soapenc:Array"> <item href="#id1"/> </SelectItems> </multiRef> <multiRef id="id1" soapenc:root="0" 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 xsi:type="xsd:string">*</Item> </multiRef> </soapenv:Body></soapenv:Envelope>