2017-06-29 10 views
1

ページの上部にini_setdisplayエラーを書きましたが、ページは空白です。SOAP、CURL、PHPはエラーを表示しません

error_reporting(E_ALL); 
ini_set('display_errors', 1); 
$xml_data = ' 
<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soap:Body> 
    <WebLogin xmlns="http://www.example.com/2005/"> 
     <userLoginPlain>sdf</userLoginPlain> 
     <passwordPlain>sdsf</passwordPlain> 
     <keyOverride>sdfsdf</keyOverride> 
    </WebLogin> 
    </soap:Body> 
</soap:Envelope> 
'; 
$URL = "https:///exampleff.com/ForumXML.asmx"; 

$ch = curl_init($URL); 
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
$output = curl_exec($ch); 
curl_close($ch); 

print_r($output); 

答えて

2

XMLを受け取ったので、Chromeで[F12]を押して確認します。

さらに、SOAP-serverとの通信にSOAPクライアントを使用することをお勧めします。 http://php.net/manual/en/book.soap.php

関連する問題