Hi!
I want to connect to my web service (.net) via HTTPS, it works perfectly
with http but i can 't make it work over https, the cause is that it
verifies the certificate i wan't to simulate the fact that it's "validated
ok" i found a topic about it and i tried to use the code but it doesn't work
with soap
*
try
*
{
SoapObject request = *new* SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope =
*new*SoapSerializationEnvelope(SoapEnvelope.
*VER11*);
envelope.dotNet=*true*;
envelope.setOutputSoapObject(request);
HttpURLConnection http = *null*;
URL url=*new* URL(URL);
*if* (url.getProtocol().toLowerCase().equals("https")) {
*trustAllHosts*();
HttpsURLConnection https = (HttpsURLConnection) url.openConnection();
https.setHostnameVerifier(*DO_NOT_VERIFY*);
http = https;
} *else* {
http = (HttpURLConnection) url.openConnection();
}
HttpTransportSE androidHttpTransport = new HttpTransportSE(http.toString());
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject)envelope.getResponse();
}
*catch*(Exception e){}
Can any one help me to solve this issue.
Thx
--
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