i hope stay in line here, don't want waste time. developed simple app extracts customer invoice data database , writes xml requests load invoice data quickbooks. works well. i've run , fixed dozen or quirks , glitches along way; it's in production year.
while loading today's invoices quickbooks, 1 failed.
there no objectionable characters or oddities in data of failed invoice; compared other invoices , found similar data successful; verified listid values each entity; stumped. if can this, appreciated greatly. here's xml failed today (the change blocked couple of names): failed invoiceaddrq:
<?xml version="1.0"?> <?qbxml version="8.0"?> <qbxml> <qbxmlmsgsrq onerror="stoponerror"> <invoiceaddrq requestid="16012816370245509"> <invoiceadd> <customerref><listid>3e00001-1139583887</listid></customerref> <araccountref><listid>380000-1137509930</listid></araccountref> <templateref><listid>b0000-1142608867</listid></templateref> <txndate>2016-01-28</txndate> <refnumber>60125008</refnumber> <ponumber>ai600292569</ponumber> <termsref><listid>20000-1137508984</listid></termsref> <shipdate>2016-01-25</shipdate> <other>xyxyx plastics</other> <invoicelineadd> <itemref><listid>20000-1139578831</listid></itemref> <desc>recovering 1/25del. 1/26 @ 11:57 est – pod xyxyx</desc> <quantity>1</quantity> <rate>480.79</rate> <other1>6</other1> <other2>3466</other2> </invoicelineadd> </invoiceadd> <includeretelement>txnid</includeretelement><includeretelement>timecreated</includeretelement><includeretelement>refnumber</includeretelement> </invoiceaddrq> </qbxmlmsgsrq> </qbxml>
i don't see wrong here. compared xml many successful invoiceadd requests occurred before , after one. tried again insanity check (same result).
below i'll post similar invoice successful example. successful invoiceaddrq:
<?xml version="1.0"?> <?qbxml version="8.0"?> <qbxml> <qbxmlmsgsrq onerror="stoponerror"> <invoiceaddrq requestid="160128164851801"> <invoiceadd> <customerref><listid>80000915-1294766937</listid></customerref> <araccountref><listid>380000-1137509930</listid></araccountref> <templateref><listid>b0000-1142608867</listid></templateref> <txndate>2016-01-28</txndate> <refnumber>60125011</refnumber> <ponumber>2200166200</ponumber> <termsref><listid>20000-1137508984</listid></termsref> <shipdate>2016-01-26</shipdate> <other>x&y mehoopany </other> <invoicelineadd> <itemref><listid>20000-1139578831</listid></itemref> <desc>unable deliver due weather 1-22del. 1-25, pod. axyxyx bxyxyxy @14:30</desc> <quantity>1</quantity> <rate>148.60</rate> <other1>1</other1> <other2>3</other2> </invoicelineadd> </invoiceadd> <includeretelement>txnid</includeretelement><includeretelement>timecreated</includeretelement><includeretelement>refnumber</includeretelement> </invoiceaddrq> </qbxmlmsgsrq> </qbxml>
thanks in advance. edit: forgot mention error generic "quickbooks found error when parsing provided xml text stream." source:qbxmlrp2.requestprocessor.2
ok, found cause. logged message cited invalid byte "(–)". dash character bouncing invoice. had looked invoices using dash , found many successful loaded using same method. had failed notice dash characters different in of successful invoices found except 1. failed xml includes –
or, if prefer, –
or "en dash" instead of normal ascii dash "-" (-
). sdk validator doesn't flag problem. also, 1 invoice included "en dash" had loaded successful; can't explain that. use character substitution tables deal requirements (or idiosyncrasies) of xml, qbxml, , database (oracle). instead of changing encoding, i'll substitute -
occurrences of –
(and —
, "em dash", matter). worked failing invoice. again williamlorfing help.
Comments
Post a Comment