Reputation: 123
I have to write some web services to support some mobile apps (Android and iOS) that our company will be producing. Because we use Windows/IIS servers the services will be based on WCF/.NET 4. I'm wondering what format will be the easiest to use on the mobile end. I know there's JSON, SOAP, and others, I just don't know which has the best support within a mobile environment. Suggestions?
I intend to have a single set of WCF services which are consumed by both mobile platforms.
Upvotes: 2
Views: 525
Reputation: 31641
Since you're using the .NET-platform on the server, WCF supports sending/receiving XML or JSON messages pretty easily using WebHttpBindings
and WebServiceHostFactory to build RESTful services.
For the client platforms - you just need an HTTP Client capable of sending JSON or XML formatted messages to a URL and retrieving a response. There are many libraries that will make this easier to manage, but it depends on the complexities involved in your service.
I would avoid SOAP, but you can easily support it using WCF by adding BasicHttpBinding and a ServiceHostFactory.
Upvotes: 5
Reputation: 2185
I use apache Camel CXF (web service) & to parse the data I use JAXB. note: about cxf http://camel.apache.org/cxf.html
Upvotes: -1
Reputation: 646
I used the Slim framework (PHP) to serve JSON via RESTish URLs, and the GSON library to convert the data, it was pretty straight forward in my case.
Upvotes: 0
Reputation: 1883
For my experience, working with JSON is the best way for iOS and Android.
The server... I would use Java (struts or similar).
Hope this helps
Upvotes: 1