Como consumir o serviço WCF com Android

Estou criando um servidor em .NET e um aplicativo cliente para Android. Gostaria de implementar um método de autenticação que envie nome de usuário e senha ao servidor e um servidor envie uma sequência de sessõe

Não conheço o WCF, então realmente aprecio sua ajuda.

Em java eu escrevi o seguinte método:

private void Login()
{
  HttpClient httpClient = new DefaultHttpClient();
  try
  {
      String url = "http://192.168.1.5:8000/Login?username=test&password=test";

    HttpGet method = new HttpGet( new URI(url) );
    HttpResponse response = httpClient.execute(method);
    if ( response != null )
    {
      Log.i( "login", "received " + getResponse(response.getEntity()) );
    }
    else
    {
      Log.i( "login", "got a null response" );
    }
  } catch (IOException e) {
    Log.e( "error", e.getMessage() );
  } catch (URISyntaxException e) {
    Log.e( "error", e.getMessage() );
  }
}

private String getResponse( HttpEntity entity )
{
  String response = "";

  try
  {
    int length = ( int ) entity.getContentLength();
    StringBuffer sb = new StringBuffer( length );
    InputStreamReader isr = new InputStreamReader( entity.getContent(), "UTF-8" );
    char buff[] = new char[length];
    int cnt;
    while ( ( cnt = isr.read( buff, 0, length - 1 ) ) > 0 )
    {
      sb.append( buff, 0, cnt );
    }

      response = sb.toString();
      isr.close();
  } catch ( IOException ioe ) {
    ioe.printStackTrace();
  }

  return response;
}

Mas, até agora, no servidor, ainda não descobri nad

Ficaria muito grato se alguém pudesse explicar como criar um método apropriado string Login (nome de usuário string, senha string) com configurações App.config apropriadas e Interface com assinatura [OperationContract] apropriada para ler esses dois parâmetros do cliente e responder com sequência de sessões.

Obrigado

questionAnswers(5)

yourAnswerToTheQuestion