"Could not parse the XML from Ava Tax"

General ShopSite user discussion

"Could not parse the XML from Ava Tax"

Postby wmbaskets » Wed Jun 26, 2013 6:21 pm

Hello

My site: http://www.wonderfullymadebaskets.com/store

When customers add a product to their cart, they are prompted to type in their zip code. Then they get two messages:

"Shipping Rates have been recalculated based upon your zip code.
Please review them before continuing with your order. "

-and-

"Please Select a Payment option"

Once they select a payment option and press "Checkout" they get this error:

"Could not parse the XML from Ava Tax"

I spoke with Avalara -they were able to verify on their end that they are receiving the correct XML data from my site and they verified that AvaTax is sending the correct XML back to my site.

Here are the XML files Avalara sent me:

XML out:
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <GetTaxResponse xmlns="http://avatax.avalara.com/services">
- <GetTaxResult>
<TransactionId>0</TransactionId>
<ResultCode>Success</ResultCode>
<DocId>0</DocId>
<DocType>SalesOrder</DocType>
<DocCode>10008-1372255781</DocCode>
<DocDate>2013-06-26</DocDate>
<DocStatus>Temporary</DocStatus>
<Reconciled>false</Reconciled>
<Timestamp>2013-06-26T14:09:42.8922191Z</Timestamp>
<TotalAmount>46.59</TotalAmount>
<TotalDiscount>0</TotalDiscount>
<TotalExemption>0</TotalExemption>
<TotalTaxable>46.59</TotalTaxable>
<TotalTax>2.1</TotalTax>
<TotalTaxCalculated>2.1</TotalTaxCalculated>
<HashCode>1464585</HashCode>
- <TaxLines>
- <TaxLine>
<No>1</No>
<TaxCode>P0000000</TaxCode>
<Taxability>true</Taxability>
<BoundaryLevel>Zip5</BoundaryLevel>
<Exemption>0</Exemption>
<Discount>0</Discount>
<Taxable>39.99</Taxable>
<Rate>0.045000</Rate>
<Tax>1.8</Tax>
<TaxCalculated>1.8</TaxCalculated>
<TaxIncluded>false</TaxIncluded>
<TaxDetails />
<ExemptCertId>0</ExemptCertId>
<TaxDate>2013-06-26</TaxDate>
<ReportingDate>2013-06-26</ReportingDate>
<AccountingMethod>Accrual</AccountingMethod>
</TaxLine>
- <TaxLine>
<No>Ship</No>
<TaxCode>FR</TaxCode>
<Taxability>true</Taxability>
<BoundaryLevel>Zip5</BoundaryLevel>
<Exemption>0</Exemption>
<Discount>0</Discount>
<Taxable>6.6</Taxable>
<Rate>0.045000</Rate>
<Tax>0.3</Tax>
<TaxCalculated>0.3</TaxCalculated>
<TaxIncluded>false</TaxIncluded>
<TaxDetails />
<ExemptCertId>0</ExemptCertId>
<TaxDate>2013-06-26</TaxDate>
<ReportingDate>2013-06-26</ReportingDate>
<AccountingMethod>Accrual</AccountingMethod>
</TaxLine>
</TaxLines>
- <TaxAddresses>
- <TaxAddress>
<Address />
<AddressCode>Dest</AddressCode>
<BoundaryLevel>2</BoundaryLevel>
<City />
<Country>US</Country>
<PostalCode>80007</PostalCode>
<Region>CO</Region>
<TaxRegionId>2114763</TaxRegionId>
<JurisCode>0805900000</JurisCode>
<Latitude />
<Longitude />
<GeocodeType>ZIP5Centroid</GeocodeType>
<ValidateStatus>StreetNotInCity</ValidateStatus>
<DistanceToBoundary>0</DistanceToBoundary>
</TaxAddress>
- <TaxAddress>
<Address>3504 W 112TH CIR</Address>
<AddressCode>Origin</AddressCode>
<BoundaryLevel>0</BoundaryLevel>
<City>WESTMINSTER</City>
<Country>US</Country>
<PostalCode>80031-7166</PostalCode>
<Region>CO</Region>
<TaxRegionId>2114698</TaxRegionId>
<JurisCode>0800183835</JurisCode>
<Latitude />
<Longitude />
<GeocodeType>StreetLevel</GeocodeType>
<ValidateStatus>NormalHit</ValidateStatus>
<DistanceToBoundary>0</DistanceToBoundary>
</TaxAddress>
</TaxAddresses>
<Locked>false</Locked>
<AdjustmentReason>0</AdjustmentReason>
<AdjustmentDescription />
<Version>1</Version>
<TaxDate>2013-06-26</TaxDate>
- <TaxSummary>
- <TaxDetail>
<Country>US</Country>
<Region>CO</Region>
<JurisType>State</JurisType>
<JurisCode>08</JurisCode>
<TaxType>Sales</TaxType>
<Base>46.59</Base>
<Taxable>46.59</Taxable>
<Rate>0.029000</Rate>
<Tax>1.35</Tax>
<TaxCalculated>1.35</TaxCalculated>
<NonTaxable>0</NonTaxable>
<Exemption>0</Exemption>
<JurisName>COLORADO</JurisName>
<TaxName>CO STATE TAX</TaxName>
<TaxAuthorityType>45</TaxAuthorityType>
<TaxGroup />
<RateType>G</RateType>
<StateAssignedNo />
</TaxDetail>
- <TaxDetail>
<Country>US</Country>
<Region>CO</Region>
<JurisType>County</JurisType>
<JurisCode>059</JurisCode>
<TaxType>Sales</TaxType>
<Base>46.59</Base>
<Taxable>46.59</Taxable>
<Rate>0.005000</Rate>
<Tax>0.23</Tax>
<TaxCalculated>0.23</TaxCalculated>
<NonTaxable>0</NonTaxable>
<Exemption>0</Exemption>
<JurisName>JEFFERSON</JurisName>
<TaxName>CO COUNTY TAX</TaxName>
<TaxAuthorityType>45</TaxAuthorityType>
<TaxGroup />
<RateType>G</RateType>
<StateAssignedNo>11-0206</StateAssignedNo>
</TaxDetail>
- <TaxDetail>
<Country>US</Country>
<Region>CO</Region>
<JurisType>Special</JurisType>
<JurisCode>AKFG</JurisCode>
<TaxType>Sales</TaxType>
<Base>46.59</Base>
<Taxable>46.59</Taxable>
<Rate>0.010000</Rate>
<Tax>0.47</Tax>
<TaxCalculated>0.47</TaxCalculated>
<NonTaxable>0</NonTaxable>
<Exemption>0</Exemption>
<JurisName>RTD GREATER DENVER</JurisName>
<TaxName>CO SPECIAL TAX</TaxName>
<TaxAuthorityType>45</TaxAuthorityType>
<TaxGroup />
<RateType>G</RateType>
<StateAssignedNo />
</TaxDetail>
- <TaxDetail>
<Country>US</Country>
<Region>CO</Region>
<JurisType>Special</JurisType>
<JurisCode>1300008001</JurisCode>
<TaxType>Sales</TaxType>
<Base>46.59</Base>
<Taxable>46.59</Taxable>
<Rate>0.001000</Rate>
<Tax>0.05</Tax>
<TaxCalculated>0.05</TaxCalculated>
<NonTaxable>0</NonTaxable>
<Exemption>0</Exemption>
<JurisName>SCIENTIFIC & CULTURAL FAC.(CD)</JurisName>
<TaxName>CO SPECIAL TAX</TaxName>
<TaxAuthorityType>45</TaxAuthorityType>
<TaxGroup />
<RateType>G</RateType>
<StateAssignedNo />
</TaxDetail>
</TaxSummary>
<VolatileTaxRates>false</VolatileTaxRates>
</GetTaxResult>
</GetTaxResponse>
</soap:Body>
</soap:Envelope>


