Our experience has been that you actually have to create an object, and return that. e.g.:
class QuickBooks_WebConnector_Result_Authenticate
{
public $authenticateResult;
public function __construct($ticket)
{
$this->authenticateResult = array($ticket, 'none');
}
}
...
function authenticate($object)
{
return new QuickBooks_WebConnector_Result_Authenticate($ticket);
}
With that said - you might want to look into solutions that already exists to solve this issue. Implementation of the Web Connector protocol is not trivial (especially if you're not already familiar with SOAP), and this has been done before:
That's an open-source Web Connector library that handles all of this SOAP stuff for you. There's a quick-start guide here:
If you do decide to go it on your own, this provides helpful SOAP requests/responses you can use for debugging/comparing your own responses to: