Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.93 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Web service reference with different URL for every user
  2. DefectsService.Defect defect = new DefectsService.Defect();
  3. defect.Name = mo.DefectName;
  4. defect.DateFound = DateTime.Now;
  5. noDefect = new DefectsService.DefectHandler().AddDefect(mo.Guid, defect);
  6. //DefectsService is the name of the service which I give when I add the reference
  7.        
  8. class Program : System.Web.Services.Protocols.SoapHttpClientProtocol
  9. {
  10.     public Program()
  11.     {
  12.         this.Url = "";//url entered from every user
  13.     }
  14.     static void Main(string[] args)
  15.     {
  16.         DefectsService.Defect d = new DefectsService.Defect();
  17.         defect.Name = mo.DefectName;
  18.         defect.DateFound = DateTime.Now;
  19.         noDefect = new DefectsService.DefectHandler().AddDefect(mo.Guid, defect);
  20.         //DefectsService is the name of the service which I give when I add the reference
  21.     }
  22. }
  23.        
  24. DefectsService.Defect defect = new DefectsService.Defect();
  25. defect.Url = "theurlgoeshere";