How to set this php soap header?

后端 未结 1 627
花落未央
花落未央 2021-01-18 19:38

How do i set this php Soap Header ?? For the life of me I can\'t figure it out.

   
    

        
相关标签:
1条回答
  • 2021-01-18 20:01

    See this comment:

    http://www.php.net/manual/en/soapclient.setsoapheaders.php#93460

    So it would be like:

    $headerbody = array('UsernameKey'=>array('Username'=>$UserID,
                                             'Password'=>$Pwd)); 
    $header = new SoapHeader($ns, 'RequestorCredentials', $headerbody);       
    
    //set the Headers of Soap Client.
    $soap_client->__setSoapHeaders($header); 
    
    0 讨论(0)
提交回复
热议问题