Re: [SOAP] Re: PHP4 SOAP Request problem logging in to salesforce.com
| From: | Colin Goldberg | Date: | Thu, 03 Nov 2005 22:08:08 +0000 |
| Subject: | Re: [SOAP] Re: PHP4 SOAP Request problem logging in to salesforce.com | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2050@lists.php.net to get a copy of this message | ||
For those who are following this thread, I have found an answer to my last question about how to set options when using SOAP_WSDL - by inserting the option as the second argument. The following script should make this clear:
$wsdl_url = "http://my/url/for/sforce_partner.wsdl";
$curl_opt1 = array(CURLOPT_CAINFO => '/my/path/for/ca-bundle.crt');
$curl_opts = array('curl' => $curl_opt1);
$client = new SOAP_WSDL($wsdl_url , $curl_opts);
...
To use SOAP_Client instead of SOAP_WSDL, replace the last line with the following, where the above option is inserted as the fourth argument:
$client = new SOAP_Client($wsdl_url , true, false, $curl_opts);
..
That's all, folks!
Colin Goldberg
Colin Goldberg wrote:
Michael Rasmussen wrote:On Thu, 27 Oct 2005 09:17:02 -0400, Colin Goldberg wrote:I don't think I can use curl_setopt, as function _sendHTTPS initializes and sets the curl options. _sendHTTPS does set curl options that have been set in the $options array. Function setOpt seems to do this. But setOpt seems only to be available if I use SOAP_Client - not SOAP_WSDL. And getProxy seems only available if I use SOAP_WSDL. What can I use to set the curl option? Colin Goldberg How do II have curl installed. I see that curl options are set in function _sendHTTPS in SOAP/Transport/HTTP.php. What statement(s) do I need to set CURLOPT_CAINFO, etc. eg. If I were to place the statement inside function _sendHTTPS it would be: $ch = curl_init(); curl_setopt($ch, CURLOPT_CAINFO, '/my path to/ca-bundle.crt'); How do I do this without disturbing the SOAP distribution?http://dk.php.net/manual/en/function.curl-setopt.php Maybe put in the beginning of the client before activating SOAP. If done this way it will affect the entire client script, which also includes the generated proxy.