HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(pUrl);
httpWebRequest.Headers.Add("SOAPAction", "service");
httpWebRequest.ContentType = "text/
xml; charset=utf-8";
httpWebRequest.Method = "POST";
httpWebRequest.ClientCertificates.Add(new X509Certificate2(pCertificate, pCertificatePassword));
Byte[] postDataBytes = Encoding.UTF8.GetBytes(postData);
httpWebRequest.ContentLength = postDataBytes.Length;
Stream requestStream = httpWebRequest.GetRequestStream();
requestStream.Write(postDataBytes, 0, postDataBytes.Length);
requestStream.Close();
HttpWebResponse resp = (HttpWebResponse)httpWebRequest.GetResponse();
StreamReader sr = new StreamReader(resp.GetResponseStream());
string result = sr.ReadToEnd();
pUrl =
URL für den Webservice
pCertificate = Dateiname des Zertifikates
uCertificatePassword = Kennwort des Zertifikates
postData = komplettes
XML-Dokument (Envelope)