Are you just wanting to override the URL that is in the config to a different url. Say you have a test service and a live service. You can just do this.
client.Endpoint.Address = new EndpointAddress(Server.IsLiveServer() ?
@"LiveUrl" : @"TestURl");
Where those url come from wherever you want
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…