Using RisPort WSDL - C# with RISService to make request - HTTP 505 Problem.

Unanswered Question
Apr 25th, 2008
User Badges:

Well, I decided to use the RisPort WSDL with C#.NET to make my requests.


I still have a HTTP 505 ERROR (Bad HTTP Version).


Here is my code :



List<String> listeNoeud = new List<string> { };

ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };

ServicePointManager.Expect100Continue = false;


RISService wsRis = new RISService();

wsRis.Credentials = new NetworkCredential(Login, Password);

wsRis.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap11;

wsRis.Url = @"https://" + Host + ":" + Port + "/realtimeservice/services/RisPort";


CmSelectionCriteria filtre = new CmSelectionCriteria();

filtre.MaxReturnedDevices = 20;

filtre.Class = DeviceClass.Phone.ToString();

filtre.Model = 255; //"Any" Model.


String stateInfo = null; // Execution summary


SelectCmDeviceResult result = wsRis.SelectCmDevice(ref stateInfo, filtre);

CmNode[] nodes = result.CmNodes;

CmDevice[] devices = nodes[0].CmDevices;


foreach (CmDevice device in devices)

{

listeNoeud.Add(device.LoginUserId);

}


return listeNoeud;




How could I use the HTTP VERSION 1.0 ? Where do I need to specify it ?



Config :

Call Manager 6.0.

Visual Studio 2008.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
stephane.lhp Fri, 04/25/2008 - 03:32
User Badges:

Here is the result of SNIFFING with WIRESHARK :


POST /realtimeservice/services/RisPort HTTP/1.1


User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)


VsDebuggerCausalityData: uIDoo44LS9aWDclCg356m9lojzEBBBBBU4GjxicVUkeMySxHTpRd7F3UXpR10IxAn6h5VQI7Cl0ACQAA


Content-Type: text/xml; charset=utf-8


SOAPAction: "http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice"


Host: 10.1.1.100:8443


Content-Length: 1015


Connection: Keep-Alive





<?xml version="1.0" encoding="utf-8"?>http://schemas.xmlsoap.org/soap/envelope/" 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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">SessionIdhttp://schemas.xmlsoap.org/soap/encoding/">4294967295Phone255

......




The problem is the FIRST line :


POST /realtimeservice/services/RisPort HTTP/1.1


How could I modify this header ?

How could I change HTTP/1.1 by HTTP/1.0 ??


Thanks in advance, I'm still stuck.

stephane.lhp Fri, 04/25/2008 - 06:08
User Badges:

Could you find me an answer to this ambiguous problem ???


I just use Cisco RisPort WSDL, with RISService object, and this object is not compatible with Cisco RisPort web service ... (because of HTTP 505 Error : Http Version not compatible, and I don't know how to change it to 1.0).


What's the problem ?

Vlad Polyakov Mon, 03/02/2015 - 12:19
User Badges:

I doubt that the problem is current for its author ( it's been 7 years now), but here is what actually happens in C#:

  1. There is no need to change HTTP protocol version
  2. Leave SOAP version to default (wsRis.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap11; is not needed and it in fact triggers HTTP error).
  3. Avoid using filtre.Class = DeviceClass.Any.ToString(); Actually, that enum, when auto generated from WSDL, does not contain all types (I had to manually alter the DeviceClass and add a   HuntList member

Actions

This Discussion