Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android WebService
Hi all,
 
i created a simple helloworld webservice in .net. now i want to call webservice in my android application created in android studio. please help me.
Posted 4-Jun-13 0:50am
josh-jw10.8K
Comments
Prasad Khandekar at 4-Jun-13 6:10am
   
Android Studio is a new Android development environment based on IntelliJ IDEA. So process or code for calling a web service remains unaffected.
 
For soad based web service you can try generating stub using wsdl2java and use it to call the soap web service. Alternatively you can even use DefaultHttpClient to manually constuct the XML payload and call the SOAP web service.
 
For JSON based simple again you can use DefaultHttpClient.
 
Please go through following article on CP
 
http://www.codeproject.com/Articles/112381/Step-by-Step-Method-to-Access-Webservice-from-Andr.
 
Regards,
josh-jw at 4-Jun-13 6:11am
   
ur link is not working. plz give any useful links.
Prasad Khandekar at 4-Jun-13 6:15am
   
Try looking at following
 
1. http://www.codeproject.com/Articles/304302/Calling-Asp-Net-Webservice-ASMX-From-an-Android-Ap
 
2. http://matthias.jimdo.com/2011/07/04/consuming-restful-web-services-on-android-using-spring-android/
3. http://www.ibm.com/developerworks/webservices/library/ws-android/
josh-jw at 4-Jun-13 6:25am
   
thnx. i will go through it.
josh-jw at 4-Jun-13 6:41am
   
in android studio , hoe we can add ksoap library? there is no option like properties of project for add jar file
Prasad Khandekar at 4-Jun-13 7:51am
   
You can use File -> Project Structure (ctrl + shift + alt + s ) -> Module -> Dependencies -> add... -> Project Library -> Attach Jar
 
Regards,
josh-jw at 4-Jun-13 23:32pm
   
thanks.
josh-jw at 5-Jun-13 2:07am
   
i am getting thsi message
 
We will provide a UI to configure project settings later. Until then, please manually edit your build.gradle file to configure source folders, libraries and dependencies.
 
NOTE THAT EDITS MADE IN THE FOLLOWING DIALOG DO NOT AFFECT THE GRADLE BUILD.
The dialog can be used for temporary adjustments to SDKs etc
Prasad Khandekar at 5-Jun-13 3:55am
   
Open Project Structure dialog (File -> Project structure (Ctrl+Alt+Shift+S)). Click on entry named Modules in the left side ListBox. Click on tab named Dependencies. Now Click on + Sign and select 1st option named Jars or directories... Selected the desired jar.
josh-jw at 5-Jun-13 4:22am
   
after that what to do in build.gradle file

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 319
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 230
3 CPallini 205
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 13 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100