SelectCMDevice operation of RisPortService not found

Version 1
    This document was generated from CDN thread

    Created by: Shashidhar KRISHNASWAMY on 23-09-2008 04:59:36 PM
    I am trying to invoke the SelectCmDevice operation of RisPortService to get information about the phone. I am getting "No such operation 'SelectCmDevice'" error.

    I verified by doing the following in the browser whether RisPortService is running.

    https://10.9.11.52:8443/realtimeservice/services/RisPort

    The message is "Hi there .. This is an Axis Service"

    Please help me figuring out this error

    Following is the request message:

    POST /realtimeservice/services/RisPort
    Host:10.9.11.248:8443
    Authorization: Basic Q0NNQWRtaW5pc3RyYXRvcjohcWFWb0lQ
    Accept: text/*
    Content-type: text/xml
    SOAPAction:"http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice"
    Content-length: 1393
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/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/" xmlns:tns="http://schemas.cisco.com/ast/soap/" xmlns:types="http://schemas.cisco.com/ast/soap/encodedTypes">
    <SOAP-ENV:Header>
    <tns:AstHeader id="id1">
    <SessionId xsi:type="xsd:string">1234</SessionId>
    </tns:AstHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <soap:SelectCmDevice>
    <StateInfo xsi:type="xsd:string"/>
    <CmSelectionCriteria xsi:type="soap:CmSelectionCriteria"><MaxReturnedDevices xsi:type="xsd:unsignedInt">10</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"/>
    <SelectBy xsi:type="xsd:string">Name</SelectBy>
    <SelectItems href="#id2"/>
    </CmSelectionCriteria>
    <soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem[2]">
    <Item href="#id3"/><Item xsi:null="1"/>
    </soapenc:Array>
    <tns:SelectItem id="id3" xsi:type="tns:SelectItem">
    <Item xsi:type="xsd:string">SEP00137209C265</Item>
    </tns:SelectItem></soap:SelectCmDevice></SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Following is the response:


    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>
    <soapenv:Fault>
    <faultcode>Server.userException</faultcode>
    <faultstring>No such operation 'SelectCmDevice'</faultstring>
    <detail>
    <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">No such operation 'SelectCmDevice'
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    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:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)</ns1:stackTrace>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">ccm12</ns2:hostname>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: Stephan Steiner on 09-10-2008 08:22:27 AM
    The error message you get is misleading - I think your syntax is incorrect.. the <Item xsi:null="1"/> certainly has me concerned. Below is a request that should work


    <?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 xsi:type="ns1:CmSelectionCriteria">
    <MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>
    <Class xsi:type="xsd:string">Any</Class>
    <Model xsi:type="xsd:unsignedInt">255</Model>
    <Status xsi:type="xsd:string">Unknown</Status>
    <NodeName xsi:type="xsd:string" xsi:nil="true"/>
    <SelectBy xsi:type="xsd:string">Name</SelectBy>
    <SelectItems soapenc:arrayType="ns1:SelectItem[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <item xsi:type="ns1:SelectItem">
    <Item xsi:type="xsd:string">*</Item>
    </item>
    </SelectItems>
    </CmSelectionCriteria>
    </ns1:SelectCmDevice>
    </soapenv:Body>
    </soapenv:Envelope>

    If not, there's a thread in the IP Phone Services forum which has an example that I copied and pasted from an successful call.. including one that searches for multiple phones specifically.

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: Eric Rubin on 11-12-2008 04:14:41 PM
    Stehphan,

    I'm trying to get a list of phones with IP addresses from the Call Manager, using the XML from Chris Crowe's blog. I can log into the CCM and get such a list by selecting Devices|Phones, so I think my login is correct. But I always get a "400 Bad Request" message back from the CCM. Can you take a look at the request I am sending and see if you can find what's wrong with it? Or suggest how I should proceed in getting it to work?

    Thanks,
    Eric Rubin

    Here is the request and the response. (The Authorization is a Base64 encoding of user_name:password.)

    POST /soap/astsvc.dll HTTP/1.1
    SOAPAction : http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice
    Host: https://192.168.97.52:8443/realtimeservice/services/RisPort
    Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjpjMXNjbzEyMw==
    Connection: keep-alive
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml
    Content-Length: 971

    XML=<?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:ExecuteCCMSQLStatement soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
    <ExecuteSQLInputData xsi:type="xsd:string">select name,description from Device where tkclass = 1 order by name;</ExecuteSQLInputData>
    <GetColumns soapenc:arrayType="ns1:ColumnType[2]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <item xsi:type="ns1:ColumnType">
    <Name xsi:type="xsd:string">name</Name>
    </item>
    <item xsi:type="ns1:ColumnType">
    <Name xsi:type="xsd:string">description</Name>
    </item>
    </GetColumns>
    </ns1:ExecuteCCMSQLStatement>
    </soapenv:Body>
    </soapenv:Envelope>

    HTTP/1.1 400 Bad Request
    Transfer-Encoding: chunked
    Date: Thu, 11 Dec 2008 16:03:31 GMT
    Server: Apache-Coyote/1.1
    Connection: close

    0

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: Shashidhar KRISHNASWAMY on 11-12-2008 05:45:53 PM
    I have done executing the SQL query same using AXL service.

    Here is the request

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <executeSQLQuery sequence="1229017426609">
    <sql> SELECT Device.Name as PhoneName, DevicePool.Name as DevicePool,TypeProduct.Name as Model, CallManagerGroup.name as CallManagerGroup FROM Device, DevicePool, TypeProduct, CallManagerGroup WHERE tkClass=1 and Device.fkDevicePool = DevicePool.pkid and TypeProduct.tkModel = Device.tkModel and CallManagerGroup.pkid = DevicePool.fkcallmanagergroup</sql>
    </executeSQLQuery>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: Eric Rubin on 16-12-2008 02:10:56 PM
    I tried this XML and also the XML that Steven provided earlier in this thread and I always get HTTP/1.1 400 Bad Request. In fact I get this in response just about any XML I send.

    My HTTP header looks like
    POST /soap/astsvc.dll HTTP/1.1
    SOAPAction: http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice
    Host: https://192.168.97.52:8443/realtimeservice/services/RisPort
    Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjpjMXNjbzEyMw==
    Connection: keep-alive
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml
    Content-Length: 1194

    I get "RisPort Hi there, this is an AXIS service!" in response to "https://192.168.97.52:8443/realtimeservice/services/RisPort", and I get "Cisco CallManager: AXL Web Service The AXL Web Service is working and accepting requests. Use HTTP POST to send a request." in response to "https://192.168.97.52:8443/axl/".

    Any suggestions about what may be going on and what I can try?

    Eric

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: David Staudt on 16-12-2008 08:18:13 PM
    1) Ensure your are sending the request to CCM via HTTPS/SSL

    2) Your HTTP header doesn't look quite like this example in the developer guide:

    POST :8443/axl/
    Host: axl.myhost.com:8443
    Accept: text/*
    Authorization: Basic bGFycnk6Y3VybHkgYW5kIG1vZQ==
    Content-type: text/xml
    SOAPAction: "CUCMB ver=7.0"
    Content-length: 613

    3) Please ensure your XML is formatted correct. I use SOAPUI 2.5 pointing to the AXL RisPort WSDL for quickly generating requested in known good format ...here is a piece of XML I just tested on my CM6.0(1) setup:

    <?xml version="1.0" encoding="UTF-8"?>
    <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"/>
    </AstHeader>
    </soapenv:Header>
    <soapenv:Body>
    <soap:SelectCmDevice >soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <CmSelectionCriteria xsi:type="soap:CmSelectionCriteria">
    <MaxReturnedDevices >xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>
    <Class xsi:type="xsd:string">Any</Class>
    <Model xsi:type="xsd:unsignedInt">255</Model>
    <Status xsi:type="xsd:string">Any</Status>
    <SelectBy xsi:type="xsd:string">Name</SelectBy>
    <SelectItems soapenc:arrayType="soap:SelectItem[1]" >xsi:type="soapenc:Array">
    <item xsi:type="soap:SelectItem">
    <Item xsi:type="xsd:string">SEP00070EB9C4B4</Item>
    </item>
    </SelectItems>
    </CmSelectionCriteria>
    </soap:SelectCmDevice>
    </soapenv:Body>
    </soapenv:Envelope>

    4) You can use the SOAP Monitor tool to (https://[cm-ip]/realtimeservice/SOAPMonitor) to check that the request is making it to CM and looks OK.

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: Eric Rubin on 16-12-2008 09:18:42 PM
    Thanks.

    I tried sending it the XML you provided and still got HTTP/1.1 400 Bad Request.

    I started up the SOAPMonitor on my CM and it doesn't see any SOAP requests.

    So what does this mean?

    Eric

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: David Staudt on 17-12-2008 01:00:46 AM
    In your later posts it looks like you are POST'ing to the CCM4 URL

    POST /soap/astsvc.dll HTTP/1.1

    If you are trying to use this on a CM5+, it won't work...

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: Eric Rubin on 17-12-2008 01:44:15 PM
    I changed the POST to "POST :8443/axl", which the newer Cisco doc provides and now I don't get any response from the CCM (and the SOAP Monitor doesn't see anything). Is this the right POST to use? Also should the Host be
    "Host: https://192.168.97.52:8443/realtimeservice/services/RisPort" or
    "Host: 192.168.97.52:80" or what?

    Eric

    Subject: Re: SelectCMDevice operation of RisPortService not found
    Replied by: David Staudt on 19-12-2008 04:02:43 PM
    Please take a look at this how-to I just posted:

    http://developer.cisco.com/web/axl/wikidocs

    Questions/comments/corrections welcome.