function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NBlasgenNBlasgen 

Calling a custom WebService

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_web_services_methods_considerations.htm

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_and_ajax.htm

 

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();
    $mySourceConnection->createConnection($wsdl);
    $mySourceConnection->setSessionHeader($mySforceConnection->getSessionId());
    $mySourceConnection->setEndpoint($mySforceConnection->getLocation());

    $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?