title: Soap content length
body: <p>I look at the following is a sample SOAP 1.1 request to SP server, but its does not matter.</p>
  
  <pre><code>POST /_vti_bin/lists.asmx HTTP/1.1
  Host: 192.168.0.25
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetList"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt;
        &lt;listName&gt;string&lt;/listName&gt;
      &lt;/GetList&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>The field   <em>Content-Length: length</em> need to be replaced with actual values. What its value? Where is I can see it? Or how to calculate it value before request?</p>
  
  <p><strong>UPD1.</strong>
  I use ksoap lib</p>
  
  <pre><code> headerPropertyObj = new HeaderProperty("Content-Length", "383"); // should be calc before
   headerList.add(headerPropertyObj);
  
      transport.setUrl(URL);
      request = new SoapObject(NAMESPACE, METHOD_NAME);
  
     request.addProperty("listName", "Tasks");
  
  
      envelope.setOutputSoapObject(request);
  
      transport.call(SOAP_ACTION, envelope, headerList);
  </code></pre>