title: Android ksoap 2 (2.6) web service with android 2.2 version ko and not with android 4.0.3
body: <p><strong>My call of web service is ok with android 4.0.3</strong> but <strong>it is Ko with 2.2 version</strong>. 
  It's a SOAP web service JBOSS 4.2.2. 
  use ksoap2-android-assembly-2.6.0</p>
  
  <p>I have an exception: </p>
  
  <p>unexpected type (position:END_DOCUMENT null@1:0 in java.io.InputStreamReader@44f36cb0) </p>
  
  <p>the code:</p>
  
  <pre><code>private static final String METHOD_NAME_findBeneficiaireLight = "findBeneficiaireLight";
  private static final String NAMESPACE = "http://service.android.interiale.fr/";
  private static final String URL = "http://10.0.2.2:8090/mgpatInternet-mgpatInternetEJB/AdherentService";
  
  public BeneficiaireLight getBeneficiaire(String user_id, String password, SharedPreferences settings)
          throws AuthentificationFailureException, WebConnectionException {
      BeneficiaireLight results = null;
  
      SoapObject request = new SoapObject(NAMESPACE,
              METHOD_NAME_findBeneficiaireLight);
      request.addProperty("arg0", user_id);
  
      SoapSerializationEnvelope soapenvelope = new SoapSerializationEnvelope(
              SoapEnvelope.VER11);
  
      soapenvelope.setOutputSoapObject(request);
      soapenvelope.addMapping(NAMESPACE,
              BeneficiaireLight.BeneficiaireLight_CLASS.getSimpleName(),
              BeneficiaireLight.BeneficiaireLight_CLASS);
  
      HttpTransportSE httptransport = new HttpTransportSE(URL);
       httptransport.debug = true;
  
      List&lt;HeaderProperty&gt; headers = new ArrayList&lt;HeaderProperty&gt;();
      headers.add(new HeaderProperty("Authorization", "Basic "
              + Base64.encodeToString(
                      (user_id.toLowerCase() + ":" + password).getBytes(),
                      Base64.DEFAULT)));
  
      try {
          httptransport.call(NAMESPACE + METHOD_NAME_findBeneficiaireLight,
                  soapenvelope, headers);
          Object res = (Object)soapenvelope.getResponse();
  
          if (res instanceof SoapObject) {
              results = new BeneficiaireLight((SoapObject) res);
  
  
          }
  
      } catch (SocketException ex) {
          Log.e("Error : ", "Error on getBeneficiaire() " + ex.getMessage());
          throw new WebConnectionException("service " + NAMESPACE
                  + METHOD_NAME_findBeneficiaireLight + " KO", ex);
      } catch (Exception e) {
          Log.e("Error : ", "Error on getBeneficiaire() " + e.getMessage());
          throw new AuthentificationFailureException();
      }
      return results;
  </code></pre>