+ Start a Discussion

Calling a custom WebService





Great examples on how to create a WebService function.  So now that I've created one, how do I call them using one of the many Toolkits?  It seems that I have no idea how to execute one of my webservices.  I would like to stay inside the toolkit as much as possible.



    // Okay, we're in, new WSDL?
    $wsdl = '/var/www/html/salesforce/soapclient/mytest.wsdl.xml';
    $mySourceConnection = new SforcePartnerClient();

    $whoId = '003A0000007N1FP';
    $templateId = '00XA0000000lHSd'; // Welcome email

    $mySourceConnection->execute('MyWebService', 'sendEmail', array('WhoId' => $whoId, 'TemplateId' => $template);
But there is no execute() command as part of the Partner API (though I have an old Toolkit).  Maybe there is another way to do this correctly?