Hi,

This means your server is not trusted.
The reason can be that the server certificate is not valid or self-
signed.

Either you have to bypass this by implementing your "own certificate
validation" (I would not do it except if you have no other choices) or
add the server certificate to your keystore (http://
download.oracle.com/javase/1.4.2/docs/api/java/security/KeyStore.html)
or make the server certificate signed by a a valid Certificate
authority.

Kim

On 25 sep, 21:04, Gold <thangadura...@gmail.com> wrote:
> hi..All,
>
>                  I access asp.net web service..! My web service name
> is "https://192.168.1.2/Sample/service.asmx";
>
>                  But it will show the following Exception
>
>                 " javax.net.ssl.SSLException: Not trusted server
> certificate"
>
>                   This is my code
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> import org.ksoap2.SoapEnvelope;
> import org.ksoap2.serialization.SoapObject;
> import org.ksoap2.serialization.SoapPrimitive;
> import org.ksoap2.serialization.SoapSerializationEnvelope;
> import org.ksoap2.transport.HttpTransportSE;
>
> public class Start extends Activity
> {
>
>     private static final String SOAP_ACTION = "http://tempuri.org/
> OnAvailable";
>     private static final String METHOD_NAME = "OnAvailable";
>     private static final String NAMESPACE = "http://tempuri.org/";;
>     private static final String URL = "https://192.168.1.2/Sample/
> service.asmx";
>
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState)
>     {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         TextView tv = ((TextView)findViewById(R.id.resultView));
>
>         SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
>         request.addProperty("ID","Started");
>
>         SoapSerializationEnvelope envelope = new
> SoapSerializationEnvelope(SoapEnvelope.VER11);
>         envelope.setOutputSoapObject(request);
>         envelope.dotNet=true;
>
>         HttpTransportSE androidHttpTransport = new
> HttpTransportSE(URL);
>         try
>         {
>                 androidHttpTransport.call(SOAP_ACTION, envelope);
>                 SoapPrimitive result = (SoapPrimitive)envelope.getResponse();
>
>                 String results = String.valueOf(result);
>                 tv.setText(results);
>         }
>         catch (Exception excep)
>         {
>                 excep.printStackTrace ();
>         }
>
>     }
>
> }
>
> what was the problem.. please help me...!
>
> Thanks in advance,
> Gold

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

Reply via email to