使用PHP simplexml_load_file或SoapClient()解析Soap响应

时间:2013-12-07 20:02:34

标签: php xml soap simplexml

有人可能知道如何用PHP解析Soap Response的BookingResponse元素。我好几个小时都被困住了。没有任何效果。我尝试了SoapClient()和simplexml_load_file()和xpath。什么都没有导致可用的东西。 :(

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <BatchDisplayBookingResponse xmlns="http://www.server.com/url">
         <BatchDisplayBookingResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <BookingResponse>
               <SessionId>theSessionId</SessionId>
               <Version i:nil="true"/>
               <Currency>EUR</Currency>
               <Success>true</Success>
               <Code>100</Code>
               <Messages>
                  <Text>This is a text 1</Text>
                  <Text>This is a text 1</Text>
               </Messages>
            </BookingResponse>
         </BatchDisplayBookingResult>
      </BatchDisplayBookingResponse>
   </s:Body>
</s:Envelope>

非常感谢 TA

0 个答案:

没有答案
相关问题