title: kSoap2 unexpected type(position:END_DOCUMENT null@1:1 in java.io InputStreamReader@414fae00)
body: <p>I'm trying to get a response from the method <code>Querypage</code>. An example of a request can be found <a href="http://www.labs.skanetrafiken.se/v2.2/querypage.asp?inpPointFr=lund&amp;inpPointTo=ystad" rel="nofollow">here</a> and the "documentation" can be found <a href="http://www.labs.skanetrafiken.se/v2.2/GetStartEndPoint.xsd" rel="nofollow">here</a></p>
  
  <p>The API can be found <a href="http://www.labs.skanetrafiken.se/api.asp" rel="nofollow">here</a> (tick the box at the bottom and click the button to see the api-page, it's basically just a way for them to make sure that you've read the rules etc.).</p>
  
  <pre><code>public class KSoap2Activity extends Activity {
      private static final String SOAP_ACTION =  "http://www.etis.fskab.se/v1.0/ETISws/Querypage";
      private static final String METHOD_NAME = "Querypage";
      private static final String NAMESPACE = "http://www.etis.fskab.se/v1.0/ETISws";
      private static final String URL = "http://www.labs.skanetrafiken.se/v2.2/querypage.asp";
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      TextView tv = (TextView) findViewById(R.id.text);
  
      SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
      request.addProperty("inpPointFr", "lund");
      request.addProperty("inpPointTo", "ystad");
      SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
      envelope.dotNet = true;
      envelope.setOutputSoapObject(request);
      HttpTransportSE ht = new HttpTransportSE(URL);
      ht.debug = true;
  
      try {
          ht.call(SOAP_ACTION, envelope);
          SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
          tv.setText("Message :" + response.toString());
      } catch (Exception e) {
          e.printStackTrace();
          tv.setText(e.getMessage()+ ht.requestDump);
      }
  }
  </code></pre>
  
  <p>}  </p>
  
  <p>I'm receiving an exception: <code>unexpected type(position:END_DOCUMENT null@1:1 in java.io InputStreamReader@414fae00)</code>.</p>
  
  <p>This is the requestDump:</p>
  
  <pre><code>&lt;v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;v:Header /&gt;
      &lt;v:Body&gt;
          &lt;Querypage xmlns="http://www.etis.fskab.se/v1.0/ETISws" id="o0" c:root="1"&gt;                                                   
              &lt;inpPointFr i:type="d:string"&gt;lund&lt;/inpPointFr&gt;
              &lt;inpPointTo i:type="d:string"&gt;ystad&lt;/inpPointTo&gt;
          &lt;/Querypage&gt;
      &lt;/v:Body&gt;
  &lt;/v:Envelope&gt;
  </code></pre>