简体   繁体   中英

PHP SOAP : Fatal error: Uncaught SoapFault exception: [HTTP] An Authentication object was not found in the SecurityContext

I don't know SOAP, can any one help to figure out this issue ??

"PHP SOAP : Fatal error: Uncaught SoapFault exception: [HTTP] An Authentication object was not found in the SecurityContext"

I have also search on google and try to set soap headers but not working.

$authvalues = array("username"=>"@@@@","password"=>"EEEEE");
$header =  new SoapHeader("SoapBaseNameSpace","ReqHeader", $authvalues, true);

$client->__setSoapHeaders(array($header));

Thanks in advanced..

Have you tried setting it in the options array?

$options = array(
  "login" => 'login',
  "password" => 'pass'
);

$client = new SoapClient($wsdl, $options);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM