All communication with StrikeIron is done using the SOAP extension. It is sometimes useful to view the XML exchanged with StrikeIron for debug purposes.
Every StrikeIron client (subclass of
Zend_Service_StrikeIron_Base) contains a
getSoapClient() method to return the underlying instance of
SOAPClient used to communicate with StrikeIron.
has a trace option that causes it to remember the
XML exchanged during the last transaction.
Zend_Service_StrikeIron does not enable the
trace option by default but this can easily by changed
by specifying the options that will be passed to the
new Zend_Service_StrikeIron(array('username' => 'your-username',
'password' => 'your-password',
'options' => array('trace' => true)));
// Get a client for the Sales & Use Tax Basic service
$taxBasic = $strikeIron->getService(array('class' => 'SalesUseTaxBasic'));
// Perform a method call
$taxBasic->getTaxRateCanada(array('province' => 'ontario'));
// Get SOAPClient instance and view XML
$soapClient = $taxBasic->getSoapClient();