Odserializuj obiekt JSON wysłany z aplikacji Android do serwisu WWW WCF

Próbuję wysłać obiekt JSON do mojej metody usługi sieciowej, metoda jest zdefiniowana w ten sposób:

public String SendTransaction(string trans)
{
            var json_serializer = new JavaScriptSerializer();
            Transaction transObj = json_serializer.Deserialize<Transaction>(trans);
            return transObj.FileName;       
}

Gdzie chcę zwrócić FileName tego łańcucha JSON, który otrzymałem jako parametr.

Kod aplikacji na Androida:

HttpPost request = new HttpPost(
                "http://10.118.18.88:8080/Service.svc/SendTransaction");
        request.setHeader("Accept", "application/json");
        request.setHeader("Content-type", "application/json");

        // Build JSON string
        JSONStringer jsonString;

        jsonString = new JSONStringer()
                .object().key("imei").value("2323232323").key("filename")
                .value("Finger.NST").endObject();

        Log.i("JSON STRING: ", jsonString.toString());

        StringEntity entity;

        entity = new StringEntity(jsonString.toString(), "UTF-8");

        entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,
                "application/json"));
        entity.setContentType("application/json");

        request.setEntity(entity);

        // Send request to WCF service
        DefaultHttpClient httpClient = new DefaultHttpClient();

        HttpResponse response = httpClient.execute(request);
        HttpEntity httpEntity = response.getEntity();
        String xml = EntityUtils.toString(httpEntity);

        Log.i("Response: ", xml);
        Log.d("WebInvoke", "Status : " + response.getStatusLine());

Dostaję tylko długi plik html, który mi mówiThe server has encountered an error processing the request. A kod statusu toHTTP/1.1 400 Bad Request

Moja klasa transakcji jest zdefiniowana w języku C # w następujący sposób:

 [DataContract]
public class Transaction
{
    [DataMember(Name ="imei")]
    public string Imei { get; set; }

    [DataMember (Name="filename")]
    public string FileName { get; set; }
}

Jak mogę to osiągnąć we właściwy sposób?

EDIT, to jest mój web.config

 <?xml version="1.0"?>
<configuration>

  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.serviceModel>
    <behaviors>

          <endpointBehaviors>
            <behavior name="httpBehavior">
                <webHttp />
            </behavior >
        </endpointBehaviors>

      <serviceBehaviors>
        <behavior name="">
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
    <services>
      <service name="Service.Service">
        <endpoint address="" behaviorConfiguration="httpBehavior" binding="webHttpBinding" contract="Service.IService"/>
      </service>
    </services>

    <protocolMapping>
        <add binding="webHttpBinding" scheme="http" />
    </protocolMapping>

    <!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />-->
  </system.serviceModel>
  <system.webServer>
  <!-- <modules runAllManagedModulesForAllRequests="true"/>-->
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
  </system.webServer>

</configuration>

questionAnswers(1)

yourAnswerToTheQuestion