I'd like to call a method of a XML-RPC web service with a XML request containing the following fragment:
<member>
<name>filters</name>
<value><![CDATA[
<filterinstances>
<filterinstance type="date" comparison="equals">today</filterinstance>
</filterinstances>
]]></value>
</member>
To do this, I use a XML-RPC.net proxy and I pass the filters parameter as a string:
IGetReportData proxy = XmlRpcProxyGen.Create<IGetReportData>();
proxy.Url = "<* my url >*";
proxy.KeepAlive = false;
proxy.UseStringTag = false;
ReportDataParams rp = new ReportDataParams();
rp.show = "3";
rp.filters = "<![CDATA[<filterinstances><filterinstance type=\"date\" comparison=\"equals\">today</filterinstance></filterinstances>]]>";
string s = proxy.GetReportData("test", rp);
The ReportParams is defined as a struct.
public struct ReportDataParams
{
public string show;
public string filters;
}
The trouble is that XML-RPC.Net decodes the XML within the filters string. The following fragment is sent to the server:
<member>
<name>filters</name>
<value>
<string><![CDATA[<filterinstances><filterinstance type="date" comparison="equals">today</filterinstance></filterinstances>]]></string>
</value>
</member>
Is there any way to pass the CDATA xml fragment literally as a parameter to XML-RPC.Net?