|
Calling WebService from Android Source Code
|
|
12-22-2011, 11:35 PM
(This post was last modified: 12-23-2011 03:17 AM by Rupam.)
Post: #1
|
||||
|
||||
|
Calling WebService from Android Source Code
This Simple Application in Android Shows How you can call .Net WebService or Asmx web methods from android apps. Though there are several tutorials already on this, you will find the approach simpler and easier in comparison to many other techniques. download code: CALLING-WebService-From-Android-CODE.zip (Size: 203.62 KB / Downloads: 2448)
PS: Complete Explanation is Posted in http://www.codeproject.com/KB/applicatio...-asmx.aspx for better visibility of the article and a wider audience in mind. By that time you can check the word document for explanation. Why pay internet charges for every device? Try out WiFiGrassy for a day and share Internet Connection Effectively |
||||
The following 5 users say Thank You to Rupam for this post:emangaber (17-04-2013), ltl9999 (05-02-2012), mgunawan (22-12-2012), Sjubussen (13-07-2012), Sjubussen (13-07-2012) |
||||
The following 5 users say Thank You to Rupam for this post:emangaber (17-04-2013), ltl9999 (05-02-2012), mgunawan (22-12-2012), Sjubussen (13-07-2012), Sjubussen (13-07-2012) |
||||
|
02-07-2012, 01:28 AM
Post: #2
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
Thank you very much!
|
||||
|
02-07-2012, 11:05 PM
Post: #3
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
hello, i want to use wsHttpbinding in my config and it didn't get the expected result. I don't know how to solve this. can you give me an advice
|
||||
|
02-08-2012, 04:52 AM
Post: #4
|
||||
|
||||
RE: Calling WebService from Android Source Code
(02-07-2012 11:05 PM)ltl9999 Wrote: hello, i want to use wsHttpbinding in my config and it didn't get the expected result. I don't know how to solve this. can you give me an adviceI have never used a config binding, but sure can look into it if you can put a snippet of the service and the config itself. Probably you misplaced the tags? Why pay internet charges for every device? Try out WiFiGrassy for a day and share Internet Connection Effectively |
||||
|
09-12-2012, 08:17 PM
Post: #5
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
Hi, I was trying your sample code.....after including ksoap2 jar file....while running the app on emulator.....it shows ws has stopped working after click on the result button........also i am unable to debug in the callsoap class even after attaching the source of ksaop. please help
|
||||
|
09-12-2012, 10:53 PM
(This post was last modified: 09-12-2012 10:53 PM by Rupam.)
Post: #6
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
1. Is your Internet connection fine?
A quick solution : Rename "ksoap2-android-assembly-2.6.5-jar-with-dependencies.zip" to "ksoap2.jar" 2. In Eclipse, on the Project Explorer right click the root of the project (Where the name of the project is), selected "New", "Folder" and created a new folder called libs 3. Went back to my file explorer. Right click "ksoap2.jar", "copy" 4. In Eclipse, right click the newly created "libs" folder and select "paste" Important Create a folder named 'libs' at the root directory of the project. Then copy the Jar file in 'libs' and referenced the jar in the project from this 'libs' folder. If it still does not work , just leave us with a screen shot. Ok dont forget to comment every try and catch block in calling class. Why pay internet charges for every device? Try out WiFiGrassy for a day and share Internet Connection Effectively |
||||
|
09-25-2012, 07:20 AM
Post: #7
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
Hello,
Thanks for creating this article, it has been very helpful. I'm having one issue that maybe you can help resolve. My web service doesnt seem to be accepting the variable format of th input. It works, cause if i hard code a return value it displays correctly in the Android app. When i have the web service save the values into the database the results for both variables are null. I believe the issue is that the soap call is passing name value pairs (i.e. the request variable containes "Add{a=5; b=5; }" in debug mode) and the web service is just expecting 5, 5. Not having worked with Andriod apps, soap or web service before im not sure. Web service as follows. Thanks, Gary [WebMethod] publicint Add(int a, int b) { return 24; //return a + b; } |
||||
|
09-25-2012, 03:21 PM
(This post was last modified: 09-25-2012 03:22 PM by moumita.)
Post: #8
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
I think it should be:
|
||||
|
11-25-2012, 10:11 PM
Post: #9
|
||||
|
||||
|
RE: Calling WebService from Android Source Code
i have just the above exception java.net.socketException: socket Failed:EACCES(permission denied) plz tell me how to get over from it!!!alredy made netwrok permission in manifest file but still error
|
||||
|
11-26-2012, 07:29 PM
Post: #10
|
||||
|
||||
RE: Calling WebService from Android Source Code
(11-25-2012 10:11 PM)zain khan Wrote: i have just the above exception java.net.socketException: socket Failed:EACCES(permission denied) plz tell me how to get over from it!!!alredy made netwrok permission in manifest file but still errorCrete a directory name libs in your project directory. Copy the jar file in that directory. Reference the jar file from that directory and you should be done. Why pay internet charges for every device? Try out WiFiGrassy for a day and share Internet Connection Effectively |
||||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)








![[-]](m-zero_red/collapse.gif)