I have to create PHP, SOAP API. I need to authenticate SOAP client from SOAP Server.
This is the code of SOAP Client.
$client = new SoapClient("cust.wsdl",array(
"trace" => 1,
"exceptions" => 0,
"user" => 'username',
"pass" => 'password'));
$result = $client->getDetails($value1);
I need to capture and validate these username and password from server (SOAP SERVER) side.
This is my SOAP Server Code
class getDb {
//return DATA
}
$server = new SoapServer("cust.wsdl");
$server->setClass("getDb");
$server->handle();
I need to Validate Client’s Username and Password from SOAP Server.
Anyone know how to capture SOAP Username and Password (“user” => ‘username’,
“pass” => ‘password’) from SOAPSERVER please provide.
I have used below method and got success SOAP PHP authentication response from HTTP Auth method.
My SOAP client statement as look like
I used this PHP statement for Authenticate PHP Auth header