dsjbest2014 2016-03-02 11:45
浏览 110
已采纳

php nusoap服务器无法读取标头安全性

I'am a newbie to SOAP and I was asked to building a nusoap customized client and server. Actually, I am having a problem reading the following nusoap request 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>

In fact I've had hard time managing to send it from the client side; finally, I was able to send it using serializeEnvelope() and send() nusoap functions. Right now, I can't find a way to read it from the server side. it show the following error message: "Undefined index: wsa". Can any one help me please.

Thank you

  • 写回答

1条回答 默认 最新

  • doumu5662 2016-03-14 10:46
    关注

    In fact I have just found a way to catch the header elements. here is how: $request= get_defined_vars(); $request["GLOBALS"]["GLOBALS"]["HTTP_RAW_POST_DATA"] contains all the data received at the server side.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog