从git下载项目后,Android ksoap2无法正常工作

时间:2017-09-10 20:17:36

标签: android git web-services netbeans ksoap2

我有一个Android客户端使用带有ksoap2库的netbeans webservice。它一直工作到昨天,当时我不得不格式化我的电脑。

我从git下载了我的项目,现在它没有工作,它只是让我超时异常,即使web服务工作正常。

这是使用web服务的类:

function getHost($url) { 
   $parseUrl = parse_url(trim($url)); 
   if(isset($parseUrl['host']))
   {
       $host = $parseUrl['host'];
   }
   else
   {
        $path = explode('/', $parseUrl['path']);
        $host = $path[0];
   }
   return trim($host); 
} 

echo getHost("http://example.com/anything.html");           // example.com
echo getHost("http://www.example.net/directory/post.php");  // www.example.net
echo getHost("https://example.co.uk");                      // example.co.uk
echo getHost("www.example.net");                            // example.net
echo getHost("subdomain.example.net/anything");             // subdomain.example.net
echo getHost("example.net");                                // example.net

我的netbeans webservice:

netbeans webservice

我忘记了什么吗?我只是没有得到它,它只是在我必须格式化我的计算机之前工作,而我的本地版本就像git存储库中的最后一个版本。

1 个答案:

答案 0 :(得分:0)

所以,如果它对任何人都有帮助,那么这里发生了什么。我的项目没有任何问题,问题只是将我在Windows上的网络位置从公共切换到私有。如果我以前只知道这一点,我就不会失去一周的调试和祈祷。

相关问题