I am trying to use a .NET service in Android Application using the ksoap2 library. I added the reference to the jar of ksoap2-android-assembly-2.6.5-jar-with-dependencies in my project. But when I run the code I get a runtime exception saying
java.lang.NoClassDefFound : org.ksoap2.serialization.SoapObject.
Can anyone please help ? This is my code.
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
tvTemp.setText("Received :" + resultsRequestSOAP.toString());
} catch (Exception e) {
e.printStackTrace();
}