|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis.client.Stub
com.avalara.avatax.services.base.BaseSvcSoapStub
com.avalara.avatax.services.address.AddressSvcSoapStub
public class AddressSvcSoapStub
Axis-generated class that implements the proxy interface AddressSvcSoap
for contacting 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.
Note: This class is not meant to be instantiated directly. Instead the preferred usage
is to obtain an instance of it (as a AddressSvcSoap
interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL)
method.
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
Field Summary |
---|
Fields inherited from class com.avalara.avatax.services.base.BaseSvcSoapStub |
---|
PASSWORD_TEXT_TYPE, WSSE_NAMESPACE |
Fields inherited from interface javax.xml.rpc.Stub |
---|
ENDPOINT_ADDRESS_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, USERNAME_PROPERTY |
Constructor Summary | |
---|---|
AddressSvcSoapStub()
Initializes a new instance of the class; preferred usage is to obtain an instance of it (as a AddressSvcSoap interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL) method. |
|
AddressSvcSoapStub(javax.xml.rpc.Service service)
Initializes a new instance of the class; preferred usage is to obtain an instance of it (as a AddressSvcSoap interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL) method. |
|
AddressSvcSoapStub(java.net.URL endpointURL,
javax.xml.rpc.Service service)
Initializes a new instance of the class; preferred usage is to obtain an instance of it (as a AddressSvcSoap interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL) method. |
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 class com.avalara.avatax.services.base.BaseSvcSoapStub |
---|
getProfile, getSecurity, setProfile, setSecurity |
Methods inherited from class org.apache.axis.client.Stub |
---|
_createCall, _getCall, _getProperty, _getPropertyNames, _getService, _setProperty, addAttachment, clearAttachments, clearHeaders, extractAttachments, getAttachments, getHeader, getHeaders, getPassword, getPortName, getResponseHeader, getResponseHeaders, getTimeout, getUsername, removeProperty, setHeader, setHeader, setMaintainSession, setPassword, setPortName, setPortName, setTimeout, setUsername |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.avalara.avatax.services.base.BaseSvcSoap |
---|
getProfile, getSecurity, setProfile, setSecurity |
Constructor Detail |
---|
public AddressSvcSoapStub() throws org.apache.axis.AxisFault
AddressSvcSoap
interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL)
method.
org.apache.axis.AxisFault
public AddressSvcSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
AddressSvcSoap
interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL)
method.
endpointURL
- service
-
org.apache.axis.AxisFault
public AddressSvcSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
AddressSvcSoap
interface via the
AddressSvcLocator.getAddressSvcSoap(java.net.URL)
method.
service
-
org.apache.axis.AxisFault
Method Detail |
---|
public ValidateResult validate(ValidateRequest validateRequest) throws java.rmi.RemoteException
AddressSvcSoap
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));
validate
in interface AddressSvcSoap
validateRequest
- a ValidateRequest
object
containing address data to be validated.
ValidateResult
object containing a
collection of zero or more validated addresses.
java.rmi.RemoteException
public PingResult ping(java.lang.String message) throws java.rmi.RemoteException
AddressSvcSoap
NOTE:This replaces TestConnection and is available on every service.
ping
in interface AddressSvcSoap
message
- for future use
PingResult
object
java.rmi.RemoteException
public IsAuthorizedResult isAuthorized(java.lang.String operations) throws java.rmi.RemoteException
AddressSvcSoap
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")
isAuthorized
in interface AddressSvcSoap
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 |