PHP calls webservice interface

A colleague in the company is calling the webservice interface with PHP, but it keeps prompting failure, and the data cannot be exchanged. I don"t understand PHP myself. I see that he may be too busy to ask questions. Thank you all for your help.

$usertoken="****";
$url="http://********";
$arr_data=array("shopNo"=>2,"date"=>date("Y-m-d"),"data"=>array("spNum"=>"***==","isBuy"=>0,"price"=>"1.00"));
$json_data=json_encode($arr_data);
//$str_url=$url."?usertoken=".$usertoken."&data=".$json_data;
//echo $str_url;exit;
$data=array("usertoken"=>$usertoken,"data"=>"2134564");
$client = new SoapClient($url,array("track" => 1));
try {
            $response=$client->__call("HelloWorld",$data);
            print_r($response->HelloWorldResult);
        } catch (SoapFault $e) {
            print_r($e->getMessage());
        }
        exit;
        
        

this is his code. Can you see the problem when this code is posted?

May.22,2021

$client- > _ _ getFunctions (); / / get the methods available on the interface
$client- > _ _ getTypes (); / / get the key name of the method is very important
use these two methods to see what the parameter format and key name you want on the other side of the interface, the interface of soap is very strange

Menu