XML in:
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Header>
- <ns1:Profile xmlns:ns1="http://avatax.avalara.com/services" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
<ns1:Name />
<ns1:Client>ShopSite,1.0.0.0</ns1:Client>
<ns1:Adapter>avatax4j,4.15.0.1</ns1:Adapter>
<ns1:Machine>75.171.235.152</ns1:Machine>
</ns1:Profile>
- <ns2:Security xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
- <ns2:UsernameToken>
<ns2:Username>1100113393</ns2:Username>
<ns2:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText" />
</ns2:UsernameToken>
</ns2:Security>
<To xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" soapenv:mustUnderstand="1">http://tukprdweb006.web.ava.tax:8084/tax/taxsvc.asmx</To>
<Action xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" soapenv:mustUnderstand="1">http://avatax.avalara.com/services/GetTax</Action>
</soapenv:Header>
- <soapenv:Body>
- <GetTax xmlns="http://avatax.avalara.com/services">
- <GetTaxRequest>
<CompanyCode>WMB</CompanyCode>
<DocType>SalesOrder</DocType>
<DocCode>10008-1372255781</DocCode>
<DocDate>2013-06-26</DocDate>
<SalespersonCode />
<CustomerCode>ShopSite</CustomerCode>
<Discount>0.000000</Discount>
<OriginCode>Origin</OriginCode>
<DestinationCode>Dest</DestinationCode>
- <Addresses>
- <BaseAddress>
<AddressCode>Origin</AddressCode>
<Line1>3504 W 112th Cir</Line1>
<City>Westminster</City>
<Region>CO</Region>
<PostalCode>80031</PostalCode>
<Country>US</Country>
</BaseAddress>
- <BaseAddress>
<AddressCode>Dest</AddressCode>
<Region>CO</Region>
<PostalCode>80007</PostalCode>
<Country>US</Country>
</BaseAddress>
</Addresses>
- <Lines>
- <Line>
<No>1</No>
<ItemCode />
<Description>Small%20Cheetah%20Basket</Description>
<TaxCode />
<Qty>1</Qty>
<Amount>39.99</Amount>
<Discounted>false</Discounted>
</Line>
- <Line>
<No>Ship</No>
<TaxCode>FR</TaxCode>
<Qty>1</Qty>
<Amount>6.60</Amount>
<Discounted>false</Discounted>
</Line>
</Lines>
<DetailLevel>Line</DetailLevel>
<HashCode>0001464585</HashCode>
<Commit>false</Commit>
</GetTaxRequest>
</GetTax>
</soapenv:Body>
</soapenv:Envelope>
wmbaskets
 
