Search code examples
quickbooks

QuickBooks Web Connector always returns a 404 error


I have created a WCF service endpoint for my QBWC to call. I have exposed to over HTTPS and implemented the contracts.

  • clientVersion
  • authenticate
  • closeConnection
  • connectionError
  • getLastError
  • receiveResponseXML
  • sendRequestXML
  • serverVersion

The connector has the following QWC files:

<?xml version="1.0"?>
<QBWCXML>
  <AppName>QuickBooks Integrator</AppName>
  <AppID></AppID>
  <AppURL>https://<URL>/QuickBookConnector.svc</AppURL>
  <AppDescription>Used to integrate with Quickbooks install</AppDescription>
  <AppSupport>http://<URL></AppSupport>
  <UserName>depQB</UserName>
  <OwnerID>{GUID}</OwnerID>
  <FileID>{GUID}</FileID>
  <QBType>QBFS</QBType>
  <Scheduler>
    <RunEveryNMinutes>2</RunEveryNMinutes>
  </Scheduler>
  <IsReadOnly>false</IsReadOnly>
  <Style>Document</Style>
  <AuthFlags>0xF</AuthFlags>
</QBWCXML>

The connector fires off and calls serverVersion, cientVersion and then authenticate. After authenticate it says "Authentication failed." However in the web service I am not even checking username and password yes. And this is what I get in the logs.

20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_serverVersion() : * Calling serverVersion(). 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_serverVersion() : Actual error received from web service for serverVersion call: . For backward compatibility of all webservers, QBWC will catch all errors under app-not-supporting-serverVersion. 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_serverVersion() : This application does not contain support for serverVersion. Allowing update operation for backward compatibility. 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_clientVersion() : Calling clientVersion() with following parameter: 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.updateWS() : Actual error received from web service for clientVersion call: . For backward compatibility of all webservers, QBWC will catch all errors under app-not-supporting-clientVersion. 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_clientVersion() : This application does not contain support for clientVersion. Allowing update operation for backward compatibility. 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_authenticate() : Authenticating to application 'DEP QuickBooks Integrator', username = 'depQB' 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_authenticate() : Calling authenticate() with following parameters: 20150811.17:07:20 UTC : QBWebConnector.SOAPWebService.do_authenticate() : QBWC1012: ***Authentication failed due to following error message. The request failed with HTTP status 404: Not Found.* 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

Now it is saying it gets a 404 error. However, I can take the exact same URL that is the "AppURL" section of the QWC file and put it in a browser and it loads the service page. SO a browser can hit the service URL but QBWC can't?

Any ideas?


Solution

  • It was my own miss. All our services are wrapped by an activator that for everyone else means the calls don't require the Service and Operation contracts. However QBWC does not like that and reports on the screen "Authentication Failed" because it can't find any of the methods.

    Since there is limited documentation on this I wanted to provide the answer for anyone else that stumbles on this. Don't forget these guys.

    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.57.0")]
    [ServiceContract(Namespace = "http://developer.intuit.com/")]
    [System.Web.Services.WebServiceBindingAttribute(Name = "QuickBookConnectorService", Namespace = "http://developer.intuit.com/")]
    
    [OperationContract(Action = "http://developer.intuit.com/clientVersion")]
    [XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
    

    They are different then the provided sample in the old ASMX approach versus WCF.