03-10-2015 06:17 AM
Hi,
We are using RisPort API for getting device IP Address using https://CUCM_IP:8443/realtimeservice/services/RisPort.
Here is our piece of code-
CmSel.MaxReturnedDevices = 100;
CmSel.Status = "Registered";
CmSel.Class = "Phone";
CmSel.Model = 255; //Any
CmSel.SelectBy = "Name";
CmSel.SelectItems = arrSelItem;
string stateInfo = null;
SelDResult = Ris.SelectCmDevice(ref stateInfo, CmSel);
Ris.SelectCmDevice(ref stateInfo, CmSel) throws exception "The underlying connection was closed: An unexpected error occurred on a receive.".
Our CUCM version is 9.1.2. we checked https://CUCM_IP:8443/realtimeservice/services/RisPort in browser and it's running fine, wsdl is also displayed.
Can you please tell us what could be the possible cause? Is there any specific parameter in CUCM which we need to check?
Regards,
Umesh
03-10-2015 09:47 AM
Is this Java? I don't see what you created for arrSelItem.
03-10-2015 10:22 AM
No, It's C#.
arrSelItem is array of device names for which we want to fetch info.
arrSelItem = new RealTimeService.SelectItem(200);
Regards,
Umesh
03-10-2015 11:01 AM
Sorry, I'm not a C# guy, so I probably can't help you. But if I had to guess, that (arrSelItem) is the problem. In Java, there's a way to view what the XML is going to look like before you send it. There's probably a way to do that in C#, and that's what I would recommend. Previewing the XML will show you where things are going wrong.
Also - you're selecting by Name, right? Are you saying you're creating an array of 200 device names?
03-10-2015 11:57 AM
Using a tool like Fiddler to intercept the actual HTML request/response on the wire is also extremely helpful, as it will include the the HTTP headers (which are important.)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide