2016-07-20 21 views
0

Ich muss etwas vermissen, weil ich kein Problem mit der Abfrage aller Anbieter, Kunden und Artikel hatte, aber die Mitarbeiter geben mir Kopfschmerzen. Meine Datei wird nie zur Importreaktion gelangen, weil sie beim Analysieren des bereitgestellten XML-Textstroms einen Fehler von 0x80040400 ausgibt. Dies ist das genaue XML-Stream:Verwendung von Consolibyte QuickBooks PHP-Framework - kann nicht alle Mitarbeiter importieren 0x80040400 Fehler

<?xml version="1.0" encoding="utf-8"?> 
    <?qbxml version="13.0"?> 
    <QBXML> 
     <QBXMLMsgsRq onError="continueOnError"> 
      <EmployeeQueryRq iterator="Start" requestID="249"> 
           <MaxReturned>10</MaxReturned> 
             <ActiveStatus>All</ActiveStatus> 
             <FromModifiedDate>1983-01-02T12:01:01</FromModifiedDate> 
             <OwnerID>0</OwnerID> 
      </EmployeeQueryRq> 
     </QBXMLMsgsRq> 
    </QBXML> 

Und das ist der Code, den es erzeugt (Ich verwende einen Iterator basierend auf einer ihrer Beispiele, um die Rückkehr in Chargen zu brechen - ich genau das gleiche Format verwendet auf jeder Abschnitt, den ich importiere, funktioniert für alle anderen Objekte.

function _quickbooks_employee_import_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale) 
{ 
    // Iterator support (break the result set into small chunks) 
    $attr_iteratorID = ''; 
    $attr_iterator = ' iterator="Start" '; 
    if (empty($extra['iteratorID'])) 
    { 
     // This is the first request in a new batch 
     $last = _quickbooks_get_last_run($user, $action); 
     _quickbooks_set_last_run($user, $action);   
// Update  the  last run time to NOW() 
    // Set the current run to $last 
    _quickbooks_set_current_run($user, $action, $last); 
} 
else 
{ 
    // This is a continuation of a batch 
    $attr_iteratorID = ' iteratorID="' . $extra['iteratorID'] . '" '; 
    $attr_iterator = ' iterator="Continue" '; 

    $last = _quickbooks_get_current_run($user, $action); 
} 

// Build the request 
$xml = '<?xml version="1.0" encoding="utf-8"?> 
    <?qbxml version="' . $version . '"?> 
    <QBXML> 
     <QBXMLMsgsRq onError="continueOnError"> 
      <EmployeeQueryRq ' . $attr_iterator . ' ' . $attr_iteratorID . ' requestID="' . $requestID . '"> 
           <MaxReturned>' . QB_QUICKBOOKS_MAX_RETURNED . '</MaxReturned> 
             <ActiveStatus>All</ActiveStatus> 
             <FromModifiedDate>' . $last . '</FromModifiedDate> 
             <OwnerID>0</OwnerID> 
      </EmployeeQueryRq> 
     </QBXMLMsgsRq> 
    </QBXML>'; 

    QuickBooks_Utilities::log(QB_QUICKBOOKS_DSN, $xml); 
return $xml; 
} 

HILFE!

Antwort

0

Bitte beachten Sie die Dokumentation:

was darauf hindeutet, dass iterators nicht für Mitarbeiter unterstützt.

<?xml version="1.0" encoding="utf-8"?> 
<?qbxml version="13.0"?> 
<QBXML> 
<QBXMLMsgsRq onError="stopOnError"> 
<EmployeeQueryRq metaData="ENUMTYPE"> 

Wenn Sie weiterhin Probleme haben, posten Sie bitte die tatsächliche Fehlermeldung, die in den Protokollen/Web Connector angezeigt wird. Kopieren Einfügen.

Dies ist nicht ein Fehler, dass Quickbooks produziert:

0x80040400 error of an error when parsing the provided xml text stream 

Was sehen Sie wahrscheinlich ist:

QuickBooks found an error when parsing the provided XML text stream 
+0

Ich weiß nicht, wie man es zu tun noch mit allen Wir unterstützen diese 7 oder 8 Jahre später, aber ich weiß es zu schätzen, dass Sie es sind !!! Das war genau das, was ich brauchte - danke x 1 Million! –

+0

@BobbyDawson Froh, zu helfen !!! :-) –