title: SoapFault - faultcode: 'soap:Server' faultstring: 'Server was unable to process request.Object reference not set to an instance of an object
body: <p>I have a webservice programmed in asp.net . I want to reach webservice from android application using SOAP(ksoap2) .</p>
  
  <p>Here is my soap segment,</p>
  
  <pre><code>//Namespace of the Webservice - can be found in WSDL
  private static String NAMESPACE = "http://tempuri.org/";
  //Webservice URL - WSDL File location
  private static String URL = "http://locationbasedapp.net/Service1.asmx";//Make sure you changed IP address
  //SOAP Action URI again Namespace + Web method name
  private static String SOAP_ACTION = "http://tempuri.org/";
  
  public static String invokeListLocationsWS(String datetext, String webMethName) {
      String xmlDataSet = "";
      // Create request
      SoapObject request = new SoapObject(NAMESPACE, webMethName);
      // Property which holds input parameters
      PropertyInfo datetextPI = new PropertyInfo();
      PropertyInfo passPI = new PropertyInfo();
      // Set Username
      datetextPI.setName("datetext");
      // Set Value
      datetextPI.setValue(datetext);
      // Set dataType
      datetextPI.setType(String.class);
      // Add the property to request object
      request.addProperty(datetextPI);
  
      // Create envelope
      SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
              SoapEnvelope.VER11);
      envelope.dotNet = true;
      // Set output SOAP object
      envelope.setOutputSoapObject(request);
      // Create HTTP call object
      HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
  
      try {
          // Invoke web service
          androidHttpTransport.call(SOAP_ACTION+webMethName, envelope);
          // Get the response
          SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
          // Assign it to  boolean variable variable
  
          xmlDataSet =response.toString();
  
      } catch (Exception e) {
          //Assign Error Status true in static variable 'errored'
          MapActivity.errored = true;
          e.printStackTrace();
      }
      //Return booleam to calling object
      return xmlDataSet;
  }
  </code></pre>
  
  <p>While I am debugging the code , I have an error as mentioned on the question title. The error is seen on the</p>
  
  <pre><code>SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
  </code></pre>
  
  <p>line..</p>
  
  <p>I think I can't get response from webservice. How Can I fix it ? </p>
  
  <p>Webservice returns xml.InnerText. It's type String.</p>
  
  <p>Please answer me.  </p>