Working sample of a RisPort SelectCmDevice query

Answered Question
Mar 19th, 2008
User Badges:
  • Silver, 250 points or more

Would anyone mind to share a sample? The documentation is pretty much useless and since Cisco still doesn't understand what a webservice is (no code generation with axis, jax-ws and wsdl.exe) I'm stuck having to do it the hard way yet again, but whatever I pieced together from documentation and posts here always returns into a 500 error.

Correct Answer by mmitchell2007 about 9 years 4 months ago

Here ya go. Complete pain in the rear. Parsing the response is real fun too. I ended up creating a custom AXL post function since the wsdl is fuzzy at best.


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

http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


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

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/">

10

Any

255

Registered

Name

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/">

SEP001E4A3F90A1




  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
mmitchell2007 Sat, 03/22/2008 - 04:02
User Badges:

Here ya go. Complete pain in the rear. Parsing the response is real fun too. I ended up creating a custom AXL post function since the wsdl is fuzzy at best.


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

http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


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

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/">

10

Any

255

Registered

Name

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/">

SEP001E4A3F90A1




stephan.steiner Fri, 03/28/2008 - 09:31
User Badges:
  • Silver, 250 points or more

Where did you get this spec from? I actually opened a Case with Cisco first but since that takes time I posted here as well, and as it turns out I got almost exactly the same response.. the only difference was that Cisco used * instead of SEP...


I'm still wondering how I can specify multiple items.. the maximum number of devices you can get back is 200.. so if you have more than 200, you have to look up the devices via axl (no problem here), and then specify 200 items per SelectCmDevice query (and respecting the 15 calls per minute limit) - but I cannot figure out how that query should look like.

stephan.steiner Fri, 03/28/2008 - 11:20
User Badges:
  • Silver, 250 points or more

I figured out how to specify multiple terminals.. I'm attaching an example of a request that gets you the devices SEP1234 and SEP1235. Turns out SelectItem only allows for one item, so you need multiple SelectItem elements, each containing a single Item (phone name).


I've also gone ahead and got rid of the references - everything is within the SelectCmDevice tag now.


When going through the WSDL I noted that SelectItems is nillable.. so I'm going to try what happens if I leave the SelectItems out next.



@edit: as expected, if you leave out the SelectItems tag, you get the MaxReturnedDevices number of devices back. Furthermore, when specifying individual phones, it's not necessary to specify the array size of ns2:SelectItem[] - you can just leave the empty brackes (unlike my example where I put 2 since I know how many results should come back). Next stop.. look up by IP address.


Actions

This Discussion