Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP中对数组的Soap XML响应_Php_Asp.net_Xml_Soap - Fatal编程技术网

PHP中对数组的Soap XML响应

PHP中对数组的Soap XML响应,php,asp.net,xml,soap,Php,Asp.net,Xml,Soap,我试图通过PHP阅读ASP web服务。Web服务工作正常,它返回一个带有soap头的XML。我尝试使用php中读取xml的常规方法来读取xml。但由于xml中有额外的soap标记,所以无法读取 这是我的soap响应。 我需要使用PHP将此XML放入数组 <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmln

我试图通过PHP阅读ASP web服务。Web服务工作正常,它返回一个带有soap头的XML。我尝试使用php中读取xml的常规方法来读取xml。但由于xml中有额外的soap标记,所以无法读取

这是我的soap响应。 我需要使用PHP将此XML放入数组

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <SayHelloResponse xmlns="http://tempuri.org/">
    <SayHelloResult>
    <Students xmlns="">
    <St>
    <name>Sanath</name>
    <age>20</age>
    </St>
    <St>
    <name>Mahela</name>
    <age>21</age>
    </St>
    </Students>
    </SayHelloResult>
    </SayHelloResponse>
    </soap:Body></soap:Envelope> 

萨纳特
20
马赫拉
21

您的问题是什么?您的正常方式是什么?我需要将此soap xml响应放到PHP数组中。我已经尝试过这样做,但问题是由于soap信封(soap标记标记)的原因,它无法工作。没有这些标题,它工作得很好。请帮忙。