com.avalara.avatax.services.tax
Class TaxSvcLocator

java.lang.Object
  extended by org.apache.axis.client.Service
      extended by com.avalara.avatax.services.tax.TaxSvcLocator
All Implemented Interfaces:
TaxSvc, java.io.Serializable, javax.naming.Referenceable, javax.xml.rpc.Service

public class TaxSvcLocator
extends org.apache.axis.client.Service
implements TaxSvc

Class that implements the TaxSvc interface and is used to create a local proxy (interface) to interact with Avalara's Tax Web Service.

 Example:
 [Java]
 EngineConfiguration config = new FileProvider("avatax4j.wsdd");
 TaxSvcLocator taxSvcLoc = new TaxSvcLocator(config);

 TaxSvcSoap svc = taxSvcLoc.getTaxSvcSoap(new URL("http://www.avalara.com/services/"));

 // Set the profile
 Profile profile = new Profile();
 profile.setClient("TaxSvcTest,4.0.0.0");
 svc.setProfile(profile);

 // Set security
 Security security = new Security();
 security.setAccount("account");
 security.setLicense("license number");
 svc.setSecurity(security);

 IsAuthorizedResult result = svc.isAuthorized("GetTax,PostTax");

 

See Also:
Serialized Form

Constructor Summary
TaxSvcLocator()
          Initializes a new instance of the class.
TaxSvcLocator(org.apache.axis.EngineConfiguration config)
          Initializes a new instance of the class.
TaxSvcLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName)
          Initializes a new instance of the class.
 
Method Summary
 java.rmi.Remote getPort(java.lang.Class serviceEndpointInterface)
          This method is used internally by the adapter and not intended to be used by external implementation code.
 java.rmi.Remote getPort(javax.xml.namespace.QName portName, java.lang.Class serviceEndpointInterface)
          This method is used internally by the adapter and not intended to be used by external implementation code.
 java.util.Iterator getPorts()
           
 javax.xml.namespace.QName getServiceName()
          This method is used internally by the adapter and not intended to be used by external implementation code.
 TaxSvcSoap getTaxSvcSoap()
          Gets the AddressService Proxy object (TaxSvcSoap) that communicates with Avalara's Tax Web service at default URL.
 TaxSvcSoap getTaxSvcSoap(java.net.URL portAddress)
          Gets the AddressService Proxy object (TaxSvcSoap) that communicates with Avalara's Tax Web service at the URL specified.
 java.lang.String getTaxSvcSoapAddress()
          Gets the current default URL that any tax service proxy (implementing TaxSvcSoap interface) created by this object will use to find a corresponding Tax Web Service to contact.
 java.lang.String getTaxSvcSoapWSDDServiceName()
          Gets the WSDD Service Name; This method is used internally by the adapter and not intended to be used by external implementation code.
 void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address)
          This method is used internally by the adapter and not intended to be used by external implementation code.
 void setEndpointAddress(java.lang.String portName, java.lang.String address)
          This method is used internally by the adapter and not intended to be used by external implementation code.
 void setTaxSvcSoapEndpointAddress(java.lang.String address)
          This method is used internally by the adapter and not intended to be used by external implementation code.
 void setTaxSvcSoapWSDDServiceName(java.lang.String name)
          Sets the WSDD Service Name; This method is used internally by the adapter and not intended to be used by external implementation code.
 
Methods inherited from class org.apache.axis.client.Service
createCall, createCall, createCall, createCall, getCacheWSDL, getCall, getCalls, getEngine, getHandlerRegistry, getMaintainSession, getPort, getReference, getTypeMappingRegistry, getWSDLDocumentLocation, getWSDLParser, setCacheWSDL, setEngine, setEngineConfiguration, setMaintainSession, setTypeMappingRegistry, setTypeMappingVersion
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.rpc.Service
createCall, createCall, createCall, createCall, getCalls, getHandlerRegistry, getTypeMappingRegistry, getWSDLDocumentLocation
 

Constructor Detail

TaxSvcLocator

public TaxSvcLocator()
Initializes a new instance of the class.


TaxSvcLocator

public TaxSvcLocator(org.apache.axis.EngineConfiguration config)
Initializes a new instance of the class.

Parameters:
config -

TaxSvcLocator

