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 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)