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 [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