从SOAP响应中获取XML

时间:2011-05-10 16:58:32

标签: php xml soap xml-parsing

  

可能重复:
  PHP: How to process SOAP response to get a tag value?

您好,

请给我一些建议如何从这个SOAP响应中通过PHP从CDATA部分(从ParNam XMLDocumentOut)获取XML数据。

谢谢

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
   <SOAP-ENV:Header>
      <wsa:MessageID SOAP-ENV:mustUnderstand="0">uuid:473366d0-17d8-11df-9c5a-fb03bc2bdd3b</wsa:MessageID>
      <wsa:To SOAP-ENV:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <ns1:wssigatewayResponse xmlns:ns1="urn:it-progress-operate:ws_operate">
         <ns1:result xsi:nil="true"/>
         <ttOut xmlns="urn:it-progress-operate:ws_operate">
            <ttOutRow>
               <ParPos>0</ParPos>
               <ParNam>ContentType</ParNam>
               <ParVal>text/xml</ParVal>
            </ttOutRow>
            <ttOutRow>
               <ParPos>1</ParPos>
               <ParNam>Result</ParNam>
               <ParVal>200</ParVal>
            </ttOutRow>
            <ttOutRow>
               <ParPos>2</ParPos>
               <ParNam>XMLDocumentOut</ParNam>
               <ParVal><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<DtsAgencyLoginResponse xmlns="DTS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="DTS file:///R:/xsd/DtsAgencyLoginMessage_01.xsd"><SessionInfo><SessionID>56480</SessionID><Profile>A</Profile><Language>ENG</Language><Version>1</Version></SessionInfo><AdvisoryInfo/></DtsAgencyLoginResponse>]]></ParVal>
            </ttOutRow>
         </ttOut>
         <ns1:opcErrorMessage/>
      </ns1:wssigatewayResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

0 个答案:

没有答案