We tried the KSOAP2 library from the console application using the Eclipse IDE talking to the .NET web service located at http://www.w3schools.com/webservices/tempconvert.asmx . No problem, easy and straightforward. Embed the code in a simple method, test ().
The problem started when I wanted everything to work from an Android application.
Here is a brief summary of what I did (and the problem):
1. I created a new Android project in the Eclipse IDE using the Android 2.3.1 SDK, and I also created an Android Virtual Device based on the same SDK. No problem starting the virtual device. Worked great.
2. Then I added the use-permission tag with android: name = "android.permission.INTERNET" in the AndroidManifest.xml file.
3. After that I added the KSOAP2 library in the same way as when creating the console application.
4. Now I have added the test () method, previously tested and verified, including the correct import statements. Everything looked good. There are no warnings.
5. A compiled and running project, and in the first line of code I received a failure of the SoapObject class loader, that is, I could not find org.ksoap2.serialization.SoapObject. The line of code looked something like this: SoapObject objSoapTest = new SoapObject ("http://tempuri.org/", "FahrenheitToCelsius");
I was trying to figure out if he could detect any other class in one package, so I added this line of code before the code above: PropertyInfo objPropertyInfo = new PropertyInfo ();
You have the same problem ... "could not find" org.ksoap2.serialization.PropertyInfo.
What could be the problem? We tried to change the "Order and Export" in the Java Build Path, but with no result. Do I need to put this KSOAP2 library where I have Android SDK files? I am a hardcore C ++ programmer, so I don't have much experience with the Eclipse IDE etc., so I really need to advise a bit about this.
In addition to the above, I also created a Java Swing application, no problem connecting to the .net web service. Does AVD have any restrictions on access to certain libraries? Do I need to add any other permissions?
Btw 1. I tested other Android apps, connected to the Internet, streaming images in ListView and worked perfectly.
Btw 2. I am using Windows 7.
Hello!