How to write Android call WCF (It's a “.svc“ web) code?
I tried to read related articles.
Finally with the library (ksoap2), but still can not succeed.
If the WCF (.svc web) contains a function (Adder).
How do I call the function (Adder)?
The question is not so much how can Android call WCF? rather how can Android call a SOAP Service? Try googling that. By definition it should not matter how the SOAP service is implemented; .NET or not; Java or not.
Same applies if the WCF service is JSON instead of SOAP.
Related
I am new to android & web services.I I want to create an android app which consume a webservice using HttpClient.
Yet i am confused with, how to do this. I'll explain what i've needed to do.
Say,we have a webservice at http://www.w3schools.com/webservices/tempconvert.asmx
WSDL url=http://www.w3schools.com/webservices/tempconvert.asmx?WSDL
What I need is to call the method "FahrenheitToCelsius" & return values from it in an android app.Can't i do this using HttpClient? Since it seems to get only the HTTP methods like GET and POST.
When I search on this ,I found the below site as a more frequent suggestion. But it doesn't contain ,what I need to do.
http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/
(I could call "FahrenheitToCelsius" method & return values using ksoap library.But now i need to do it using HttpClient too)
To clarify- When you connect to a webservice via its WSDL file, you're consuming a very specific kind of webservice— specifically, a SOAP webservice.
The typically way to connect to a SOAP webservice is to either find a library in your language of choice, or find a utility that will use the WSDL to generate code for you that communicates with the webservice.
One popular utility for connecting to SOAP on Android is called ksoap-android.
I need a tutorial on how to do a basic web service call in android. I currently use ksoap but I and getting an error when I make the call and I need to know what the response from the server was. ksoap wont give me that information because it parses the response in the api where I am getting the error.
I am new to all this web service stuff so please help me out
Well it depends what you want to develop it using
A good tutorial using PHP, MySQL is here
I know you are using KSOAP at the moment but here is a nice tutorial that uses KSOAP and in explained in nice detail.
I've got a WCF RESTful service that when hit returns an obscene amount of data. This RESTful service is specifically designed to be hit by Android (and iOS eventually). Does anyone have any ideas of the best way to implement a WCF service that returns a stream and an Android client that downloads it in the background?
-edit
I should note that I am already using AsyncTask, but I want to know if there is anything additional I need to have it download a stream.
Rest is platform agnostic so it does not matter. You should look into WCF 4: Download Files using WCF REST EndPoints to deal with downloading the heavy stuff in the back.
We have an EPOD application running on the windows mobile platform. We are now trying to port the same application to the ANDROID platform. The application uses a web service written in .net to communicate with the server and perform various functions. The web service returns a dataset, which we are unable to parse directly in the ANDROID application and view the details. We are trying KSOAP and the JSON ways. If anyone out there has done this before, please help us out. We have be trying to find a solution for a week without any success. If required, we can even modify the web service so that it returns an XML or a JSON object which we can then parse in the ANDORID application.
Any help / sample code will be much appreciated.
Thanks and Regards
Rajendran Menon
.Net services used in interoperable environments (= non .Net clients) should not use datasets. You have already find why. The best you can do is modifying the service to expose simple soap or json = use custom data objets as return values from you service operations.
.net service returning a dataset will be received as an xml document at client end, so without thinking too much about the integration, just grab some code which can call xml webservice and get data from it.
Since there are many ways to solve this, here are additional links that can help:
How to call a .NET web service from android?
http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/
http://www.slideshare.net/sullis/connecting-to-web-services-on-android
Let me know if I can help you. I have prior experience with calling .net web services from java.
I'm new in Android and I have to do an application (in android) that consumes a NET WCF service with httpbasicbinding. I have heard about use of ksoap2-android, json and restfull but I don't know which is the best way for my app.
Anyone can suggest me anything?
Another problem is my WCF service return complex objects made by Linq To Sql and I don't know how can I use it in Android.
Thanks in advance!
If you use oData web services you can use the odata4j client library.
If you're using Service Stack to develop your web services you can use any REST client to easily consume them (in any format i.e. JSON, XML, JSV, SOAP, etc). The Hello World example shows a number of different ways you can consume a single web service.