Example SOAP Request and Response for the QuickBooks Web Connector receiveResponseXML() Method

Example SOAP Request

Example SOAP request indicating the last request was successful

It is important that you still check the statusCode and statusAttribute of the qbXML request as well! You need to be able to handle both Web Connector protocol-level errors *and* qbXML errors.

<?xml version="1.0" encoding="utf-8"?>
	<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>
			<receiveResponseXML xmlns="http://developer.intuit.com/">
				<ticket>a05fd1b411f6e22adbb5717f96876b5b</ticket>
				<response>&lt;?xml version="1.0" ?&gt;
&lt;QBXML&gt;
&lt;QBXMLMsgsRs&gt;
&lt;ReceivePaymentAddRs requestID="UmVjZWl2ZVBheW1lbnRBZGR8MTE2" statusCode="0" statusSeverity="Info" statusMessage="Status OK"&gt;
&lt;ReceivePaymentRet&gt;
&lt;TxnID&gt;1F6-1241605561&lt;/TxnID&gt;
&lt;TimeCreated&gt;2009-05-06T06:26:01-05:00&lt;/TimeCreated&gt;
&lt;TimeModified&gt;2009-05-06T06:26:01-05:00&lt;/TimeModified&gt;
&lt;EditSequence&gt;1241605561&lt;/EditSequence&gt;
&lt;TxnNumber&gt;139&lt;/TxnNumber&gt;
&lt;CustomerRef&gt;
&lt;ListID&gt;90000-1241602188&lt;/ListID&gt;
&lt;FullName&gt;Test Company&lt;/FullName&gt;
&lt;/CustomerRef&gt;
&lt;ARAccountRef&gt;
&lt;ListID&gt;260000-1226546874&lt;/ListID&gt;
&lt;FullName&gt;Accounts Receivable&lt;/FullName&gt;
&lt;/ARAccountRef&gt;
&lt;TxnDate&gt;2009-05-06&lt;/TxnDate&gt;
&lt;RefNumber&gt;116&lt;/RefNumber&gt;
&lt;TotalAmount&gt;265.40&lt;/TotalAmount&gt;
&lt;Memo&gt;Payment for invoice #116&lt;/Memo&gt;
&lt;DepositToAccountRef&gt;
&lt;ListID&gt;270000-1226599344&lt;/ListID&gt;
&lt;FullName&gt;Undeposited Funds&lt;/FullName&gt;
&lt;/DepositToAccountRef&gt;
&lt;UnusedPayment&gt;0.00&lt;/UnusedPayment&gt;
&lt;UnusedCredits&gt;0.00&lt;/UnusedCredits&gt;
&lt;AppliedToTxnRet&gt;
&lt;TxnID&gt;1EB-1241602355&lt;/TxnID&gt;
&lt;TxnType&gt;Invoice&lt;/TxnType&gt;
&lt;TxnDate&gt;2008-05-31&lt;/TxnDate&gt;
&lt;RefNumber&gt;115&lt;/RefNumber&gt;
&lt;BalanceRemaining&gt;0.00&lt;/BalanceRemaining&gt;
&lt;Amount&gt;100.00&lt;/Amount&gt;
&lt;/AppliedToTxnRet&gt;
&lt;AppliedToTxnRet&gt;
&lt;TxnID&gt;1EE-1241602356&lt;/TxnID&gt;
&lt;TxnType&gt;Invoice&lt;/TxnType&gt;
&lt;TxnDate&gt;2008-10-02&lt;/TxnDate&gt;
&lt;RefNumber&gt;116&lt;/RefNumber&gt;
&lt;BalanceRemaining&gt;20.00&lt;/BalanceRemaining&gt;
&lt;Amount&gt;165.40&lt;/Amount&gt;
&lt;/AppliedToTxnRet&gt;
&lt;/ReceivePaymentRet&gt;
&lt;/ReceivePaymentAddRs&gt;
&lt;/QBXMLMsgsRs&gt;
&lt;/QBXML&gt;</response>
			<hresult />
			<message />
		</receiveResponseXML>
	</soap:Body>
</soap:Envelope>

Example SOAP request indicating the last request failed

<?xml version="1.0" encoding="utf-8"?>
<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>
		<receiveResponseXML xmlns="http://developer.intuit.com/">
			<ticket>438d2fc02a519df5fcc2eef0e7ad3898</ticket>
			<response />
			<hresult>0x80040400</hresult>
			<message>QuickBooks found an error when parsing the provided XML text stream.</message>
		</receiveResponseXML>
	</soap:Body>
</soap:Envelope>

Example SOAP Response

If an error has occurred, you can return a -1 to stop processing. If there are no more requests to process, you should return 100 (for 100% done). If there are more requests to process, you should return an integer between 1 and 99 (inclusive) indicating the percentage done the update is.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://developer.intuit.com/">
	<SOAP-ENV:Body>
		<ns1:receiveResponseXMLResponse>
			<ns1:receiveResponseXMLResult>100</ns1:receiveResponseXMLResult>
		</ns1:receiveResponseXMLResponse>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
quickbooks_web_connector_soap_receiveresponsexml.txt · Last modified: 2013/01/21 12:44 (external edit)