解决SOAP错误[Client] looks like we got no XML document

由于服务器配置不规范等等原因都会导致此类错误解决

http://my.oschina.net/cart/

class SoapClientNew extends SoapClient  
{  
    public function __doRequest($request,$location,$action,$version,$one_way = 0)  
    {  
        $request = parent::__doRequest($request,$one_way);  
        
        $start = strpos($request,'<soap');//根据实际情况做处理。。。,如果是<?xml开头,改成<?xml
        $end = strrpos($request,'>');  
        return substr($request,$start,$end-$start+1);  
    }  
}
调用
$client = new SoapClientNew($url);
完美解决

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念