In php, how to pass two parameters through soap, (under ms-security)
$xml = '
';
$header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'CallbackHandler', new SoapVar($xml, XSD_ANYXML), TRUE);
$this->client = new SoapClient($wsdl);
$this->client->__setSoapHeaders(array($header));
$userInfo = turnObjectToArray($this->client->__call('checkUser', array('username' => array('username' => 'username', 'password' => 'password'))));
As soon as I run the above code, an error message appears
SoapFault exception: [soap:Server] Fault occurred while processing. in
Later, during the continuous adjustment, the other party looked at the log and it showed that the username was passed but the password was not passed
When passing a parameter, the other party can receive it
$info = turnObjectToArray($this->client->__call('getClasses', array('gradeId' => array('gradeId' => $data['id']))));
How to pass two parameters? ? ?
——Solution——————–
Pay attention to capitalization !