I am trying to access sharepoint default web services from my iPhone app. Can some one help me with how to construct the request and get the proper response.
Thanks,
Naresh
Your question can really only be answered in two parts. Part one is how to construct a request to any web service...which is what the answer at Consume WCF Web Service using Objective-C on iPhone will show you.
The second part is SharePoint related - their web services requires you to construct chunks of XML that are passed as parameters, and the XML you pass in is in a format that Microsoft specifies. For example, Lists.UpdateList method (at http://msdn.microsoft.com/en-us/library/lists.lists.updatelist ) requires 6 parameters, 4 of which are XML fragments -- which will need to be encoded and escaped. (SharePoint's web services are difficult to deal with on any platform and I would expect it to be doubly so from iPhone).
See here for answer..
Consume WCF Web Service using Objective-C on iPhone
Related
I am new to REST and watched few videos and read few blogs on REST webservice and I came to know that generally people are using REST for supporting multiple devices like mobile and computer etc.
Now consider I am developing order management system and I want to support both computer as well as tablets. If in m traditional web application, I am using Spring MVC at front end, how REST will fit here so that it will support both the kind of devices.
One more doubt is, whatever examples I have browsed, it return html or json data. I want to develop the application the way spring MVC or struts works like returning name of jsp and jsp will be rendered with dynamic data (instead of returning string represented html).
I hope my question is clear. Please bear me as my questions are vague but I am looking from implementation and design point of view.
Just to start REST isn't anything to do with supporting mobile browsers. It is the architecture pattern HTTP follows. The Web had been REST since the early days.
I'm guessing what you mean is a server that returns light weight JSON that the client renders into HTML rather than the server returning HTML directly to browser. To do that you can use a java script framework that expects JSON data and that has a template engine to generate HTML on the fly in the browser. I think Anglar and Ember work like this.
Though I would only do this if you need to, and you don't need to do this just to support mobile browsers, you can support mobile just by making sure your CSS is responsive.
I want to practice Web Service Calling (both SOAP and REST) for iPhone App Development. Problem is i don't have any Web Service implemented for practicing the same.
Any mock URLs (web service) for learning? At which I can have response of all types (like strings, PDFs, images, etc).
I have only basic idea of Web Service Calling from iPhone App. So, purpose is to get good understanding of WebService calling.
I have Mac and Internet, only. Nothing else.
I know this isn't the right place to ask but I could find any help by googling it.
You can get some free opensource web services on the web for your practice. Urls for free webservices are mentioned below.
Note: I am not sure if any of these will give you PDF / IMAGE as an output response of the service.
http://free-web-services.com/
http://www.webservicex.net/ws/wscatlist.aspx
It might be helpfull
Go through the step-by-step tutorial from the below link:
http://www.devx.com/wireless/Article/43209
Create an app which uses the web service at the following link: http://www.webservicex.net/WeatherForecast.asmx?WSDL, to give the weather of a US city name entered by the user. Use the method "GetWeatherByPlaceName"
I have a web app, that also has an iPhone and Android app using the same API. It hasn't yet been made publicly available, so I wanted to look to convert from SOAP to REST.
I was only able to find a few tutorials that go into thorough explanations of how to code a REST web service, and of those I only found the MSDN one useful. The problem is I got really confused when they started using URI data types inside the object.
My question is, if you are converting SOAP to REST, do you have to recreate all the objects to add the URI? Am I not able to just have a REST entry point, then call one of the classes that retrieve the data?
Once the REST service is made it will only be used by my mobile apps, but not the website (since that can directly access the classes), which makes me not want to change the objects to add a URI. Is that a correct assumption to make, or should the web services also be called by the website?
Sorry if these are newbie questions, but I am struggling to get my head around REST, and I haven't had much experience creating the architecture of potentially high user base apps.
If anyone is able to point me to an actual code set, that would be helpful.
Edit: I am using VS2010, coding in C# and .Net 4.
Thanks a lot,
Andy
Im doing a very similar thing right now :). Rest via wcf isnt too hard, you do have to sometimes add your endpoints in the web config and give it the [webget]/[webinvoce] attributes in the refrence.cs of the web refrence when consuming though c# which is annoying.
Here is a code set i used when getting started. There are a few more on code project too.
i want to read and write data to a website (server on web) and don't have any information about webservices and other things that related to it
Does anybody have any idea about how to start it (mean offer complete books,papers,tutorials,websites,… or what should i learn at first mean is it necessary to learn xml,soap,... and other things)
Thank you
I've used Google App Engine with great success. You would format your data to output as JSON and use an iPhone library to read it. I've used this one (though Touch JSON seems to be more popular).
Read about REST, ROA and AtomPub. Thats got me started. I'm about to implement some webservices in WCF (WCF now acts like a RESTFul webservice, but you can also use plain old SOAP). Before I got to WCF, I experimented with RoR. RoR uses REST "out-of-the-box".
I'm thinking about creating an application for the iPhone and Android that will need to access a common backend to retrieve account information. Can both access a web service over https? What other way would allow me to have one interface to the backend that is accessible by both?
They both work over http and https which is a common enough protocol. I would suggest you go with a RESTful web service so you expose your service via URI's like http://www.myservice.com/weather/zip/98007 which would return an XML blob that can be parsed by the client.
if you are starting from nothing, i'd definitely go with RESTful service that returns/accepts JSON... there are plenty of libraries for both platforms that will accept JSON and turn it into arrays and dictionaries.
I'd recommend using a RESTful web service backend, which is all standard HTTP and/or HTTPS. If you can use Ruby on Rails, its default scaffolding will get you about 99% of the way there and for the iPhone there is an open source project called ObjectiveResource that will automate your communication with this Rails backend. I haven't investigated yet what options are available on Android but since it is all simple HTTP it should be straightforward. I am not the maintainer of ObjectiveResource but I have contributed some code. You can check it out here:
http://iphoneonrails.com
One good approach I have seen used with other services is to write the backend in such a way that it can feed data back in different types - for Android an XML response is best, but for the iPhone sending back plist data is preferred (though it can also work with XML if required). In both cases it's easier to simply POST updates back to the server than to wrap an update in XML.
Both platforms should be able to use whatever form of authentication you wish to use, the iPhone I know supports all methods of HTTP authentication.