public const string WebServiceUrl = "https://xxx.xxx.com.tr/server/cms";
const string methodName = "PR_SWEP_URT_OTO_WS_KASKO_TEKLIF_POLICELENDIR";
doc.LoadXml(xmlRequest);
var req = (HttpWebRequest)WebRequest.Create(Constants.WebServiceUrl);
req.Headers.Add("SOAPAction", Constants.WebServiceUrl + "/" + methodName);
req.Headers.Add("Operation", methodName);
req.Headers.Add("Style", "RPC");
req.ContentType = "text/xml;charset=\"utf-8\"";
req.Accept = "text/xml";
req.Method = "POST";
var stream = req.GetRequestStream();
doc.Save(stream);
stream.Close();
public const string WebServiceUrl = "http://xx.xx.xxx.xxx:xxxx/PolServis";
const string methodName = "getKaskoPolice";
doc.LoadXml(xmlRequest);
var req = (HttpWebRequest)WebRequest.Create(Constants.WebServiceUrl + "/services/KaskoPoliceServis?wsdl");
req.Headers.Add("SOAPAction", Constants.WebServiceUrl + "/" + methodName);
req.Headers.Add("Operation", methodName);
req.Headers.Add("Style", "RPC");
req.ContentType = "text/xml;charset=\"utf-8\"";
req.Accept = "text/xml";
req.Method = "POST";
var stream = req.GetRequestStream();
doc.Save(stream);
stream.Close();
consuming web service using webrequest
Gönderen
pantepember
23 Ağustos 2011 Salı
Etiketler: HttpWebRequest , web service , WebRequest