cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
376
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Stephan Steiner on 27-09-2013 08:12:09 AM
The documentation has none and I seem to be unable to contruct one (I get the message that "Invalid element in com.cisco.ccm.serviceability.soap.risport.CmSelectionCriteria - Protocol"). Protocol is the one element SelectCmDeviceSip has over selectCmDevice, and it works in literal format, but the documentation mentions something about a third namespace (<Protocol xsi:type="ns3rotocol" xsi:nil="true"/>) that's not documented anywhere.

Subject: RE: need a working example for SelectCmDeviceSip in RPC encoded format
Replied by: David Staudt on 01-10-2013 05:03:06 PM
Here is a working example on my 9.1(1) lab system:
  1POST https://10.88.131.148:8443/realtimeservice/services/RisPort HTTP/1.1
  2Accept-Encoding: gzip,deflate
  3Content-Type: text/xml;charset=UTF-8
  4SOAPAction: "http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDeviceSIP"
  5Authorization: Basic YWRtaW5pc3RyYXRvcjpjaXNjbyExMjM=
  6Content-Length: 1190
  7Host: 10.88.131.148:8443
  8Connection: Keep-Alive
  9User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
 10
 11<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/">
 12   <soapenv:Header>
 13   </soapenv:Header>
 14   <soapenv:Body>
 15      <soap:SelectCmDeviceSIP soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 16         <CmSelectionCriteriaSIP xsi:type="soap:CmSelectionCriteriaSIP">
 17            <MaxReturnedDevices xsi:type="xsd:unsignedInt">100</MaxReturnedDevices>
 18            <Class xsi:type="xsd:string">Any</Class>
 19            <Model xsi:type="xsd:unsignedInt">255</Model>
 20            <Status xsi:type="xsd:string">Any</Status>
 21            <SelectBy xsi:type="xsd:string">Name</SelectBy>
 22            <SelectItems xsi:type="soap:SelectItems" soapenc:arrayType="soap:SelectItem[1]">
 23               <item>
 24                  <Item>*</Item>
 25               </item>
 26            </SelectItems>
 27            <Protocol xsi:type="soap:protocolType">SIP</Protocol>
 28         </CmSelectionCriteriaSIP>
 29      </soap:SelectCmDeviceSIP>
 30   </soapenv:Body>
 31</soapenv:Envelope>
 32--------------------------------------------
 33HTTP/1.1 200 OK
 34Set-Cookie: JSESSIONIDSSO=470A33210797A8ED38CDD441EA140B5D; Path=/; Secure; HttpOnly
 35Set-Cookie: JSESSIONID=74491846F46D7AE1DDD357B8A78D048B; Path=/realtimeservice/; Secure; HttpOnly
 36Set-Cookie: SoapSession.id=4637258566548434804
 37Content-Type: text/xml;charset=utf-8
 38Transfer-Encoding: chunked
 39Date: Tue, 01 Oct 2013 21:58:33 GMT
 40Server: 
 41
 42<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">
 43   <soapenv:Body>
 44      <ns1:SelectCmDeviceSIPResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
 45         <SelectCmDeviceResultSIP xsi:type="ns1:SelectCmDeviceResultSIP">
 46            <TotalDevicesFound xsi:type="xsd:unsignedInt">1</TotalDevicesFound>
 47            <CmNodes soapenc:arrayType="ns1:CmNodeSIP[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
 48               <item xsi:type="ns1:CmNodeSIP">
 49                  <ReturnCode xsi:type="ns1:RisReturnCode">Ok</ReturnCode>
 50                  <Name xsi:type="xsd:string">DS-UCM911</Name>
 51                  <NoChange xsi:type="xsd:boolean">false</NoChange>
 52                  <CmDevices soapenc:arrayType="ns1:CmDeviceSIP[1]" xsi:type="soapenc:Array">
 53                     <item xsi:type="ns1:CmDeviceSIP">
 54                        <Name xsi:type="xsd:string">SEPD0C282D07A29</Name>
 55                        <IpAddress xsi:type="xsd:string">10.99.136.211</IpAddress>
 56                        <DirNumber xsi:type="xsd:string">1000-UnRegistered</DirNumber>
 57                        <Class xsi:type="ns1:DeviceClass">Phone</Class>
 58                        <Model xsi:type="xsd:unsignedInt">493</Model>
 59                        <Product xsi:type="xsd:unsignedInt">380</Product>
 60                        <BoxProduct xsi:type="xsd:unsignedInt">0</BoxProduct>
 61                        <Httpd xsi:type="ns1:CmDevHttpd">Yes</Httpd>
 62                        <RegistrationAttempts xsi:type="xsd:unsignedInt">6</RegistrationAttempts>
 63                        <IsCtiControllable xsi:type="xsd:boolean">true</IsCtiControllable>
 64                        <LoginUserId xsi:type="xsd:string" xsi:nil="true"/>
 65                        <Status xsi:type="ns1:CmDevRegStat">UnRegistered</Status>
 66                        <StatusReason xsi:type="xsd:unsignedInt">8</StatusReason>
 67                        <PerfMonObject xsi:type="xsd:unsignedInt">2</PerfMonObject>
 68                        <DChannel xsi:type="xsd:unsignedInt">0</DChannel>
 69                        <Description xsi:type="xsd:string">Auto 1000</Description>
 70                        <H323Trunk xsi:type="ns1:H323Trunk">
 71                           <ConfigName xsi:type="xsd:string" xsi:nil="true"/>
 72                           <TechPrefix xsi:type="xsd:string" xsi:nil="true"/>
 73                           <Zone xsi:type="xsd:string" xsi:nil="true"/>
 74                           <RemoteCmServer1 xsi:type="xsd:string" xsi:nil="true"/>
 75                           <RemoteCmServer2 xsi:type="xsd:string" xsi:nil="true"/>
 76                           <RemoteCmServer3 xsi:type="xsd:string" xsi:nil="true"/>
 77                           <AltGkList xsi:type="xsd:string" xsi:nil="true"/>
 78                           <ActiveGk xsi:type="xsd:string" xsi:nil="true"/>
 79                           <CallSignalAddr xsi:type="xsd:string" xsi:nil="true"/>
 80                           <RasAddr xsi:type="xsd:string" xsi:nil="true"/>
 81                        </H323Trunk>
 82                        <TimeStamp xsi:type="xsd:unsignedInt">1380663433</TimeStamp>
 83                        <Protocol xsi:type="ns1:ProtocolType">SIP</Protocol>
 84                        <NumOfLines xsi:type="xsd:unsignedInt">1</NumOfLines>
 85                        <LinesStatus soapenc:arrayType="ns1:CmDevSingleLineStatus[1]" xsi:type="soapenc:Array">
 86                           <item xsi:type="ns1:CmDevSingleLineStatus">
 87                              <DirectoryNumber xsi:type="xsd:string">1000</DirectoryNumber>
 88                              <Status xsi:type="ns1:CmSingleLineStatus">UnRegistered</Status>
 89                           </item>
 90                        </LinesStatus>
 91                     </item>
 92                  </CmDevices>
 93               </item>
 94            </CmNodes>
 95         </SelectCmDeviceResultSIP>
 96         <StateInfo xsi:type="xsd:string">&lt;StateInfo ClusterWide="1">&lt;Node Name="DS-UCM911" SubsystemStartTime="1380659979" StateId="22" TotalItemsFound="1" TotalItemsReturned="1"/>&lt;/StateInfo></StateInfo>
 97      </ns1:SelectCmDeviceSIPResponse>
 98   </soapenv:Body>
 99</soapenv:Envelope>


Subject: RE: need a working example for SelectCmDeviceSip in RPC encoded format
Replied by: Stephan Steiner on 04-10-2013 11:52:03 AM
Thank you.. I wasn't far off - but since the documentation is known to be wrong occasionally (<cough cough>), a working example means no trial and error required
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:

Quick Links