Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

RisPort 401 Unauthorized

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=


Accept: text/*

Content-type: text/xml

Content-length: 1350

SOAPAction: ""

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap=""







<tns:AstHeader id="id1">

<SessionId xsi:type="xsd:string">1234-abcd-1234-abcd</SessionId>



<soap:Body soap:encodingStyle="">


<StateInfo xsi:type="xsd:string"/>

<CmSelectionCriteria href="#id1"/>


<tns:CmSelectionCriteria id="id1" xsi:type="tns:CmSelectionCriteria">

<MaxReturnedDevices xsi:type="xsd:unsignedInt">1000</MaxReturnedDevices>

<Class xsi:type="tns:DeviceClass">Any</Class>

<Model xsi:type="xsd:unsignedInt">255</Model>

<Status xsi:type="xsd:string">Any</Status>

<NodeName xsi:type="xsd:string"/>

<SelectBy xsi:type="tns:CmSelectBy">Name</SelectBy>

<SelectItems href="#id2"/>


<soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem[]">

<Item href="#id3"/>


<tns:SelectItem id="id3" xsi:type="tns:SelectItem">

<Item xsi:type="xsd:string">SEP0017954A37F0</Item></tns:SelectItem>




Re: RisPort 401 Unauthorized

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.

New Member

Re: RisPort 401 Unauthorized

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.

Re: RisPort 401 Unauthorized

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.

New Member

Re: RisPort 401 Unauthorized

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...

New Member

Re: RisPort 401 Unauthorized

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.

SOAP REQUEST" xmlns:soapenc="" xmlns:tns="" xmlns:types="" xmlns:xsi="" xmlns:xsd="">








New Member

Re: RisPort 401 Unauthorized

And here is the response." xmlns:xsd="" xmlns:xsi="">soapenv:Server.userExceptionjava.lang.IllegalArgumentException: argument type mismatch">java.lang.IllegalArgumentException: argument type mismatch

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(


Re: RisPort 401 Unauthorized

Hi 4mcohen,

do you have any decision on this problem, because I also have to deal with it some how?

Best regards.

New Member

Re: RisPort 401 Unauthorized

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.

private Dictionary GetDeviceIP(List devicenames)


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;

Dictionary deviceresult = new Dictionary();

if (tmpResult.CmNodes != null)


foreach (CmNode checknode in noderesults)


if (checknode.ReturnCode == RisReturnCode.Ok)


foreach (CmDevice checknodedevice in checknode.CmDevices)


deviceresult.Add(checknodedevice.Name, checknodedevice.IpAddress);





return deviceresult;


Re: RisPort 401 Unauthorized

10x 4mcohen,

I've decided the problem too, but in some other way. Here I am posting the code for it. Hope it helps someone as developing on cisco can be a tricky situation.