大家好:
    小弟新学Android,在学习过程中遇到了个问题,请大神们指点哈!!    我想用安卓调用C#的WCF ,WCF我已经写好,并且可以获取到数据,
我写了个调用WCF的类,使用GET方法。代码如下:
         private static final int TIME_OUT=1000*6;//超时
private static final String METHOD_POST="POST";
private static final String METHOD_GET="GET";
private static final int HTTP_OK=200;
          /**
 * 访问WCF使用Get方法
 */
public String httpGet(String urlStr)
{
URL url=null;
HttpURLConnection conn=null;
InputStream inStream=null;
String response=null;
try
{
url=new URL(urlStr);
conn=(HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.setConnectTimeout(TIME_OUT);
conn.setRequestMethod(METHOD_GET);
conn.setRequestProperty("accept", "*/");
conn.connect();
int responseCode=conn.getResponseCode();
if(responseCode==HTTP_OK)
{
inStream=conn.getInputStream();
response=getResponse(inStream);
}
else
{
response="返回值:"+responseCode;

}
}
catch(Exception e)
{
e.printStackTrace();

}
finally
{
conn.disconnect();
}
return response;
}
调用方法 如下:
TextView txtView=(TextView)findViewById(R.id.msgShow);
txtView.setText("准备下载中,请稍后......");
BasicHttpClient httpClient=new BasicHttpClient();
String msgStr=httpClient.httpGet("http://192.168.1.88/MealForAndroid/Service1.svc/GetServerDateTime");
txtView.setText(txtView.getText()+"\n"+msgStr);
返回值为400,   http://192.168.1.88/MealForAndroid/Service1.svc   地址是WC部署在IIS上的,GetServerDateTime是一个方法,用于获取服务器时间,不带参数,这个地址该怎么写呢???
请大神指点啊啊啊!AndroidC#WCF URLAndroid调用WCF