如何创建php soap身份验证标头

时间:2016-06-11 19:56:00

标签: 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://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>

怎么做?

0 个答案:

没有答案