Uploading and downloading files using wcf data services? - rest

I have been trying to find information regarding if it is possible to upload and download files using WCF Data Services (formerly ADO.NET Data Services), but haven't been able to make any leads due to perhaps less help content available on wcf data services on the web as of now.
Is it possible for us to write a wcf data service so that client can post to the following URI to upload a file - http://some-restfulwebservice/Files/upload
and this url to download the fie - http://some-restfulwebservice/File('XYZ.txt')/download
Any good examples/sample code? Any help or direction would be appreciated?

Astoria supports something very much like this through something called Media Link Entries.
I am working on samples to help here at the moment, but it will take me a few more weeks probably
Check out IDataServiceStreamProvider in the meantime.
And check back on my Custom Data Service Providers series in a week or two.
Hope this helps
Cheers
Alex
Data Services Team - Microsoft.

Related

Auto sync images and videos into webservice

How to auto sync the images and video from the app into the Api Web services.
Do we have any tutorials or source codes on this.
Thanks in advance!!!
There can be multiple approaches depending upon what you are trying to achieve and what backend you are using.
If you are using simple API web services, you need to write your own mechanism both on server as well as client side, which will identify records to be synced based on TimeStamp and few other columns in your DB
If you are open to use other Platforms like Parse.com, they provide in built APIs and libraries to take care of syncing logic
As you are trying to sync file(Images and Videos), you can also try DropBox, iCloud, or Google Drive. Here is a link to an article which i found in a quick search which uses CoreData and Dropbox
Let me know if this helps.

What are the ways available to connect iOS app to fetch data from or via microsoft dynamics crm 2011? [duplicate]

I'm looking to interact with my Microsoft Dynamics CRM system from my iPhone, performing tasks such as pulling down, updating, creating and deleting records.
Is this possible? If so, can anyone link me to any good resources on the matter or provide me with any information you feel would be relevant?
Many thanks,
Jack
Yes this will be possible and there are at least some relevant pointers in the CRM SDK (Development from Non-.NET Clients in Microsoft Dynamics CRM) however general support and anecdotal information is sparse (in fact the referenced topic and it's links are all that exist in an official sense).
You will be accessing via the SOAP endpoint and the link to the WSDL for that is exposed via the CRM UI (Settings > Customizations > Developer Resources).
I'd start with downloading the CRM SDK and reading the topics I linked to.
Caveat - I know nothing of Objective-C or IOS
I don't know anything about this, but maybe that'll help: http://www.cwrmobility.com/
If your looking to develop something yourlself, this might help: http://www.microsoft.com/en-us/download/details.aspx?id=13621
It is possible, you'll need to use the web services API.
MSDN web services API docs
It uses JScript, so on the iPhone, you should use NSURLRequest and NSURLConnection to retrieve the data coming back.
Here is another link for using JSON, as iOS has a JSON parser built in now
MS CRM using JSON

iOS webservice xml help

i am trying to create an app that connects to a mysql database, downloads the records in the table for the user then displays them in a UITableview which can be drilled down with the data that as downloaded from the mysql database. I would also like the data to be stored locally in something like sqlite. The data would then be modified then uploaded back to the mysql database.
My questions is where do i start? I have read alot of posts on google and they say that its best to connect to a xml which acts as a middle man between the database and the app. How can i create this xml file? is it something that is generated every time the app is launched or something done daily on the server?
If anyone can help me out. i know its a very broad question so if someone can point me in the right direction im not asking someone to right this app just a hand as im lost.
Thanks,
Aaron
I know others have mentioned links to libraries that let you connect to MySQL from iOS. I've not tried them myself but don't rule that out.
To answer your quest, you do not "create" the XML files. Web services are developed in a language, and written as applications. You would in essence need to write another application that runs on a server. That application would connect to your MySQL database. That application would also publish methods for getting at, and updating, data. By virtue of making your server a SOAP web service (in whatever platform), the data will be sent over the wire as XML.
If I have understood you want a kind of ORM?
If so you can check for Restkit and more specifically on the side of the object mapping system. It allows us to synchronize remote object/data locally with the coredata.
I have never used it, but I have seen a great tuto which talking about that here: Advanced RestKit Development (However I think it works only with json messages).
I hope it'll help you in your reflection.
I would recommend looking at XML Parser, Webservice, and Core Data tutorials.
SOAP and XML Response Parsing Samples for iPhone/iPad?
http://www.techotopia.com/index.php/An_iOS_4_iPhone_Core_Data_Tutorial_%28Xcode_4%29
That would be a good start, and I could give you some more material if you would like. As far as setting up your actual web service, I've never done that so I couldn't help you there.

Getting data from remote sql table on iphone

I am a beginner at both iPhone programming and SQL, yet I have basic knowledge of them.
I am planning to do an application that would plot a graph from data taken from a database of the server of my company. I know how to plot, I know how to extract data from an sql table, but what I don't know is how to access the server.
So do I have to go through some kind of oracle-like application ?
This may seem like a very stupid question because it might not even be possible but any answer will be appreciated.
Thanks !
Go through a web service for example a PHP page that returns JSON (or XML, but JSON is easier to parse).
I can highly recommend this tutorial
Once you have your web service, you can use NSURLRequest/NSURLConnection to download the data and use a JSON framework to parse it. Or, if you're using XML you can use NSXMLParser.
See this apple code for more info on downloading using NSURLConnection.
The best way for this will be, using APIs at server end that handle the client request and perform database interaction, so transfer of data among device and server, take place through XMLs that will be secure as well as fast.
It is definitely possible to contact a server (I can't imagine what would happen without that!). What you are looking for is NSURLConnection. Have a look at the example provided by Apple.

Posting Data from iPhone to a server exposing OData

I have a server which is exposing OData services.
I can actually make use of OData client for Objective C to get the data and show on the iPhone.
I am wondering what is the process of posting some data into the server from the iPhone.
Assume I have to just send a simple name to the server how would I do that
Any pointers to clogs/sites which provides examples of iPhone apps consuming OData services.
Regards
Hitesh V
To everyone getting to this question to find more info about OData, here's a pointer to some resources and a quick to-do list:
The official Odata Library for iPhone has moved to Github: https://github.com/OData/OData4ObjC/ (although the link posted by Dan remains valid).
Once you clone the repository, you can run the ./odatagen tool (located in the Frameworks/bin folder) to create a pair of .h/.m files to include in your iOS application.
Once you do so, have a look at the included samples (like the Netflix or ODataSampleApp) to have an idea about how it works.
Hope this helps
I've never heard of OData before, but a little googling finds me an Objective-C OData client for the iphone, here: http://odataobjc.codeplex.com/