IP Phone Services for Developers: RisPort returns

Unanswered Question
Feb 24th, 2009

Hi

I am trying to use the Risport SelectCmDevice following the user cisco documentation in orden to get the IP of a device, but I m getting an error :

array(3) { ["faultcode"]=> string(31) "soapenv:Server.generalException" ["faultstring"]=> string(37) "Error the cmSelectionCriteria is null" ["detail"]=> array(2) { ["stackTrace"]=> string(4715) "Error the cmSelectionCriteria is null at com.cisco.ccm.serviceability.soap.risport.RisBindingImpl.selectCmDevice(Unknown Source) at com.cisco.ccm.serviceability.soap.risport.RisBindingSkeleton.selectCmDevice(Unknown Source) at sun.reflect.GeneratedMethodAccessor1509.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at bla bla bla

Soap Request

$xml_data ='<soap:Envelope xmlns:soap="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">';

$xml_data .='<soap:Header>';

$xml_data .='<tns:AstHeader id="id1">';

$xml_data .='<SessionId xsi:type="xsd:string">' . $CCMSessionID .'</SessionId>'; //

$xml_data .='</tns:AstHeader>';

$xml_data .='</soap:Header>';

$xml_data .='<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">';

$xml_data .='<tns:SelectCmDevice>';

$xml_data .='<StateInfo xsi:type="xsd:string" />';

$xml_data .='<CmSelectionCriteria href="#id1"/>';

$xml_data .='</tns:SelectCmDevice>';

$xml_data .='<tns:CmSelectionCriteria id="id1" xsi:type="tns:CmSelectionCriteria">';

$xml_data .='<MaxReturnedDevices xsi:type="xsd:unsignedInt">10</MaxReturnedDevices>';

$xml_data .='<Class xsi:type="tns:DeviceClass">Phone</Class>';

$xml_data .='<SelectBy xsi:type="tns:CmSelectBy">Name</SelectBy>';

$xml_data .='<SelectItems href="#id2">SEP001AA1E01C4B</SelectItems>';

$xml_data .='</tns:CmSelectionCriteria>';

$xml_data .='<soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem[2]">';

$xml_data .='<Item href="#id3"/><Item xsi:null="1"/>';

$xml_data .='</soapenc:Array>';

$xml_data .='<tns:SelectItem id="id3" xsi:type="tns:SelectItem">';

$xml_data .='<Item xsi:type="xsd:string"/></tns:SelectItem>';

$xml_data .= '</soap:Body>';

$xml_data .= '</soap:Envelope>';

some ideas?

Any example that works or help will be appreciated

Best regards

Fred

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
stephan.steiner Wed, 02/25/2009 - 02:08

Here's the skinny on how you find a working example:

Click on Advanced Search in the upper left corner.. search term:

SelectCmDevices

And under 4 you select the unified communication and video category and then this forum to further limit the search.

The post you're looking for is called "Working sample of a RisPort SelectCmDevice query"

I know the search engine they have here sucks quite a bit.. but it still manages to find some useful results every now and then so you should always give it a try :)

fredroines Thu, 02/26/2009 - 08:22

Hi Stephan

Your example worked for me !!!!

u right CCM search here is suck and also the some documentation about from Cisco...

Thanks you

Frederick

msabir Sat, 02/28/2009 - 17:49

If there is enough interest, I am thinking to create a free tool to retrieve phone list (extension, mac, description, etc.) from the CCM and save it in various formats (XML, CVS, devicelistx.asp format, etc). We already have it working as part of PhoneTop Messenger, but I like to create a stand-alone, free app, just to retrieve the phone list.

Actions

This Discussion