1

There are two servers, my development server and the server Quick Books is currently installed on.

This is my .QWC file that is saved on the Quick Books server.

<?xml version="1.0" encoding="utf-8"?>
<QBWCXML>
<AppName>QBWebService</AppName>
<AppID></AppID>
<AppURL>https://<url>/soap.js</AppURL>
<AppDescription>This is The App</AppDescription>
<AppSupport>https://<url></AppSupport>
<UserName>User</UserName>
<OwnerID>{GUID}</OwnerID>
<FileID>{GUID}</FileID>
<QBType>QBFS</QBType>
</QBWCXML>

And this below my code in the soap.js file on my dev server.

var soap    = require('soap'),
    fs      = require('fs'),
    xml     = fs.readFileSync('wsdl.wsdl', 'utf8'),
    https   = require('https'),
    options = {
               key: fs.readFileSync('/path/to/key'),
               cert: fs.readFileSync('/path/to/crt'),
               ca: [
                    fs.readFileSync('/path/to/crt', 'utf8'),
                    fs.readFileSync('/path/to/crt', 'utf8'),
                    fs.readFileSync('/path/to/crt', 'utf8')
                   ]
              };
var server = https.createServer(options, function(request, response) {
            response.end("404: Not Found: " + request.url);
});

var myService = {
       'QBWebConnectorSvc': {
           'QBWebConnectorSvcSoap': {
               authenticate: function(args) {
                  return {
                      authenticateResult: { string: [guid(), {}]} 
                };
            }
        }
    }
};
server.listen(443, function() {
    console.log('Listening Jimbo');
});
soap.listen(server, '/wsdl', myService, xml);
var thisUrl = './wsdl/wsdl.wsdl';
soap.createClient(thisUrl, function(err, client) {
    if(err) {
        console.log('Error soap create client:');
        console.log(err);
    }
    else {
        console.log('In soap create client else');
        console.log('Client:');
        console.log(client);
        console.log('This should be describe');
        client.setSecurity(new soap.ClientSSLSecurity('/Path/to/Server/key', '/path/to/server/crt', function(err, secure) {
            if(err) {
                console.log('Error Not Secure:');
            }
            else {
                console.log('Secure');
                console.log(secure);
                client.QBWebConnectorSvc.QBWebConnectorSvcSoap.authenticate(function(err, done) {
                    if(err) {
                        console.log('Err Auth:');
                        console.log(err);
                    }
                    else {
                        console.log('Auth Done:');
                        console.log(done);
                    }
                });
            }
        }));

The problem is that the Web Connector keeps saying that it cannot verify my certs, "QBWC1048: QuickBooks Web Connector could not verify the web application server certificate.". I know the certs are good and the firewall is open between the two computers.

Below is from the WebConnector log file.

> 20160906.20:29:30 UTC : QBWebConnector.WebServiceManager.ReadQWC(QWCReader QWC) : Parsing application configuration xml file to load its content to variables
20160906.20:29:51 UTC   :  : QBWC1048: QuickBooks Web Connector could not verify the web application server certificate.Certificate URL:https://<url>/soap.jsStackTrace:at System.Net.HttpWebRequest.GetResponse()
at QBWebConnector.QWCReader.CheckCertURL()Message (description of theexception):Unable to connect to the remote server Source (name of application or object that caused the exception):SystemTargetSite (method that threw the exception):System.Net.WebResponse GetResponse()InnerException:System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP>:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
atSystem.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state,IAsyncResult asyncResult, Exception& exception)
20160906.20:29:58 UTC   :QBWebConnector.WebServiceManager.ReadQWC(QWCReader QWC) : QBWC1048: QuickBooks Web Connector could not verify the web application server certificate.
QBWC1051: The new application was not added
20160906.20:29:58 UTC   :  : ~SingleInstanceHandler() - usingInstanceChannel = false. Returning without any Registry key delete or unmarshalling.

If you need any more information, please ask.

Any help would be much appreciated. Thank you.

jonhill13
  • 11
  • 2

0 Answers0