Please refer to following examples
http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientFormLogin.java

http://hc.apache.org/httpcomponents-client/examples.html

Also ensure that your Android manifest xml file has the permission for using
the Internet. i.e. just after the ending
</application> tag you should have a line like this
<uses-permission android:name="android.permission.INTERNET"/>



Hope this helps.
- Sunit

On Wed, Nov 12, 2008 at 6:11 AM, AnuR <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I want to submit a web page through my application.
> for that I am using
> DefaultHttpClient httpclient = new DefaultHttpClient();
> HttpPost Postmethod = new HttpPost("url to post");//
>
> but on executing the httpclient, that is httpclient.execute
> (Postmethod),
>  I am getting an error
>
> javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated.
> sometimes the submit will work without any error but most of  the time
> this shows an error as follows
>
> ErrorIOException httpPostpeer not authenticated
> javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
>        at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates
> (SSLSessionImpl.java:352)
>        at org.apache.http.conn.ssl.AbstractVerifier.verify
> (AbstractVerifier.java:129)
>        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket
> (SSLSocketFactory.java:322)
>        at
> org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection
> (DefaultClientConnectionOperator.java:129)
>        at org.apache.http.impl.conn.AbstractPoolEntry.open
> (AbstractPoolEntry.java:164)
>        at org.apache.http.impl.conn.AbstractPooledConnAdapter.open
> (AbstractPooledConnAdapter.java:119)
>        at org.apache.http.impl.client.DefaultRequestDirector.execute
> (DefaultRequestDirector.java:347)
>        at org.apache.http.impl.client.AbstractHttpClient.execute
> (AbstractHttpClient.java:555)
>        at org.apache.http.impl.client.AbstractHttpClient.execute
> (AbstractHttpClient.java:653)
>        at org.apache.http.impl.client.AbstractHttpClient.execute
> (AbstractHttpClient.java:627)
>        at org.apache.http.impl.client.AbstractHttpClient.execute
> (AbstractHttpClient.java:616)
>
>
>
> PLease help me to solve this issue at the earliest (posting some
> sample code wil be more helpful as I am new to even JAVA )
>
> Thanks and regds
> ANU R
> >
>


-- 
- Sunit Katkar
http://sunitkatkar.blogspot.com/ - Android OS Tutorials

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to