In php, how to pass two parameters through soap (under ms-security)

Source: Internet
Author: User
In php, how to pass two parameters through soap (under ms-security)
$xml = '            
             
              
   
    admin
               
   
    PasswordText
               
              
 ';        $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'))));



When the above code is run, an error is prompted.
SoapFault exception: [soap:Server] Fault occurred while processing. in 


Later, when the call was made, the other party looked at the log and showed that the username was passed and 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 do I pass two parameters ???


Reply to discussion (solution)

Case Sensitive!

Case Sensitive, method or parameter

I was inspired by the answer from the moderator. I saw the parameters to be passed in the wsdl. the parameter that the other party said in q is password, but it is actually pwd in the wsdl.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.