Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/252.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何创建php soap身份验证头_Php_Soap_Header - Fatal编程技术网

如何创建php soap身份验证头

如何创建php soap身份验证头,php,soap,header,Php,Soap,Header,由于不熟悉SOAP,我需要使用php创建此标头: <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="true"> <wsse:UsernameToken xmlns:wsu=http://doc

由于不熟悉SOAP,我需要使用php创建此标头:

<soapenv:Header>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="true">
        <wsse:UsernameToken xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-utility-1.0.xsd wsu:Id="UsernameToken-21621663">
            <wsse:Username>myusername</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-usernametoken-profile-1.0#PasswordText">mypassword</wsse:Password>
        </wsse:UsernameToken>
    </wsse:Security>
</soapenv:Header>

我的用户名
我的密码
如何执行此操作?

检查此链接检查此链接