soap - 使用 QuickBooks Web 连接器的身份验证问题 : Object reference not set to an instance of an object

标签 soap quickbooks qbwc

我有一个 SOAP 服务器来处理来自 QuickBooks Web 连接器的连接。它调用的第一个方法是“authenticate”,它正确地返回了它期望的数据,但是它给了我错误

QBWC1012: Authentication failed due to following error message.
Object reference not set to an instance of an object.

我对此不知所措,网上似乎没有解决方案。错误消息并没有给我任何继续下去的信息。

如果有人知道我可以在哪里找到更多相关信息,我将不胜感激。

这是该问题的 WC 错误日志:

20140215.17:15:32 UTC    : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False
20140215.17:15:32 UTC    : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked *********************
20140215.17:15:32 UTC    : QBWebConnector.WebServiceManager.DoUpdate() : Update completed with errors. See log (QWClog.txt) for details.
20140215.17:15:32 UTC    : UpdateThisScheduledApp() : QBWC1031: Update completed with some error. Application has been notified of the error accordingly. See QWCLog for further information.
20140215.17:16:30 UTC    : UpdateThisScheduledApp() : Password management - Started
20140215.17:16:30 UTC    : UpdateThisScheduledApp() : Password management - Ended
20140215.17:16:30 UTC    : UpdateThisScheduledApp() : Performing SCHEDULED UPDATE for application = PManager SOAP
20140215.17:16:30 UTC    : QBWebConnector.RegistryManager.getUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock = FALSE
20140215.17:16:30 UTC    : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to True
20140215.17:16:30 UTC    : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session locked *********************
20140215.17:16:30 UTC    : QBWebConnector.SOAPWebService.instantiateWebService() : Initiated connection to the following application.
20140215.17:16:30 UTC    : QBWebConnector.SOAPWebService.instantiateWebService() : AppName: PManager SOAP
20140215.17:16:30 UTC    : QBWebConnector.SOAPWebService.instantiateWebService() : AppUniqueName (if available): PManager SOAP
20140215.17:16:30 UTC    : QBWebConnector.SOAPWebService.instantiateWebService() : AppURL: https://[SNIP]/pmanager/soapserver.php
20140215.17:16:30 UTC    : QBWebConnector.SOAPWebService.do_serverVersion() : *** Calling serverVersion().
20140215.17:16:31 UTC    : QBWebConnector.SOAPWebService.do_serverVersion() : Received from serverVersion() following parameter:<serverVersionRet="">
20140215.17:16:31 UTC    : QBWebConnector.SOAPWebService.do_serverVersion() : This application sent a null for server version. Allowing update operation.
20140215.17:16:31 UTC    : QBWebConnector.SOAPWebService.do_clientVersion() : *** Calling clientVersion() with following parameter:<productVersion="2.1.0.30">
20140215.17:16:32 UTC    : QBWebConnector.SOAPWebService.do_clientVersion() : Received from clientVersion() following parameter:<clientVersionRet="">
20140215.17:16:32 UTC    : QBWebConnector.SOAPWebService.do_clientVersion() : This application agrees with the current version of QBWebConnector. Allowing update operation.
20140215.17:16:32 UTC    : QBWebConnector.SOAPWebService.do_authenticate() : Authenticating to application 'PManager SOAP', username = '[SNIP]'
20140215.17:16:32 UTC    : QBWebConnector.SOAPWebService.do_authenticate() : *** Calling authenticate() with following parameters:<userName="[SNIP]"><password=<MaskedForSecurity>
20140215.17:16:33 UTC    : QBWebConnector.SOAPWebService.do_authenticate() : QBWC1012: Authentication failed due to following error message.
Object reference not set to an instance of an object.
More info:
StackTrace =    at QBWebConnector.WebService.do_authenticate(String& ticket, String& companyFileName)
Source = QBWebConnector
20140215.17:16:33 UTC    : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False
20140215.17:16:33 UTC    : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked *********************
20140215.17:16:33 UTC    : QBWebConnector.WebServiceManager.DoUpdate() : Update completed with errors. See log (QWClog.txt) for details.
20140215.17:16:33 UTC    : UpdateThisScheduledApp() : QBWC1031: Update completed with some error. Application has been notified of the error accordingly. See QWCLog for further information.

SOAP 响应被发送到 WC:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:authenticateResponse xmlns:ns1="http://developer.intuit.com/">
    <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
        <item xsi:type="xsd:string">8d51474324d94e25aa1e6670da584204</item>
        <item xsi:type="xsd:string">C:/Path/File.QBW</item>
    </return>
</ns1:authenticateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

最佳答案

可能有点晚了,但如果它能帮助其他人,我遇到了类似的问题,将 QWC 文件中的样式从“RPC”更改为“DocWrapped”解决了这个问题。

2017 年 5 月更新:

OP 的问题与版本号不匹配有关,但我有相同的症状,该问题与 QWC 配置中的样式不匹配有关。根据QBWC_proguide正确的版本将取决于服务器设置,但有效选项包括:“Document”(默认)、“DocWrapped”和“RPC”。

对于我的 Rails 设置,“Document”或“DocWrapped”都有效。

更改此配置后,删除并重新添加 Web 连接器应用。

关于soap - 使用 QuickBooks Web 连接器的身份验证问题 : Object reference not set to an instance of an object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21803065/

相关文章:

java - Web服务soap身份验证与javax问题

php - SOAP 错误 : Encoding: object hasn't 'first_name' property

c# - Quickbooks SDK 13.0 ToDoAddRq C#

java - 如何使用 Quickbooks Online v3 Java SDK 向客户发送发票电子邮件?

python - Quickbooks Desktop 如何与 Python 集成

node.js - 如何使用 Node.js 异步服务多个 QBWC 客户端

web-services - 如何在JBoss 7中启用SOAP消息的漂亮日志记录

java - 如何将 zip 文件转换为八位字节流

QuickBooks Web 连接器 TimeModified 偏移量不考虑夏令时

quickbooks - 为什么公司文件名由 Web 服务提供?