php nusoap 服务器无法读取 header 安全

php nusoap server unable to read header security

我是 SOAP 的新手,我被要求构建一个 nusoap 定制的客户端和服务器。实际上,我在阅读以下 nusoap 请求时遇到问题 header.

<wsa:Action> OTA_HotelRatePlanRQ </wsa:Action> 
<wsa:From> 
    <wsa:Address> urn:connect </wsa:Address> 
</wsa:From> 
<wsa:To> PartnerURL </wsa:To> 
<wsa:ReplyTo> 
    <wsa:Address> http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous </wsa:Address> 
</wsa:ReplyTo> 
<wsa:MessageID> 5f2c4c6b-642f-4d07-ad9c-02e5b5cdaa29 </wsa:MessageID> 
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken wsu:Id="SecurityToken-627f1ab1-338a-451f-9829-84f248e57ad8" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsse:Username> Username </wsse:Username> 
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile1.0#PasswordText"> password </wsse:Password> 
        <wsu:Created> 2014-12-19T16:09:15 </wsu:Created> 
    </wsse:UsernameToken> 
</wsse:Security>

事实上,我很难设法从客户端发送它;最后,我能够使用 serializeEnvelope() 和 send() nusoap 函数发送它。现在,我找不到从服务器端读取它的方法。它显示以下错误消息:"Undefined index: wsa"。谁能帮帮我。

谢谢

事实上,我刚刚找到了一种捕捉 header 元素的方法。 方法如下: $request= get_defined_vars(); $request["GLOBALS"]["GLOBALS"]["HTTP_RAW_POST_DATA"] 包含服务器端接收到的所有数据。