I understand that I need to pass the parameters of the function as the index of an array. I also understand that the values of the parameter are the corresponding values of that index of the array. But I cannot get my function to work. I pass the variable into the function in the WSDL but I am not getting anything.
Here is my PHP code:
try{
$soap_client = new SoapClient("https://foo.example.com:8443/current/bar?wsdl");
$log_in = array(
"iwsUsername" => "username",
"iwsSecretKey" => "secretKey",
"caller" => "JohnDoe",
"callerPassword" => "password"
);
//passing values into the function parameters above
$request = $soap_client->authenticatedPing($log_in);
echo $request->authenticatedPing;
} catch(SoapFault $exception){
echo '?????';
}
These are obviously fake values for security purposes but you get the idea.
Here is the WSDL for this function:
<wsdl:operation name="authenticatedPing">
<soap12:operation soapAction="" style="rpc"/>
<wsdl:input name="authenticatedPing">
<soap12:body namespace="http://www.example.com" use="literal"/>
</wsdl:input>
<wsdl:output name="authenticatedPingResponse">
<soap12:body namespace="http://www.example.com" use="literal"/>
</wsdl:output>
What am I doing wrong?
Exception
have? You only echo some text but not the exception message (php.net/exception.getmessage). Please provide it with your question. – hakre Jul 21 '13 at 9:31