title: Android communicate with ASPX webservice
body: <p>I want to send and recieve data from a aspx webservice but i keep getting null response. Can anyone help me and solve this issue. Thanks!</p>
  
  <p>Here is the code im using:</p>
  
  <pre><code>private static String METHOD_NAME = "CheckVersion";
      private static String NAMESPACE = "http://tempuri.org/";
      private static String URL = "http://grpsvil.si2001.it/APIClient/Contents/RestPartnerTest.aspx";
      private static String SOAP_ACTION = "http://tempuri.org/";
  
      public void uploadToServer() {
          Log.v("--", "fn called!");
  
          SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
          request.addProperty("ApiKey",
                  "apikey");
          request.addProperty("OperativeSystem", 0);
          request.addProperty("AppVersion", 1);
          request.addProperty("WebServiceVersion", 1);
  
          SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(
                  SoapSerializationEnvelope.VER12);// or 12
          soapEnvelope.dotNet = true;
          soapEnvelope.setOutputSoapObject(request);
          Log.v("--", "2");
          AndroidHttpTransport aht = new AndroidHttpTransport(URL);
          SoapPrimitive resultString;
          try {
              aht.call(SOAP_ACTION, soapEnvelope);
  
              resultString = (SoapPrimitive) soapEnvelope.getResponse();
              Log.v("--", "Responce: " + resultString);
          } catch (IOException e) {
              // TODO Auto-generated catch block
              resultString = (SoapPrimitive) soapEnvelope.bodyIn;
              Log.v("--", resultString + " 1");
              e.printStackTrace();
          } catch (XmlPullParserException e) {
              // TODO Auto-generated catch block
              resultString = (SoapPrimitive) soapEnvelope.bodyIn;
              Log.v("--", resultString + " 2");
              e.printStackTrace();
          }
      }
  </code></pre>