View Single Post
  #1  
Old 05-03-2008, 05:48 PM
Matt Matt is offline
Junior Member
 
Join Date: May 2008
Posts: 7
Salesforce Webservice methods and PHP

I'm trying to create an Apex class in Salesforce with a Webservice method, then generate the WSDL for this class and call the Webservice method from PHP.

I have Apache, PHP5, the Salesforce PHP Toolkit and OpenSSL all installed, configured, and working.

I can use the PHP Toolkit to make SF API calls from my PHP scripts - that works great.

But I don't want to make those API calls from my PHP scripts - I want that code to run in the SF environment (my Webservice method), just pass in the parameters it needs and return data to the PHP.

However, I can't figure out how to login to SF and call my Webservice from PHP.

I know my Webservice method works - using a tool called soapUI, I load the WSDL for my class, set the headers, cut and paste the SessionID that's generated after logging into SF using the PHP Toolkit, run it, and it returns the value that it should from my Webservice method.

There is a thread in the SF Discussion Boards raising this issue here:

Community - Access APEX webservice from PHP - Perl, PHP, Python & Ruby Development - Salesforce.com Community

One of the posts includes a general description of a way they got it to work and an email address to request sample files of how they did it, but the person who posted it is out-of-office, and I'm hoping to find a solution ASAP.

Does anyone have any ideas? I'd appreciate any help.

Thanks!
Reply With Quote