CharlesBrauer wrote:I have accessed my test Web Service with the Android 2.1 simulator. I am using the latest Eclipse and Java systems to build the Android application.
Here is what I did to make it work:
1. My Web Service that was built by Visual Studio 2008 and .Net 3.5.
The Web Service URL is:
http://www.cypresspoint.com/DroidServic ... rvice.asmx.
This address is live. Please try it in your browser.
2. To make my web site compatible with Android, I had to add:
To the Visual Studio 2008 WebConfig.xml file.
3. I have downloaded ksoap2-android from:
4. I installed the jar-file using the instructions at:
http://developer.android.com/guide/appe ... nallibrary.
My Android test code is:
Also, make sure that you add the line:
<uses-permission android:name="android.permission.INTERNET" />
to your AndroidManifest.xml file of your projest.
I first tested the code using the tempuri Web Service. It worked fine. I then commented out this code and inserted the code to access my test Web Server.
If you don’t enable HttpSoap in the in your Web Service (step 2) you will get a null pointer exception in the line:
SoapObject result = (SoapObject) envelope.getResponse();
Please excuse the formatting of this article... it is my first. I didn't know how to format the Java code.
I hope this will help fellow Droids.
You asked: "Can you please send the source code?". I'm confused. Your mail message shows ALL my source code. Please create a test project and cut and paste my code into you project. You should be able to access my test Web Service that is shown in my source code. Please give it a try. It should work for you.
Users browsing this forum: Exabot [Bot] and 3 guests