Ohio also has a web service for tax rates and some sample code. Can anyone give me any clues about how this would integrate with Able? Here is their sample code:
Code: Select all
Sample code for .Net
To help developers get a head start in consuming the web services, we have provided some sample .Net C# code. Our web service implements the open standard of WS-Security for authentication. This code sample and instructions are provided for users of Visual Studio.Net. If you are using some other development tool, you will have to alter the instructions accordingly.
Install the latest version of Microsoft's Web Services Extensions (WSE)
Create a new project in Visual Studio.Net
From within Visual Studio, add a web reference to https://thefinder.tax.ohio.gov/OHFinderService/OHFinderService.asmx.
With WSE installed, it will also generate WSE versions of web service stubs.
Try out the sample code, substituting valid login/address data for the values in [brackets].
// Create new instance of web service reference using WSE
OHFinderServiceWse finderService = new OHFinderServiceWse();
// Create authentication token
UsernameToken tkn = new UsernameToken("[username]", "[password]",
PasswordOption.SendPlainText);
// Add authentication token to web service request
finderService.RequestSoapContext.Security.Tokens.Add(tkn);
// Create new date for method calls
DateTime todayDate = new DateTime();
// Tax rate lookup by address...
Finder.AddressReturn addressReturn = finderService.GetOHSalesTaxByAddress(
"[address]", "[city]", "[state abbr]", "[postal code]", "US",
[tax amount], todayDate, [true/false]);
// addressReturn.addressResponse contains the standardized address
// addressReturn.taxResponse contains an array of tax return values
// Tax rate lookup by zip code...
Finder.ZipCodeReturn zipReturn = finderService.GetOHSalesTaxByZipCode(
"[postal code]", [tax amount], todayDate, [true/false]);
// zipReturn.zipResponse contains the original zip code queried
// zipReturn.taxResponse contains an array of tax return values