Posts: 15
Joined: Sun Jun 23, 2013 10:42 pm

Re: "Could not parse the XML from Ava Tax"

Postby shrey123 » Wed Jun 26, 2013 8:04 pm

I too have one such issue and I tested connection to Ava Tax and its working fine. taxdata.aa has 'avatax.avalara.net' URL Any creative suggestions?
shrey123
 
Posts: 24
Joined: Thu Oct 18, 2012 11:18 am

Re: "Could not parse the XML from Ava Tax"

Postby loren_d_c » Thu Jun 27, 2013 9:19 am

This is because AvaTax is returning the following element in their response:

Code: Select all
<JurisName>SCIENTIFIC & CULTURAL FAC.(CD)</JurisName>


An un-escaped ampersand is not valid XML (they should be escaped as &amp; ), so the XML parser is choking on it. Please ask your hosting provider to add the following line to the taxdata.aa file in your store's ShopSite Data Directory:

ava_xml_preparse: checked

This will cause ShopSite to pre-parse the AvaTax XML response for unescaped ampersands and fix them before the response goes to the XML parser. This will be the default in future versions of ShopSite.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: "Could not parse the XML from Ava Tax"

Postby wmbaskets » Fri Jun 28, 2013 2:06 pm

I had iPage (webhost) / ShopSite make the change you specified above and now it works! Thanks Loren!
wmbaskets
 
Posts: 15
Joined: Sun Jun 23, 2013 10:42 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 139 guests