PHP SOAP客户端无效的演员
问题描述:
我以前从来没有使用过SOAP。我有一切工作,但我在错误日志中得到一个PHP警告。PHP SOAP客户端无效的演员
警告:
[05-Nov-2015 11:06:06 UTC] PHP Warning: SoapHeader::SoapHeader(): Invalid actor in C:\www\srf.cdab.eu\wp-content\themes\mypage\includes\soap.php on line 61
soap.php:61
$objSoapVarWSSEHeader = new SoapHeader($strWSSENS, 'Security', $objSoapVarHeaderVal, true, NULL);
我GOOGLE了,但找不到任何可以解释为什么我得到这个错误。什么可能是这个问题的原因?
答
演员musst是一个URI字符串或SOAP_ACTOR_NONE。
$objSoapVarWSSEHeader = new SoapHeader($strWSSENS, 'Security', $objSoapVarHeaderVal, true, SOAP_ACTOR_NONE);
或
$objSoapVarWSSEHeader = new SoapHeader($strWSSENS, 'Security', $objSoapVarHeaderVal, true, 'https://yourdomain/yourservice');