CC: | peter.sandin [...] ziprecruiter.com |
Subject: | decode error in XML::Compile::Translate::Reader when element with value 0 follows subtree |
Using XML::Compile::WSDL11 in conjunction with the Avalara tax service at https://development.avalara.net/tax/taxsvc.wsdl (docs here: http://developer.avalara.com/api-reference).
I'm getting an "error: decode error: data for element or block starting with `ExemptCertId' missing at tns:GetTaxResponse/GetTaxResult/TaxLines/TaxLine" error in the response to a GetTax operation.
I've attached a text file containing the error, SOAP request and SOAP response. My guess is that a bug is being triggered because the ExemptCertId has a text value of 0 and follows the TaxDetails subtree, but I'm not 100% sure.
Thanks!
Subject: | avalara_out.txt |
error: decode error: data for element or block starting with `ExemptCertId' missing at tns:GetTaxResponse/GetTaxResult/TaxLines/TaxLine
User-Agent: libwww-perl/6.08
Content-Length: 2634
Content-Type: text/xml; charset="utf-8"
SOAPAction: http://avatax.avalara.com/services/GetTax
X-LWP-Version: 6.08
X-XML-Compile-Cache-Version: 1.03
X-XML-Compile-SOAP-Version: 3.07
X-XML-Compile-Version: 1.48
X-XML-LibXML-Version: 2.0116
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<tns:Profile xmlns:tns="http://avatax.avalara.com/services">
<tns:Client>./avalara_test.pl,</tns:Client>
<tns:Adapter>WebService::Avalara::AvaTax,0.013</tns:Adapter>
<tns:Machine>www.ziprecruiter-mjg.com</tns:Machine>
</tns:Profile>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>mjg@ziprecruiter.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">FAQ63/dipped</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tns:GetTax xmlns:tns="http://avatax.avalara.com/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:GetTaxRequest>
<tns:CompanyCode>zrinc</tns:CompanyCode>
<tns:DocType>SalesInvoice</tns:DocType>
<tns:DocDate>2015-03-16</tns:DocDate>
<tns:CustomerCode>test</tns:CustomerCode>
<tns:Discount>0</tns:Discount>
<tns:OriginCode>0</tns:OriginCode>
<tns:DestinationCode>1</tns:DestinationCode>
<tns:Addresses>
<tns:BaseAddress>
<tns:AddressCode>0</tns:AddressCode>
<tns:Line1>1453 3rd St Ste 335</tns:Line1>
<tns:City>Santa Monica</tns:City>
<tns:PostalCode>90401-3425</tns:PostalCode>
<tns:TaxRegionId>0</tns:TaxRegionId>
</tns:BaseAddress>
<tns:BaseAddress>
<tns:AddressCode>1</tns:AddressCode>
<tns:Line1>57 Mattix Run</tns:Line1>
<tns:City>Galloway</tns:City>
<tns:PostalCode>08205</tns:PostalCode>
<tns:TaxRegionId>0</tns:TaxRegionId>
</tns:BaseAddress>
</tns:Addresses>
<tns:Lines>
<tns:Line>
<tns:No>1</tns:No>
<tns:OriginCode>0</tns:OriginCode>
<tns:ItemCode>no-plan-trafficboost</tns:ItemCode>
<tns:Qty>1</tns:Qty>
<tns:Amount>95</tns:Amount>
<tns:Discounted>false</tns:Discounted>
</tns:Line>
<tns:Line>
<tns:No>2</tns:No>
<tns:OriginCode>0</tns:OriginCode>
<tns:ItemCode>np-plan-trafficboost</tns:ItemCode>
<tns:Qty>1</tns:Qty>
<tns:Amount>245</tns:Amount>
<tns:Discounted>false</tns:Discounted>
</tns:Line>
</tns:Lines>
<tns:DetailLevel>Tax</tns:DetailLevel>
<tns:HashCode>0</tns:HashCode>
<tns:Commit>false</tns:Commit>
<tns:ServiceMode>Automatic</tns:ServiceMode>
<tns:PaymentDate>2015-03-16</tns:PaymentDate>
<tns:ExchangeRate>1</tns:ExchangeRate>
<tns:ExchangeRateEffDate>2015-03-16</tns:ExchangeRateEffDate>
</tns:GetTaxRequest>
</tns:GetTax>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Date: Tue, 17 Mar 2015 18:21:07 GMT
Content-Length: 3733
Content-Type: text/xml; charset=utf-8
Client-Date: Tue, 17 Mar 2015 18:20:45 GMT
Client-Peer: 204.76.29.84:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
Client-SSL-Cert-Subject: /C=US/ST=Washington/L=Bainbridge Island/O=Avalara, Inc./OU=Terms of use at www.verisign.com/rpa (c)05/CN=development.avalara.net
Client-SSL-Cipher: RC4-SHA
Client-SSL-Socket-Class: Net::SSL
Client-SSL-Warning: Peer certificate not verified
Set-Cookie: TS6198e2=fa0bf0571553458f5795eeb04c4c4bc267e5e49c255bd1e455087093; Path=/
Set-Cookie: TS6198e2_28=832b11d6c45bb9d68b1560524d854e2967e5e49c255bd1e4000000000000000000550870939bd2121bb385b8ca; Path=/
X-Powered-By: ASP.NET
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetTaxResponse xmlns="http://avatax.avalara.com/services">
<GetTaxResult>
<TransactionId>1035423622</TransactionId>
<ResultCode>Success</ResultCode>
<DocId>76776081</DocId>
<DocType>SalesInvoice</DocType>
<DocCode>62b6dd01-89f9-4a83-88c4-2a51133961a0</DocCode>
<DocDate>2015-03-16</DocDate>
<DocStatus>Saved</DocStatus>
<Reconciled>false</Reconciled>
<Timestamp>2015-03-17T18:21:07.613</Timestamp>
<TotalAmount>340</TotalAmount>
<TotalDiscount>0</TotalDiscount>
<TotalExemption>0</TotalExemption>
<TotalTaxable>340</TotalTaxable>
<TotalTax>23.8</TotalTax>
<TotalTaxCalculated>23.8</TotalTaxCalculated>
<HashCode>0</HashCode>
<TaxLines>
<TaxLine>
<No>1</No>
<TaxCode>DA010000</TaxCode>
<Taxability>true</Taxability>
<BoundaryLevel>Address</BoundaryLevel>
<Exemption>0</Exemption>
<Discount>0</Discount>
<Taxable>95</Taxable>
<Rate>0.070000</Rate>
<Tax>6.65</Tax>
<TaxCalculated>6.65</TaxCalculated>
<TaxIncluded>false</TaxIncluded>
<TaxDetails>
<TaxDetail>
<Country>US</Country>
<Region>NJ</Region>
<JurisType>State</JurisType>
<JurisCode>34</JurisCode>
<TaxType>Sales</TaxType>
<Base>95</Base>
<Taxable>95</Taxable>
<Rate>0.070000</Rate>
<Tax>6.65</Tax>
<TaxCalculated>6.65</TaxCalculated>
<NonTaxable>0</NonTaxable>
<Exemption>0</Exemption>
<JurisName>NEW JERSEY</JurisName>
<TaxName>NJ STATE TAX</TaxName>
<TaxAuthorityType>45</TaxAuthorityType>
<TaxGroup/>
<RateType>G</RateType>
<StateAssignedNo/>
</TaxDetail>
</TaxDetails>
<ExemptCertId>0</ExemptCertId>
<TaxDate>2015-03-16</TaxDate>
<ReportingDate>2015-03-16</ReportingDate>
<AccountingMethod>Accrual</AccountingMethod>
</TaxLine>
<TaxLine>
<No>2</No>
<TaxCode>P0000000</TaxCode>
<Taxability>true</Taxability>
<BoundaryLevel>Address</BoundaryLevel>
<Exemption>0</Exemption>
<Discount>0</Discount>
<Taxable>245</Taxable>
<Rate>0.070000</Rate>
<Tax>17.15</Tax>
<TaxCalculated>17.15</TaxCalculated>
<TaxIncluded>false</TaxIncluded>
<TaxDetails>
<TaxDetail>
<Country>US</Country>
<Region>NJ</Region>
<JurisType>State</JurisType>
<JurisCode>34</JurisCode>
<TaxType>Sales</TaxType>
<Base>245</Base>
<Taxable>245</Taxable>
<Rate>0.070000</Rate>
<Tax>17.15</Tax>
<TaxCalculated>17.15</TaxCalculated>
<NonTaxable>0</NonTaxable>
<Exemption>0</Exemption>
<JurisName>NEW JERSEY</JurisName>
<TaxName>NJ STATE TAX</TaxName>
<TaxAuthorityType>45</TaxAuthorityType>
<TaxGroup/>
<RateType>G</RateType>
<StateAssignedNo/>
</TaxDetail>
</TaxDetails>
<ExemptCertId>0</ExemptCertId>
<TaxDate>2015-03-16</TaxDate>
<ReportingDate>2015-03-16</ReportingDate>
<AccountingMethod>Accrual</AccountingMethod>
</TaxLine>
</TaxLines>
<TaxAddresses>
<TaxAddress>
<Address>57 Mattix Run</Address>
<AddressCode>1</AddressCode>
<BoundaryLevel>0</BoundaryLevel>
<City>Galloway</City>
<Country>US</Country>
<PostalCode>08205</PostalCode>
<Region>NJ</Region>
<TaxRegionId>2118369</TaxRegionId>
<JurisCode>3400000000</JurisCode>
<Latitude/>
<Longitude/>
<GeocodeType>StreetLevel</GeocodeType>
<ValidateStatus>NormalHit</ValidateStatus>
<DistanceToBoundary>0</DistanceToBoundary>
</TaxAddress>
<TaxAddress>
<Address>1453 3rd St Ste 335</Address>
<AddressCode>0</AddressCode>
<BoundaryLevel>2</BoundaryLevel>
<City>Santa Monica</City>
<Country>US</Country>
<PostalCode>90401-3425</PostalCode>
<Region>CA</Region>
<TaxRegionId>0</TaxRegionId>
<JurisCode>0600000000</JurisCode>
<Latitude/>
<Longitude/>
<GeocodeType/>
<ValidateStatus>Not Validated</ValidateStatus>
<DistanceToBoundary>0</DistanceToBoundary>
</TaxAddress>
</TaxAddresses>
<Locked>false</Locked>
<AdjustmentReason>0</AdjustmentReason>
<AdjustmentDescription/>
<Version>1</Version>
<TaxDate>2015-03-16</TaxDate>
<TaxSummary/>
<VolatileTaxRates>false</VolatileTaxRates>
</GetTaxResult>
</GetTaxResponse>
</s:Body>
</s:Envelope>