Error in getting response in SOAP

//require ('lib/nusoap.php');
//Content-Type:"text/xml; charset=utf-8";

$wsdl = "http://example.svc?wsdl";
$client = new SoapClient($wsdl,array('trace' => 1,'soap_version'   => SOAP_1_2));

$security = array(
'UserName' => array(

$header = new SoapHeader($wsdl,'RequestorCredentials',$security,false);

$params = array();
$params['UniqueIdentifier'] = "PD-81";
$params['RequestSource'] = "CD";
try {
    $ret = $client->GetSanctionStatus($params);
	//header('Content-Type: text/xml; ');
}catch(Exception $e){
  echo $e->getMessage();

print "<pre>\n"; 
print "Request: \n".htmlspecialchars($client->__getLastRequest()) ."\n"; 
print "Response: \n".htmlspecialchars($client->__getLastResponse())."\n"; 
print "</pre>"; 

ERROR: Cannot process the message because the content type ‘application/soap+xml; charset=utf-8; action=“”’ was not the expected type ‘text/xml; charset=utf-8’.

plz help me

you have the wrong content-type header. SOAP expects application/soap+xml, not just text/xml

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.