You need to sign in to do that
Don't have an account?

How do I call webservice via SOAP PHP with Parameters?
I have a webservice setup in my salesforce instance that is called CheckUserPermissions(String param1, String param2). I am able to use the PHP code below to successfully login and execute the command. HOWEVER, I am only able to pass the first parameter to the method -- the second parameter doesn't seem to come through.
I've verified that the param1 value comes through successfully, but param2 is always NULL.
PHP CODE:
$sessionID = $mySforceConnection->getSessionId(); $value1 = 'value1'; $value2 = "value2"; $wsdl="soapclient/ContractMgtUtils.wsdl.xml"; $NAMESPACE = "http://soap.sforce.com/schemas/class/ContractMgtUtils"; $sforce_header = new SoapHeader($NAMESPACE, "SessionHeader", array("sessionId" => $sessionID, "param1" => $value1, "param2" => $value2)); $client = new soapclient($wsdl); $client->__setSoapHeaders(array($sforce_header)); // $client-> try { $response = $client->CheckUserPermissions(); echo $response->result; // print_r($response); } catch(Exception $e) { print "<pre>"; print_r($e); exit; }
Correct them to $value2 = 'value2';