title: Unable to authenticate services
body: <p>i need to authenticate my services with username and passwor i have try <a href="http://www.anddev.org/novice-tutorials-f8/example-for-restful-web-service-authentication-t51172.html" rel="nofollow"><strong>this</strong></a> but not get sucess can you help me </p>
  
  <p>when i print inlog cat i got :: </p>
  
  <p><strong>Update 3 ::</strong> </p>
  
  <pre><code>11-04 16:07:58.767: INFO/System.out(1531): Returned ======&gt;&gt;&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;soap:Body&gt;&lt;soap:Fault&gt;&lt;soap:Code&gt;&lt;soap:Value&gt;soap:Receiver&lt;/soap:Value&gt;&lt;/soap:Code&gt;&lt;soap:Reason&gt;&lt;soap:Text xml:lang="en"&gt;Server was unable to process request. ---&amp;gt; Data at the root level is invalid. Line 1, position 1.&lt;/soap:Text&gt;&lt;/soap:Reason&gt;&lt;soap:Detail /&gt;&lt;/soap:Fault&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
  </code></pre>
  
  <p><strong>Code ::</strong> </p>
  
  <pre><code>   DefaultHttpClient UserIDclient = new DefaultHttpClient();
                   HttpPost httppost = new HttpPost(url);
                   List&lt;BasicNameValuePair&gt; nvps = new ArrayList&lt;BasicNameValuePair&gt;();
                   nvps.add(new BasicNameValuePair("username","password"));
                   UrlEncodedFormEntity p_entity = new UrlEncodedFormEntity(nvps,HTTP.UTF_8);
                   httppost.setEntity(p_entity);
                   HttpResponse response = UserIDclient.execute(httppost);
                   HttpEntity resEntity = response.getEntity();
                      Returned = EntityUtils.toString(resEntity);
                      System.out.println("ans is :: "+ Returned);
  
              System.out.println("Returned ======&gt;&gt;&gt; "+Returned);
  </code></pre>