【问题标题】:Quickbooks PHP WebConnector (Client found response content type of 'text/htmlQuickbooks PHP WebConnector(客户端发现响应内容类型为'text/html
【发布时间】:2020-12-09 17:24:45
【问题描述】:

我正在使用 quickbooks 网络连接器,在尝试连接时,我的身份验证失败,我们最近所做的更改是从一台服务器迁移到另一台服务器配置的数据库凭据正确。

这可能是一个重复的问题,但我被困在这个问题上,需要有人帮忙,因为它没有任何意义。

但日志显示

客户端发现响应内容类型为 'text/html; charset=UTF-8',但应为 'text/xml'

以下是完整的日志文件输出。

20201208.22:22:57 UTC   : UpdateThisScheduledApp() : Password management - Started
20201208.22:22:57 UTC   : UpdateThisScheduledApp() : Password management - Ended
20201208.22:22:57 UTC   : UpdateThisScheduledApp() : Performing SCHEDULED UPDATE for application = myAppName
20201208.22:22:57 UTC   : QBWebConnector.RegistryManager.getUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock = FALSE
20201208.22:22:57 UTC   : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to True
20201208.22:22:57 UTC   : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session locked *********************
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : Initiated connection to the following application.
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : AppName: myAppName
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : AppUniqueName (if available): myAppName
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : AppURL: {web-connector-url} ( i have removed for security)
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_serverVersion() : *** Calling serverVersion().
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_serverVersion() : Actual error received from web service for serverVersion call: <Client found response content type of 'text/html; charset=UTF-8', but expected 'text/xml'.
The request failed with an empty response.>. For backward compatibility of all webservers, QBWC will catch all errors under app-not-supporting-serverVersion.
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_serverVersion() : This application does not contain support for serverVersion. Allowing update operation for backward compatibility.
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_clientVersion() : *** Calling clientVersion() with following parameter:<productVersion="2.3.0.36">
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.updateWS() : Actual error received from web service for clientVersion call: <Client found response content type of 'text/html; charset=UTF-8', but expected 'text/xml'.
The request failed with an empty response.>. For backward compatibility of all webservers, QBWC will catch all errors under app-not-supporting-clientVersion.
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_clientVersion() : This application does not contain support for clientVersion. Allowing update operation for backward compatibility.
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_authenticate() : Authenticating to application 'myAppName', username = '{my-app-username}'
20201208.22:22:57 UTC   : QBWebConnector.SOAPWebService.do_authenticate() : *** Calling authenticate() with following parameters:<userName="{my-app-username}"><password=<MaskedForSecurity>
20201208.22:22:58 UTC   : QBWebConnector.SOAPWebService.do_authenticate() : QBWC1012: Authentication failed due to following error message.
Client found response content type of 'text/html; charset=UTF-8', but expected 'text/xml'.
The request failed with an empty response.
More info:
StackTrace =    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at QBWebConnector.localhost.WCWebServiceDoc.authenticate(String strUserName, String strPassword)
   at QBWebConnector.localhost.WCWebService.authenticate(String strUserName, String strPassword)
   at QBWebConnector.SOAPWebService.authenticate(String UserName, String Password)
   at QBWebConnector.WebService.do_authenticate(String& ticket, String& companyFileName)
Source = System.Web.Services

【问题讨论】:

    标签: php soap quickbooks


    【解决方案1】:

    问题在于我的 dsn 格式,我使用了自动生成的密码,其中包含特殊字符导致格式混乱

    我之前的 dsn 是 mysql://dbusername:password!@#@localhost/dbname (在这里你可以看到@符号充当分隔符,因此它抛出错误

    改为 mysql://dbusername:password123@localhost/dbname

    一切正常

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-05
      • 1970-01-01
      • 1970-01-01
      • 2012-02-06
      • 1970-01-01
      • 1970-01-01
      • 2011-06-17
      • 1970-01-01
      相关资源
      最近更新 更多