Doubt with SOAP method functions

0

How do you interpret this? use this code

$url="miurlwsdl";
$client = new SoapClient($url,array("trace" => 1));
           $f=$client->__getFunctions();
           var_dump($f[0]);

and throws this at me

string (101) "AuthenticateIniResponse AuthenticateIni (AuthenticateIni $ parameters)"

Now I'm trying to consume that ws with this and it shows nothing

$url="miurl.svc?wsdl";
$client = new SoapClient($url,array("trace" => 1));
$para=Array('paraA'=>'12345678','paraB'=>'33333');
$result=$client->AutentificaIni($para);
print_r($result);

and the only thing he shows me is: AuthenticaIni

However in SOAPUI it shows me the values without problems.

Something else will be missing?

    
asked by frijjolitto 06.02.2018 в 18:06
source

1 answer

0

The method __getFunctions of SoapClient does not return the functions or methods of the class itself SoapClient , but the list of available functions offered by the web service according to the WSDL file.

The way to execute these functions is through the __soapCall method, which in its version More basic has this form:

mixed SoapClient::__soapCall(string $function_name, array $arguments);

$function_name would correspond to "AutentificaIni" in your case, and $arguments with $para :

$result = $client->__soapCall("AutentificaIni", $para);
    
answered by 08.02.2018 в 23:49