卷曲返回'资源ID#2'为什么回应?

时间:2014-09-26 18:25:51

标签: php curl soap request

我有以下curl执行SOAP请求

$soap_do = curl_init();
            curl_setopt($soap_do, CURLOPT_URL,"http://uat-api.gafoorkp.in/services/simulator");
            curl_setopt($soap_do, CURLOPT_RETURNTRANSFER,true);
            curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER,false);
            curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST,false);
            curl_setopt($soap_do, CURLOPT_POST,true);            
            curl_setopt($soap_do, CURLOPT_POSTFIELDS,"<?xml version='1.1'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:sas='http://uat-api.gafoorkp.in/services/simulator'><SOAP-ENV:Body><sas:Login><Username>demo</Username><Password>demo</Password></sas:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>");
            // $report=curl_getinfo($soap_do);
            if(curl_exec($soap_do) === false)
            {                
                $err = 'Curl error: ' . curl_error($soap_do);
                curl_close($soap_do);
                echo $err;
            }
            else
            {
                curl_close($soap_do); 
                echo 'Operation completed without any errors';
                print_r($soap_do);
                // print_r($report);
            }

这段代码在浏览器中给出了一个“Resource ID #2”的响应,我想要得到一个xml响应。为什么会发生这种情况,我在做什么有什么问题?

也没有返回卷曲错误

0 个答案:

没有答案