title: Android: Can't parse null values from SOAP response (kSoap2)
body: <p>When parsing the SoapObject data into a String[], the empty fields in the response from the webservice do not get added to it and I can't identify the empty propeties by checking for null or "".</p>
  
  <p>So my problem is basically: The SoapObject contains the right amount of properties, but the parsed result (String[]) does not contain the ones that are empty, nor can I check for empty properties and add "" to the String[].</p>
  
  <p>This causes problems for me when saving to the SQLite DB since every e.g. "User" contains a different amount of fields.</p>
  
  <pre><code>public static String[] getStringArrayResponse(SoapObject node, Vector&lt;String&gt; strings) {
  
      boolean isFirstCall = false;
  
      if (strings == null) {
          isFirstCall = true;
          strings = new Vector&lt;String&gt;();
      }
  
      int count = node.getPropertyCount(); 
  
      for (int i = 0; i &lt; count; i++) {
  
          Object obj1 = node.getProperty(i);
  
          if (obj1 instanceof SoapObject) {
              if (((SoapObject)obj1).getPropertyCount() &gt; 0) {
                  // Returns the correct amount of properties
                  Log.d("PARSER", "propertycount = " +((SoapObject)obj1).getPropertyCount());
                  getStringArrayResponse((SoapObject)obj1, strings);
              }
          } else if (obj1 instanceof SoapPrimitive) { 
              strings.add(((SoapPrimitive)obj1).toString());
          } 
      }
  
      if (isFirstCall) {
          return (String[])strings.toArray(new String[strings.size()]);
      }
      return null;
  }
  </code></pre>
  
  <p>This is really giving me a headache and I'm grateful for any help I can get :)</p>