|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AddressSvcSoap
Proxy interface for the Avalara Address Web Service. Requires a Web Service Deployment Descriptor (WSDD) configuration file at creation time named (for example the sample file avatax4j.wsdd) in the same directory as the project is running. The values in the file will be loaded as the default configuration information.
Example:
[Java] EngineConfiguration config = new FileProvider("avatax4j.wsdd"); AddressSvc AddressSvc = new AddressSvcLocator(config); AddressSvcSoap port = AddressSvc.getAddressSvcSoap(new URL("http://www.avalara.com/services/")); // Set the profile Profile profile = new Profile(); profile.setClient("AddressSvcTest,4.0.0.0"); port.setProfile(profile); // Set security Security security = new Security(); security.setAccount("account"); security.setLicense("license number"); port.setSecurity(security);
EngineConfiguration
,
FileProvider
Method Summary | |
---|---|
IsAuthorizedResult |
isAuthorized(java.lang.String operations)
Checks authentication of and authorization to one or more operations on the service. |
PingResult |
ping(java.lang.String message)
Verifies connectivity to the web service and returns version information about the service. |
ValidateResult |
validate(ValidateRequest validateRequest)
Validates an address and returns a collection of possible ValidAddress objects in a ValidateResult object. |
Methods inherited from interface com.avalara.avatax.services.base.BaseSvcSoap |
---|
getProfile, getSecurity, setProfile, setSecurity |
Method Detail |
---|
ValidateResult validate(ValidateRequest validateRequest) throws java.rmi.RemoteException
ValidAddress
objects in a ValidateResult
object.
The ValidateRequest object includes a TextCase
property that determines the casing applied to a validated
address. It defaults to TextCase.Default
.
Example:
[Java] EngineConfiguration config = new FileProvider("avatax4j.wsdd"); AddressSvcLocator AddressSvc = new AddressSvcLocator(config); AddressSvcSoap port = AddressSvc.getAddressSvcSoap(new URL("http://www.avalara.com/services/")); // Set the profile Profile profile = new Profile(); profile.setClient("AddressSvcTest,4.0.0.0"); port.setProfile(profile); // Set security Security security = new Security(); security.setAccount("account"); security.setLicense("license number"); port.setSecurity(security); ValidateRequest request = new ValidateRequest(); Address address = new Address(); address.setLine1("900 Winslow Way"); address.setLine2("Suite 130"); address.setCity("Bainbridge Is"); address.setRegion("WA"); address.setPostalCode("98110-2450"); request.setAddress(address); request.setTextCase(TextCase.Upper); ValidateResult result; result = port.validate(request); Address[] addresses = result.getValidAddresses().getValidAddress(); System.out.println("Number of addresses returned is " + addresses == null ? "0" : Integer.toString(addresses.length));
validateRequest
- a ValidateRequest
object
containing address data to be validated.
ValidateResult
object containing a
collection of zero or more validated addresses.
java.rmi.RemoteException
PingResult ping(java.lang.String message) throws java.rmi.RemoteException
NOTE:This replaces TestConnection and is available on every service.
message
- for future use
PingResult
object
java.rmi.RemoteException
IsAuthorizedResult isAuthorized(java.lang.String operations) throws java.rmi.RemoteException
This operation allows pre-authorization checking of any or all operations. It will return a comma delimited set of operation names which will be all or a subset of the requested operation names. For security, it will never return operation names other than those requested (no phishing allowed).
Example:
isAuthorized("GetTax,PostTax")
operations
- a comma-delimited list of operation names
IsAuthorizedResult
object
java.rmi.RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |