Hello,
I am using the following C# code to test the CDRonDemand API, but always get a The remote server returned an error: (500) Internal Server Error.
Should mention that the same request code is used for a PerfmonPort call and works like a charm; at this time i am not sure if the problem is with the headers and with the SOAP.
Can anybody spot any spot any issue on the code bellow?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("
https://xxx.xxx.xxx.xxx:8443/CDRonDemandService/services/CDRonDemand");
request.Method = "POST";
request.Headers.Add("Charset", "utf-8");
request.Accept = "application/soap+xml, application/dime, multipart/related, text/*";
request.UserAgent = "PerformanceMonitor";
request.Host = "xxx.xxx.xxx.xxx:8443";
request.Headers.Add("Authorization", "Basic " + Authorization);
request.ContentType = "text/xml; charset=utf-8";
request.Headers.Add("SOAPAction", "\"
http://schemas.cisco.com/ast/soap/action/#CDRonDemand#get_file_list\"");
request.ProtocolVersion = HttpVersion.Version11;
sAXLRequest = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
sAXLRequest += "<soap:Envelope xmlns:soap=\"
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\">";
sAXLRequest += "<soap:Body soap:encodingStyle=\"
http://schemas.xmlsoap.org/soap/encoding/\">";
sAXLRequest += "<tns:get_file_list>";
sAXLRequest += "<in0 xsi:type=\"xsd:string\">201204121000</in0>";
sAXLRequest += "<in1 xsi:type=\"xsd:string\">201204121050</in1>";
sAXLRequest += "<in2 xsi:type=\"xsd:boolean\">true</in2>";
sAXLRequest += "</tns:get_file_list>";
sAXLRequest += "</soap:Body>";
sAXLRequest += "</soap:Envelope>";
Thanks in advance,
Paulo Silva