04-23-2007 11:57 PM - edited 03-13-2019 04:05 PM
Hi,all~
I'm trying to get a realtime information(Phone ip address) by AXL RisPort,but i get a error: "HTTP Version Not Supported",it is so strange~!
i have added a web reference(https://<myCmServer>:8443/realtimeservice/services/RisPort?WSDL) on my web site with VS2005(C#).
help me~Thanks a lot.
04-24-2007 07:06 AM
Try changing the version of your request to v1.0.
04-24-2007 09:57 PM
Thanks for your reply,
This really works.
But the problem now is in
RisPort web service's Method,
SelectCmDeviceResult SelectCmDevice(ref string StateInfo, CmSelectionCriteria CmSelectionCriteria);
i don't know what's initialize value of StateInfo,so i make it null,but the response of SelectCmDeviceResult.CmNodes is null,so i can't get any realtime information. can you help me?
there is my source code:
CM5WebReference.RISService myRis = new CM5WebReference.RISService();
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(ValidateServerCertificate);
CM5WebReference.CmSelectionCriteria csc = new CM5WebReference.CmSelectionCriteria();
myRis.Credentials = new NetworkCredential("CCMAdministrator", "passwrod");
ServicePointManager.Expect100Continue = false;
myRis.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap11;
CM5WebReference.CmSelectionCriteria cmSelection = new CM5WebReference.CmSelectionCriteria();
string stateInfo = ""; //is null? or....
csc.Class = "Any";
csc.Status = "Any";
csc.SelectBy = "Name";
CM5WebReference.SelectItem selectit = new CM5WebReference.SelectItem();
selectit.Item = "AppIpAddr";
CM5WebReference.SelectItem si = new CM5WebReference.SelectItem();
si.Item = "Name";
CM5WebReference.SelectItem[] sis = new CM5WebReference.SelectItem[2] { selectit,si };
csc.SelectItems = sis;
CM5WebReference.SelectCmDeviceResult a = myRis.SelectCmDevice(ref stateInfo, csc);
cmselectCri.SelectBy = "Name";
cmselectCri.Class = "Any";
if (a.CmNodes != null) //always null,it's so strange...
{
CM5WebReference.CmNode[] cn = a.CmNodes;
CM5WebReference.CmDevice[] cd = cn[0].CmDevices;
string ip = cd[0].IpAddress;
}
my entironment:
CM 5.0.4.1000-1
vs2005(C#)
07-11-2007 08:12 PM
We have CCM 4.2. The following aspx page works fine in our environment. I added a web reference to the service http://ccmServer/soap/RisPort.wsdl via VS2005 GUI.
There is a sample code in c#:
protected void Page_Load(object sender, EventArgs e)
{
CiscoRis.DeviceQueryService ris = new CiscoRis.DeviceQueryService();
ris.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["CcmUser"], ConfigurationManager.AppSettings["CcmPassword"]);
ris.Url = ConfigurationManager.AppSettings["CiscoRis.DeviceQueryService"];
CmSelectionCriteria filter = new CmSelectionCriteria();
filter.MaxReturnedDevices = uint.MaxValue;
filter.Class = DeviceClass.Phone;
filter.Model = 255; //any model
string stateInfo = null; //execution summary
SelectCmDeviceResult result = ris.SelectCmDevice(ref stateInfo, filter);
CmNode[] nodes = result.CmNodes;
CmDevice[] devices = nodes[0].CmDevices;
foreach (CmDevice device in devices)
{
Response.Write(device.IpAddress);
Response.Write("
");
}
}
Additional information about AXL Serviceability Programming is on
07-17-2007 10:04 AM
I have been able to successfully call DeviceQueryService using Eclipse'a auto generated Web Services Client (It uses Apache Axis to read a WSDL and generate all the code to call a web service). Took me 10 mins to be up and running. I am thinking to post a blog on it.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: