I\'m trying to make a SOAP request using soapClient class from PHP that\'s my code:
$xmlstr = <<
// xml post structure
$xml_post_string = '
username
password
';
$headers = array(
"Content-type: text/xml;charset=\"utf-8\"",
"Accept: text/xml",
"Cache-Control: no-cache",
"Pragma: no-cache",
"SOAPAction:http://tempuri.org/webservice_method_name",
"Content-length: ".strlen($xml_post_string),
);
$url = "http://yourwebserviceurl.com/servicename.asmx";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_post_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
//$response showing XML Response
how to parse soap response using php for that see following website
https://vaja906programmingworld.wordpress.com/