Should i use wsdl or json for my ios app? - ios

I am writing an iOS app which will have to fetch some data from a server. Is it better to use WSDL and SOAP to get these data from a web service, or should i use JSON?

JSON is good if you don't have any security stakes. Otherwise, you should use a secured data exchange protocol like SOAP or maybe OAuth.

Honestly where I've worked with JSON alot i would personally recommend it because it's a really easy way to send data and to parse data. If your going to be fetching from a server using mysql or something along those lines I would recommend you go with JSON.

Related

what type of webservice should be created in .NET to work NSJSONSerialization

I'm currently working on SOAP Webservice.
I've a requirement in such a way Webservice should support NSJSONSerialization method in iOS but I'm not sure how to achieve this.
Could somebody explain how a JSON Webservice can be created please?
This does not depend on NSJSONSerialization. Simply format the webservice's answer as required by the JSON standard in RFC 7159.
You have to create REST API in .NET so that it will be easily integrate with iPhone app.
Here is the link for the same: http://www.asp.net/web-api/overview/older-versions/build-restful-apis-with-aspnet-web-api

Wsdl Parsing in ios

Can any one help me how to consume WCF services in an iPhone application?
I am searching it desperately. I have also installed the wsdl2objc from http://code.google.com/p/wsdl2objc/. but still I am not getting any clue that How can I use it to worth get the correct responce.
Please get me out of this trouble...I need the right solution!!
Thanks.
If you are about to use the SOAP services than my advice is don't.....because for SOAP services you may able to construct the base classes using http://code.google.com/p/wsdl2objc/ but the response you will get from the service will give the references and the whole data structures along with response and you can't parse the response.
You can use this wonderful framework called CSOAP

REST Web Service for ResKit

I am quite confused on what REST API to follow that will sync with RestKit.
I have a problem in making a put/post/delete request.
One of the REST API I follow is from NetTuts which I found very hard to sync with RestKit.
Any suggestions? Thank you so much!
RestKit is a generalized framework for consuming JSON/XML over HTTP. It will interoperate with any backend, providing the payload can be expressed as key-value coding key paths.

Using a web service in an iOS app

How might I go about using a web service in an iPhone app? For example, if I wanted to use a web service that you can use to convert a value into a different unit, how would I go about doing that? For example: http://www.webqc.org/balance.php
It depends what sort of 'web service' it is. If it is a stateless REST style API, passing data in the URL and/or data encoded Json or XML it couldn't be easier, just use NSURLConnection.
Using examples I found on the web I made an application (server and iOS client) - using the NSURLConnection & NSMutableURLRequest, and encoded/decoded data using YAJL. This was pretty easy to get going.
If you don't want to do this using the core libraries directly- there are some frameworks you can use, e.g. RestKit. I've not used it, but it looks good and comes recommended.
If it is a SOAP style web service, this is a lot more complicated as SOAP services often expose a stateful API.
I should say that the example that you show here is not a web-service, whilst it does come with a way of calling it just using a URL - it returns an html page which makes it hard for you to use the results. I presume that you are more interested in a service that returns results encoded as XML or Json or the like.

Best practice of parsing RESTful WebService response with Rails

I'm developing a JAX-RS application and it's working fine. Now, I want to develop a web service client application using Rails. And my question is which is the best way to parse a RESTful webservice's response in Rails?
It depends on what the service is returning. I'd say that you could use a variety of gems to do it. Lately I've been using HTTParty to get and parse automatically the response of a call to a RESTful API.
Once I get all the data I then map it to a model so that's it's easier to manipulate later on. The way you'll do this mapping will really depend on the type on response you'll get.

Resources