public static void GetTaxWithholdingAgreements()
{
var binding = new BasicHttpBinding();
//binding.OpenTimeout=new TimeSpan(0,0,5,0);
binding.SendTimeout=new TimeSpan(0,0,5,0);
binding.MaxReceivedMessageSize = Int32.MaxValue;
var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx"));
var req = new GetTaxWithholdingAgreementRequest();
req.Credentials = new bfsapi.Credentials
{
UserName = "user",
Password = "password"
};
req.identify = "identify";
req.Fields = new bfsapi.GetTaxWithholdingAgreementFields()
{
TaxCountry = true,
Person = true,
ExpirationDate = true
};
req.Args = new bfsapi.GetTaxWithholdingAgreementArgs()
{
TaxCounties = new []{"US"}
};
var resp = target.GetTaxWithholdingAgreements(req);
var s = "";
}