2016-07-20 27 views
0

我必须失去了一些东西,因为我已经没有问题与查询所有供应商,客户和项目,但员工都让我头疼。我的文件是永远不会做它来输入响应,因为它正在解析提供的XML文本流时抛出错误的0x80040400错误。这是确切的XML流:使用consolibyte QuickBooks的PHP框架 - 不能导入所有员工0x80040400错误

<?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> 

这是产生它的代码(我使用的基础上,他们的例子,打破了回报成批一个迭代器 - 我使用的完全一样的格式每个我输入部分 - 它适用于所有其他对象)

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; 
} 

HELP!

回答

0

请参考文档:

这表明iterators不支持员工。

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

如果仍然有问题,请发布日志/ Web连接器中显示的实际错误消息。复制粘贴。

这是说的QuickBooks产生一个错误:

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

什么,你可能看到的是:

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

我不知道你怎么还在处理所有的我们支持这7或8年过去了,但我当然明白,你是!这是正是我需要的 - 感谢X 1万元! –

+0

@BobbyDawson很高兴帮助! :-) –

相关问题