Skip to content

Commit 7ad239f

Browse files
minor fix
1 parent bd7ab4f commit 7ad239f

1 file changed

Lines changed: 8 additions & 20 deletions

File tree

rqlconnector/rqlactionwebservice.aspx

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
<%@ Page Language="C#" validateRequest="false" Debug="true" %>
2-
<%@ Import Namespace="System" %>
3-
<%@ Import Namespace="System.Net" %>
4-
<%@ Import Namespace="System.Xml" %>
5-
<%@ Import Namespace="System.Web" %>
1+
<%@ Page Language="C#" validateRequest="false" %>
62
<script runat="server">
7-
public class RqlWebServiceConnector
3+
public class RqlWebServiceConnector
84
{
95
public string SendRql(string Rql)
106
{
@@ -17,24 +13,24 @@
1713
if (string.IsNullOrEmpty(Rql))
1814
return "";
1915
20-
string WebServiceUri = GetWebServiceUrl();
16+
string WebServiceUri = this.GetWebServiceUrl();
2117
22-
string Response = SendRqlToWebService(WebServiceUri, Rql);
18+
string Response = this.SendRqlToWebService(WebServiceUri, Rql);
2319
2420
return Response;
2521
}
2622
2723
private string SendRqlToWebService(string WebServiceUrl, string Rql)
2824
{
29-
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(
25+
System.Net.ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(
3026
delegate
3127
{
3228
return true;
3329
}
3430
);
3531
3632
string Response = "";
37-
WebClient oWC = new WebClient();
33+
System.Net.WebClient oWC = new System.Net.WebClient();
3834
oWC.Headers.Add("Content-Type", "text/xml; charset=utf-8");
3935
oWC.Headers.Add("SOAPAction", "http://tempuri.org/RDCMSXMLServer/action/XmlServer.Execute");
4036
@@ -50,7 +46,7 @@
5046
return Response;
5147
}
5248
53-
private string GetWebServiceUrl()
49+
public string GetWebServiceUrl()
5450
{
5551
if (HttpContext.Current.Session["WebServiceUrl"] == null)
5652
{
@@ -62,7 +58,7 @@
6258
Rql += "<s:Body><q1:Execute xmlns:q1=\"http://tempuri.org/RDCMSXMLServer/message/\"><sParamA></sParamA><sErrorA></sErrorA><sResultInfoA></sResultInfoA></q1:Execute></s:Body>";
6359
Rql += "</s:Envelope>";
6460
65-
string Response = SendRqlToWebService(WebServiceUri.ToString(), Rql);
61+
string Response = this.SendRqlToWebService(WebServiceUri.ToString(), Rql);
6662
6763
if(Response == "")
6864
{
@@ -79,14 +75,6 @@
7975
8076
return HttpContext.Current.Session["WebServiceUrl"].ToString();
8177
}
82-
83-
private string XmlEscape(string unescaped)
84-
{
85-
XmlDocument doc = new XmlDocument();
86-
XmlNode node = doc.CreateElement("root");
87-
node.InnerText = unescaped;
88-
return node.InnerXml;
89-
}
9078
}
9179
</script>
9280
<%

0 commit comments

Comments
 (0)