php7 - php 解析SOAP的xml失敗
ringa_lee
ringa_lee 2017-05-16 13:14:49
0
2
2615
$xmlStr = <<<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>
        <client_insetResponse xmlns="http://120.26.103.193:2017/webservices/">
            <client_insetResult>0|</client_insetResult>
        </client_insetResponse>
    </soap:Body>
</soap:Envelope>
xml;
$xmlObj = simplexml_load_string($xmlStr);
var_dump($xmlObj);

上面程式碼列印結果為空對象,說明解析失敗

ringa_lee
ringa_lee

ringa_lee

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!