Web Services with Android - why no support for WSDL? - android

I'm creating a Client/Server application with Android (Client) and WCF (Web Service).
From reading quite alot of discussions, I'm under the impression that there is no tool available to create the web service client in android automatically from a WSDL file.
If this is the situation, what is the easiest approach for creating a communication infrastructure between the client and server, that can be updated easily in the future (plain GET, REST, use SOAP and manually parse responses)
Initially, I wanted to build the web service and have the client created automatically with the provided WSDL file.
Thanks

AFAIK, there is no tool for automatic client generation based on a WSDL.
Android doesn't come with any soap related library.
BTW you can look for ksoap2-Android libraries and see if it's suitable for you.
More infos about using ksoap with Android should be found here

Related

Implement Jersey (JAX-RS) client library for php REST webservices on server

I have php webservices available on web server, I am trying to develop an Android project which will consume responses of those.
Jersey (JAX-RS) provides a client library to communicate with RESTful webservices, which can be used in my android app (client).
So I have some questions:
Does Jersey (JAX-RS) works with php webservices on server, or it needs Jersey web-services on server
If yes, Is it good idea to do it with Jersey
What are the other options which I have, to consume my php web services in android app
Yes you can consume your PHP web services in Android.
I advise to use Volley Framework (Google);Volley Framework
And here you can check many example:
Example Volley Frameworks
I have made some understanding about the topic since I asked about it, and here are some info If someone comes searching for the same thing later.
No need to learn a new thing: Jersey JAX-RS to consume the web services into an android app. (If you are not already into it.)
So to consume the web services into an android app, we have following options:
HttpURLConnection or Apache HTTP Client: Google has deprecated Apache HTTP client usage since Gingerbread. So you may use HttpURLConnection to request response to your web services.
Android Asynchronous Http Client: This is also a good library to consume REST responses into android app.
Volley: Google has created a library claiming it very faster.
library that makes networking for Android apps easier and most
importantly, faster.
And it follows RPC-style networking operations, also have interface so you can spend more time implementing your logic.
PS: Thanks Antonio for your suggestion.

which type of web services can a Android App talk to?

I was reading that SOAP is really not for Android. Rather Android prefers REST web services. So my question is, are there any other kinds of restrictions ? For example, some web services are built with JAXB. Is that ok for Android apps ?
I other words, does it matter how the REST web service is built ?
What if the web service returns data in XML format, is that ok with Android ?
It does not matter what kind of Webservice you are communicating with.
You communicate using HTTP protocol. If you use SOAP then you can parse your xml at client side.
Also there are many SOAP clients already available so you dont have to do much work.
Check this - http://code.google.com/p/ksoap2-android/
There is no restriction with REST web services on Android. Yes android can handle xml. You can get detail knowledge and help by going through GAE (Google app Engine). Find the link below:
https://developers.google.com/appengine/docs/
Android does not provide a built in SOAP client, there are many third party libraries that can be used to call a SOAP web service with native android APIs.
Where as REST is so simple & can be used directly without any third party libraries.

Best way of calling web service from an Android App

What is the best way to access a soap web service from an android device right now.
I see a lot of different approaches but I am not sure which way is the best.
Currently I need to create a small project where authentication is required to a SOAP base web service endpoint.
Any hints?
Use the KSOAP 2 library to communicate with your web-service.
You can find numerous tutorials for ksoap and this is good place to start.
EDIT:
If you require authentication to connect to the web-service, you would need to build the header of the soap request.
The following Stack Overflow questions should definitely guide you how to do the authentication.
how to set soap Header using ksoap2 - android
SOAP web service on android
Basic HTTP authentication using KSOAP for android
Blackberry kSoap2 & Soap Header
This post also talks about KSOAP and Authenticated web-services.
Hi see this example for KSOAP.
If you are using WSHTTPBINDING watch this.
Hope this will give you some information.

Create webservice in drupal

Can we create webservices in Drupal? Our web development team is creating a website in Drupal and they want to build an android application for the same and for that I need to use webservices to access the database.
Have a look at the services module
A standardized solution of integrating external applications with
Drupal. Service callbacks may be used with multiple interfaces like
REST, XMLRPC, JSON, JSON-RPC, SOAP, AMF, etc. This allows a Drupal
site to provide web services via multiple interfaces while using the
same callback code.
It's build for this reason. Drupalize.me android app is built on the services module, so too for many android applications.
Hope this helps... Muhammad.
Can we create webservices in Drupal?
Yes, You can Do it.
I had done it via JSON webservices.

how can i build proxy classes from wsdl( wcf services) in android?

I need to build proxy from a "WSDL" to call "WCF" services.
please provide me info. about tolls required and steps to do.
i have wsdl document.
and want to create a android client to consume the services.
i have spend a lot time on tht.
Android doesn't have built in SOAP API. You must use some additional library like kSoap2 but those libraries doesn't provide automatic client generation - you must code it. There are products which are able to generate clients but I expect them to be commercial like WSClient++.

Categories

Resources