I’m working on a Quickbooks module for Drupal Ubercart. By implementing a SOAP server, it is possible to allow theĀ Quickbooks Web Connector (QWC) to pull down XML snippets representing store information. We’re using the SOAP server module for Drupal, which extends services.

Quickbooks is the event horizon – you have know idea what it does with your SOAP responses once it takes over. It is poorly documented and the Intuit developer forums are essentially derelict. Before we could even tackle the problem of getting the response data structures right, we had to make sure our SOAP server was working right. Packet sniffing was not an option for investigating our server’s responses because QWC needs to use SSL. Instead we wrote the output of the SOAP server instance to the output buffer, and logged it:

  1. $server = new SoapServer;
  2. $server->handle();
  3. $buffer = ob_get_contents();
  5. watchdog(‘modulename’, ‘server output: ‘ . $buffer);

Output buffers direct the http response away from its destination and into a “buffer” where it can be retrieved later with ob_get_contents(). Using this method we were able to verify that our SOAP server was sending proper (looking) SOAP requests.

1 Comment

    Can u please let me know where exactly do u see this output?
    Thanks in advance.

Leave a Reply