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

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.



  $sessionID = $mySforceConnection->getSessionId();
                $value1 = 'value1';
                $value2 = "value2";
                $NAMESPACE = "";
    $sforce_header = new SoapHeader($NAMESPACE, "SessionHeader",
                        array("sessionId" => $sessionID, "param1" => $value1, "param2" => $value2));
    $client = new soapclient($wsdl);
  //           $client->
    try {
                   $response =  $client->CheckUserPermissions();
                echo $response->result;
//        print_r($response);   
    catch(Exception $e) {
        print "<pre>";


Lalit Sharma CybageLalit Sharma Cybage
The reason for unable to send the second parameter is due to  double quote.    
                Correct them to  $value2 = 'value2';