I'm trying to execute a SelectCmDevice RisPort query and am only receiving a 401 error from the Callmanager 6.1 box. My problem is that I'm using the same credentials that work successfully when doing an AXL executeSQLQuery. Below is a copy of my HTTP and XML data. Any help would be greatly appreciated.
POST /realtimeservice/services/RisPort HTTP/1.1
Authorization: Basic xxxx=
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
<tns:CmSelectionCriteria id="id1" xsi:type="tns:CmSelectionCriteria">
<soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem">
<tns:SelectItem id="id3" xsi:type="tns:SelectItem">
Your problem is the credentials (as the http error says)... AXL serviceability != AXL. In fact, Cisco completely circumvented the idea of granular access control and you need your user to be a member of the standard admin group in order to make axl serviceability queries (believe me I have tried and had a case open on this issue).
Alternatively you can just use the ccmadmin account.. it has the proper credentials.
I wish it were that simple. I am using the CCMAdministrator account. It works for AXL executeSQLQuery but not for the AXL serviceability query I am trying.
I'm not sure if it has anything to do with it.. but I never send requests to port 8443 but instead use the regular https port. I also never add the host and port to the query header.
I rechecked and my application user definitel has the Standard CCM Admin Users and that works both in my lab, and at a customer site where I use AXL serviceability.
Thanks for the response. I tried sending the requests directly to port 443 with no luck. I'm developing in Visual Studio using C#. I'm using HttpWebRequest which doesn't give me the option of removing host and port from the query header.
I did notice an issue with the Expect header. By default .NET uses "Expect: Continue-100" header and functionality with the HttpWebRequest method when using http 1.1. To change this I set the System.Net.ServicePointManager.Expect100Continue property to false. Now I'm getting a HTTP 500 error...
I ran the SOAPMonitor now that I'm getting the 500 error and the output shows "argument type mismatch". I assume this means that there is a problem with XML in my request. Here is the request output.
And here is the response.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Actually I worked around it. I came to the conclusion that there was something wrong with the XML I was sending but I couldn't identify exactly what it was.
I'm using Visual Studio (C#) to develop in so instead of trying to create the XML myself I just created a Web Reference to the WSDL on the Callmanager server (https://CALLMANAGER:8443/realtimeservice/services/RisPort?wsdl). This will automatically generate a Reference.cs class that will be nested in the project namespace.
I then declared a "using NAMESPACE.WEBREFERENCENAME" and was able to use the objects that were generated in the Reference.cs class. This involved creating a new RISService object, defining this object's properties (Credentials, SoapVersion, and Url), and then I defined a new CmSelectionCriteria object and it's properties (MaxReturnedDevices, Class, Model,SelectBy, Status, and SelectItems). Then I created a SelectCmDeviceResult object using the previously created RISService object (inputing a string for state by ref and the CmSelectionCriteria object I previously created).
This in effect created all of the XML for me and did all of the work. Below is the actual code for the Reference.cs objects I used. I'm sure there are other ways to get this to work (including identifying what was wrong with my original XML query) but I hope this helps.
ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
ServicePointManager.Expect100Continue = false;
RISService ris = new RISService();
ris.Credentials = new NetworkCredential(userID, password);
ris.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap11;
ris.Url = "https://" + CallManagerIP + "/realtimeservice/services/RisPort";
CmSelectionCriteria filter = new CmSelectionCriteria();
filter.MaxReturnedDevices = uint.MaxValue;
filter.Class = "Any";
filter.Model = 255; //any model
filter.SelectBy = "Name";
filter.Status = "Registered";
string devicenamesarray = devicenames.ToArray();
//SelectItem cmItem = new SelectItem();
//cmItem.Item = devicename;
SelectItem cmItems = new SelectItem[devicenamesarray.Length];
for (int i=0; i < devicenamesarray.Length; i++)
cmItems[i] = new SelectItem();
cmItems[i].Item = devicenamesarray[i];
filter.SelectItems = cmItems;
string stateInfo = null; //execution summary
SelectCmDeviceResult tmpResult = ris.SelectCmDevice(ref stateInfo, filter);
CmNode noderesults = tmpResult.CmNodes;
if (tmpResult.CmNodes != null)
foreach (CmNode checknode in noderesults)
if (checknode.ReturnCode == RisReturnCode.Ok)
foreach (CmDevice checknodedevice in checknode.CmDevices)