写过的一段代码,仅供参考:
// Post xml to NAM server(URL in code table, Code Category : PSI_EASY, Code id : NAM_URL get the digital signature
MSXML2.ServerXMLHTTPClass lxmlhttp = new MSXML2.ServerXMLHTTPClass();
int iXMLTimeOut = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["XmlTimeOut"].ToString());
lxmlhttp.setTimeouts(iXMLTimeOut, iXMLTimeOut, iXMLTimeOut, iXMLTimeOut);
lxmlhttp.open("POST",xmlDS.EASY_CONST[0].EASY_NAM_URL, null, null, null); // NAM_URL
lxmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
lxmlhttp.send("plaintext=" + HttpUtility.UrlEncode(xml,System.Text.UTF8Encoding.UTF8));
lxmlhttp.waitForResponse(iXMLTimeOut);
while ( lxmlhttp.readyState < 4 )
{
}
string digitalSignature = lxmlhttp.responseText;
lxmlhttp=null;