Invoking WCF service methods without having a proxy
问题 Is there anyway I can invoke a WCF service without adding service reference or even having a proxy at all. 回答1: You can invoke the service using a HttpWebRequest. Example below:- private static XDocument CallSoapServiceInternal(string uri, string soapAction, string contentType, XDocument reqXml) { var req = (HttpWebRequest)WebRequest.Create(uri); req.ContentType = contentType; req.Method = "POST"; req.Headers.Add("SOAPAction", soapAction); req.Credentials = CredentialCache.DefaultCredentials;