
Untitled
By: a guest on
May 6th, 2012 | syntax:
None | size: 0.93 KB | hits: 13 | expires: Never
Web service reference with different URL for every user
DefectsService.Defect defect = new DefectsService.Defect();
defect.Name = mo.DefectName;
defect.DateFound = DateTime.Now;
noDefect = new DefectsService.DefectHandler().AddDefect(mo.Guid, defect);
//DefectsService is the name of the service which I give when I add the reference
class Program : System.Web.Services.Protocols.SoapHttpClientProtocol
{
public Program()
{
this.Url = "";//url entered from every user
}
static void Main(string[] args)
{
DefectsService.Defect d = new DefectsService.Defect();
defect.Name = mo.DefectName;
defect.DateFound = DateTime.Now;
noDefect = new DefectsService.DefectHandler().AddDefect(mo.Guid, defect);
//DefectsService is the name of the service which I give when I add the reference
}
}
DefectsService.Defect defect = new DefectsService.Defect();
defect.Url = "theurlgoeshere";