public TaxSvcLocator(java.lang.String wsdlLoc,
                     javax.xml.namespace.QName sName)
              throws javax.xml.rpc.ServiceException
Initializes a new instance of the class.

Parameters:
wsdlLoc -
sName -
Throws:
javax.xml.rpc.ServiceException
Method Detail

getTaxSvcSoapAddress

public java.lang.String getTaxSvcSoapAddress()
Gets the current default URL that any tax service proxy (implementing TaxSvcSoap interface) created by this object will use to find a corresponding Tax Web Service to contact.

Specified by:
getTaxSvcSoapAddress in interface TaxSvc
Returns:
String representation of the default Tax Service URL.

getTaxSvcSoapWSDDServiceName

public java.lang.String getTaxSvcSoapWSDDServiceName()
Gets the WSDD Service Name; This method is used internally by the adapter and not intended to be used by external implementation code.

Returns:

setTaxSvcSoapWSDDServiceName

public void setTaxSvcSoapWSDDServiceName(java.lang.String name)
Sets the WSDD Service Name; This method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
name -

getTaxSvcSoap

public TaxSvcSoap getTaxSvcSoap()
                         throws javax.xml.rpc.ServiceException
Gets the AddressService Proxy object (TaxSvcSoap) that communicates with Avalara's Tax Web service at default URL.

Specified by:
getTaxSvcSoap in interface TaxSvc
Returns:
Tax Service Proxy
Throws:
javax.xml.rpc.ServiceException

getTaxSvcSoap

public TaxSvcSoap getTaxSvcSoap(java.net.URL portAddress)
                         throws javax.xml.rpc.ServiceException
Gets the AddressService Proxy object (TaxSvcSoap) that communicates with Avalara's Tax Web service at the URL specified.

Specified by:
getTaxSvcSoap in interface TaxSvc
Parameters:
portAddress -
Returns:
Tax Service Proxy
Throws:
javax.xml.rpc.ServiceException

setTaxSvcSoapEndpointAddress

public void setTaxSvcSoapEndpointAddress(java.lang.String address)
This method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
address -

getPort

public java.rmi.Remote getPort(java.lang.Class serviceEndpointInterface)
                        throws javax.xml.rpc.ServiceException
This method is used internally by the adapter and not intended to be used by external implementation code. For the given interface, get the stub implementation. If this service has no port for the given interface, then ServiceException is thrown.

Specified by:
getPort in interface javax.xml.rpc.Service
Overrides:
getPort in class org.apache.axis.client.Service
Parameters:
serviceEndpointInterface -
Returns:
Throws:
javax.xml.rpc.ServiceException

getPort

public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
                               java.lang.Class serviceEndpointInterface)
                        throws javax.xml.rpc.ServiceException
This method is used internally by the adapter and not intended to be used by external implementation code. For the given interface, get the stub implementation. If this service has no port for the given interface, then ServiceException is thrown.

Specified by:
getPort in interface javax.xml.rpc.Service
Overrides:
getPort in class org.apache.axis.client.Service
Parameters:
portName -
serviceEndpointInterface -
Returns:
Throws:
javax.xml.rpc.ServiceException

getServiceName

public javax.xml.namespace.QName getServiceName()
This method is used internally by the adapter and not intended to be used by external implementation code.

Specified by:
getServiceName in interface javax.xml.rpc.Service
Overrides:
getServiceName in class org.apache.axis.client.Service
Returns:
Iterator over the collection of ports.

getPorts

public java.util.Iterator getPorts()
Specified by:
getPorts in interface javax.xml.rpc.Service
Overrides:
getPorts in class org.apache.axis.client.Service
Returns:

setEndpointAddress

public void setEndpointAddress(java.lang.String portName,
                               java.lang.String address)
                        throws javax.xml.rpc.ServiceException
This method is used internally by the adapter and not intended to be used by external implementation code. Set the endpoint address for the specified port name.

Parameters:
portName -
address -
Throws:
javax.xml.rpc.ServiceException

setEndpointAddress

public void setEndpointAddress(javax.xml.namespace.QName portName,
                               java.lang.String address)
                        throws javax.xml.rpc.ServiceException
This method is used internally by the adapter and not intended to be used by external implementation code. Set the endpoint address for the specified port name.

Parameters:
portName -
address -
Throws:
javax.xml.rpc.ServiceException