PHP SOAP client calling function with parameters

后端 未结 4 1987
南旧
南旧 2021-02-20 10:22

I created a SOAP client like so:

$client = new SoapClient(\"file.wsdl\");

And then when I want to call an API function

$client-         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-20 11:22

    you should pass an array for the parameters and give your parameters names (those can be found in the wsdl-file). in your case, the result should look like this (assuming the parameter-names should be param1 and param2 on the basis of the error-message):

    $client->Authenticate(array('param1'=>"user", 'param2'=>"password"));
    

提交回复
热议问题