Have tried the KSOAP2 library from a console application using the Eclipse IDE talking to a .NET web service located at http://www.w3schools.com/webservices/tempconvert.asmx. No problem, easy and straight forward. Embedded the code in a simple method, test().
The problem started when I wanted everything to work from an Android application.
Here is a summary of what I have done (and the problem):
1. I generated a new Android project in Eclipse IDE using the Android 2.3.1 SDK and I created also an Android Virtual Device based on the same SDK. No problem when starting the virtual device. Worked just fine.
2. Then I added the uses-permission tag with android:name="android.permission.INTERNET" in AndroidManifest.xml file.
3. After that I added the KSOAP2 library exactly as I did when making the console application.
4. Now I added the method test(), earlier tested and validated, including the correct import statements. Everything looked good. No warnings.
5. Compiled and started the project and on the first line of code I got a class loader failure of SoapObject, i.e. "could not found" org.ksoap2.serialization.SoapObject. The line of code looked something liked this: SoapObject objSoapTest = new SoapObject("http://tempuri.org/", "FahrenheitToCelsius");
Tried to see if it could detect some other class in the same package hence I added this line of code before the above mentioned code: PropertyInfo objPropertyInfo = new PropertyInfo();
Got the same problem... "could not found" org.ksoap2.serialization.PropertyInfo.
What can be the problem here? Have tried to change the "Order and Export" in Java Build Path but with no result. Do I need to put this KSOAP2 library where I have the Android SDK files? I am an hardcore C++ programmer so I dont have so much experience with Eclipse IDE etc so I really need some advise on this one.
In addition to the above mentioned, I also created a Java Swing app, no problem at all to connect to the .net web service. Does AVD have any restrictions regarding access to certain libraries? Do I need to add any other permissions?
Btw 1. I have tested other Android apps, connecting to Internet, streaming picture resources in a ListView and it worked just fine.
Btw 2. I am using Windows 7.
All my best!