繁体   English   中英

QuickBooks Web连接器身份验证失败

[英]QuickBooks Web Connector Authentication Failed

我正在使用Consolibyte的适用于Quick Books的PHP开发工具包,并且安装了装有Quick Books的VM以及适用于Quick Books的Web连接器。 我能够成功地将SOAP服务添加到Web连接器,但是每次我请求它进行更新时,都会显示以下消息,导致身份验证失败:

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

我应该在哪里获得有关原因的更多信息?

看来我摆脱了原来的错误,但是现在我收到了无效的用户名或密码响应。

ns1:authenticateResponse Invalid username or password, try again.

QuickBooks表具有直接来自示例的用户名和密码,这就是我在Web连接器中使用的用户名和密码。 在哪里放置日志记录的好地方,以便我能理解为什么框架无法通过身份验证?

下面是一个日志文件:

 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 the error message: -- <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Phoenix Courier: QuickBooks </title> <link href="/favicon.ico" type="image/x-icon" rel="icon"/><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon"/> <link rel="stylesheet" href="/font/fa/master.css"/> <link rel="stylesheet" href="/font/open-sans/styles.css"/> <link rel="stylesheet" href="/font/open-sans-condensed/styles.css"/> <link rel="stylesheet" href="/font/oswald/styles.css"/> <link rel="stylesheet" href="/css/base.css"/> <link rel="stylesheet" href="/css/style.css"/> <link rel="stylesheet" href="/css/phoenix.css"/> <script src="/js/jquery-3.3.1.min.js"></script> <script src="/js/psUserInterface.js"></script></head> <body> <div class="page-wrap"> <div class="container clearfix"> <?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:authenticateResponse><ns1:authenticateResult><ns1:string>67481fd9-4703-fae4-6d81-0ccbf770b4fa</ns1:string> <ns1:string></ns1:string> </ns1:authenticateResult></ns1:authenticateResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> </div> </div> <script> PS_UI.navigation.initNavActive(); PS_UI.navigation.desktop.initNavArrows(); </script> </body> </html> --. 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 

这是我的QWC文件:

 <?xml version="1.0"?> <QBWCXML> <AppName>My QuickBooks SOAP Server</AppName> <AppID></AppID> <AppURL>https://dispatch.sharp.com/</AppURL> <AppDescription>An example QuickBooks SOAP Server</AppDescription> <AppSupport>https://dispatch.phoenixcourier.com/</AppSupport> <UserName>quickbooks</UserName> <OwnerID>{57F3B9B6-86F1-4FCC-B1FF-166DE1813D20}</OwnerID> <FileID>{57F3B9B6-86F1-4FCC-B1FF-966DE1813D20}</FileID> <QBType>QBFS</QBType> <Notify>false</Notify> <Scheduler> <RunEveryNMinutes>10</RunEveryNMinutes> </Scheduler> <IsReadOnly>false</IsReadOnly> </QBWCXML> 

我能够使它工作。 基本上是我在研究期间发现的内容标头。 我正在使用蛋糕框架。 我做了以下测试。

$this->RequestHandler->respondAs('text/xml');

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM