肥皂卷曲请求工作,但响应不

时间:2011-07-26 18:08:32

标签: php xml soap curl response

我应该在服务器收到我发送的字符串后收到一个名为“D”的变量。如何让它接收服务器响应消息?

$soapme = curl_init(); 
curl_setopt($soapme, CURLOPT_URL,            $url );   
curl_setopt($soapme, CURLOPT_CONNECTTIMEOUT, 10); 
curl_setopt($soapme, CURLOPT_TIMEOUT,        10); 
curl_setopt($soapme, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soapme, CURLOPT_SSL_VERIFYPEER, false);  
curl_setopt($soapme, CURLOPT_SSL_VERIFYHOST, false); 
curl_setopt($soapme, CURLOPT_POST,           true ); 
curl_setopt($soapme, CURLOPT_POSTFIELDS,    $post_string); 
curl_setopt($soapme, CURLOPT_HTTPHEADER,     array('Content-Type: text/xml; charset=utf-8', 'Content-Length: '.strlen($post_string) )); 
curl_setopt($soapme, CURLOPT_USERPWD, $user . ":" . $password);
curl_setopt($soapme, curlOPT_VERBOSE, 1); 
curl_exec($soapme);

我注意到当我不使用ReturnTransfers时,我得到1。这意味着什么?

1 个答案:

答案 0 :(得分:0)

$result = curl_exec($soapme);
echo $result;