Consuming Wcf from Android , bad request error
<p>Im trying to consume Wcf from Android , my code</p>

<pre><code>private final static String SERVICE_URI = "http://188.59.2.211:8081/Survey.svc";

String email = "xx@gmail.com";
String password = "123";

public void onResume() {
        super.onResume();

        Login(email,password);
    }

private void Login(String email, String password)
    {
        try {

        URL url = new URL(SERVICE_URI + "/Login/email="+email+"&amp;password="+password);
            HttpGet request = new HttpGet(url.toURI());
            request.setHeader("Accept", "application/json");
            request.setHeader("Content-type", "application/json");

            HttpClient httpClient = new DefaultHttpClient();
            HttpResponse response = (HttpResponse) httpClient.execute(request);
            if ( response != null )
            {
              Log.i( "login", "received " + response.toString());
            }
            else
            {
              Log.i( "login", "got a null response" );
            }

            HttpEntity responseEntity = response.getEntity();

            // Read response data into buffer
            char[] buffer = new char[(int)responseEntity.getContentLength()];
            InputStream stream = responseEntity.getContent();
            InputStreamReader reader = new InputStreamReader(stream);
            reader.read(buffer);
            stream.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
</code></pre>

<p>and the wcf service side, </p>

<pre><code>[ServiceContract(Namespace = "http://saas.com")]
public interface ISurvey
{
    [OperationContract]
    [WebGet(
       UriTemplate = "/Login/email={email}&amp;password={password}",
       BodyStyle = WebMessageBodyStyle.WrappedRequest,
       ResponseFormat = WebMessageFormat.Json,
       RequestFormat = WebMessageFormat.Json)]
    LoginResult Login(string email, string password);
}
</code></pre>

<p>and my config,</p>

<pre><code>&lt;system.serviceModel&gt;
&lt;behaviors&gt;
  &lt;endpointBehaviors&gt;
    &lt;behavior name="httpBehavior"&gt;
      &lt;webHttp /&gt;
    &lt;/behavior&gt;
  &lt;/endpointBehaviors&gt;
  &lt;serviceBehaviors&gt;
    &lt;behavior&gt;
      &lt;serviceMetadata httpGetEnabled="true"/&gt;
      &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
    &lt;/behavior&gt;
  &lt;/serviceBehaviors&gt;
&lt;/behaviors&gt;
&lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
&lt;services&gt;
  &lt;service name="SAASService.Survey"&gt;
    &lt;endpoint address=""
              behaviorConfiguration="httpBehavior"
              binding="webHttpBinding"
              contract="SAASService.ISurvey" /&gt;
    &lt;endpoint address="mex"
              binding="mexHttpBinding"
              contract="IMetadataExchange" /&gt;
  &lt;/service&gt;
&lt;/services&gt;
</code></pre>

<p></p>

<p>The problem is that, Im using the below url, </p>

<p>"http://188.59.2.211:8081/Survey.svc/Login/email=xx@gmail.com&amp;password=123"</p>

<p>and it is always  giving "Bad Request" error , statusCode = 400</p>

<p>What is wrong?</p>
