如何将SOAP基本身份验证请求添加到WSDL

我怎样才能将SOAP AUTH BASIC auth用于WSDL,那么谁读过WSDL知道我需要针对特定​​方法的操作?     
已邀请:
使用下面的示例我已经设法将SOAP基本身份验证传递给另一端的php webservice。 PHP.net/Soapclient有一个简单的工作示例,但在csharp中我发现这个链接是我的问题的解决方案。 链接 Michaelis.MockService是提取的Webservice库,您可以在以下位置看到有关如何执行此操作的示例: 链接Mono项目网站。
Michaelis.MockService service = new Michaelis.MockService();

// Create the network credentials and assign
// them to the service credentials
NetworkCredential netCredential = new NetworkCredential(“Inigo.Montoya”, “Ykmfptd”);
Uri uri = new Uri(service.Url);
ICredentials credentials = netCredential.GetCredential(uri, “Basic”);
service.Credentials = credentials;

// Be sure to set PreAuthenticate to true or else
// authentication will not be sent.
service.PreAuthenticate = true;

// Make the web service call.
service.Method();
    
据我所知,没有办法指明这一点。     

要回复问题请先登录注册