Guest User

Untitled

a guest
Jun 23rd, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using System.Web.Services.Protocols;
  2.  
  3. public class SoapAuthHeader : SoapHeader
  4. {
  5. public string Username;
  6. public string Password;
  7. }
  8.  
  9. public class MyWebServicesProxy : System.Web.Services.Protocols.SoapHttpClientProtocol {
  10.  
  11. public SoapAuthHeader AuthHeader;
  12.  
  13. ...
  14.  
  15. }
  16.  
  17. SoapAuthHeader authHeader = new SoapAuthHeader();
  18. authHeader.Username = "username";
  19. authHeader.Password = "password";
  20.  
  21. MyWebServicesProxy myProxy = new MyWebServicesProxy();
  22. myProxy.AuthHeader = authHeader;
Add Comment
Please, Sign In to add comment