OData/WCF Data Services client on Windows Mobile?

Apr 27, 2011 at 10:29 PM

Can the .NET 3.5 version of this client be used to consume an OData service on a Windows Mobile 6.5 device? Can it all build and work with the limited WCF subset that comes in .NET Compact Framework 3.5?

I don't see any documentation on how to use this particular client library, so it is not clear to me how I would generate the appropriate proxy class for the Compact Framework, and then use that in my mobile app?

Or is OData simply not a supported option for Windows Mobile development?

Apr 28, 2011 at 7:16 PM

Hi kendallb, unfortunately we don't have a client for WM 6.5. For this reason, the you'd need to hand parse the atom/json returned by the OData service using the XML support in WM 6.5.

Turker

Apr 28, 2011 at 8:07 PM

Ok thanks. I see there is a .NET 3.5 version of this library, so I was considering looking at the code and perhaps porting it to CF 3.5 to help me build my own OData client library. But I cannot find any documentation on this client library and how to use it, or any sample code showing how to use the library?

If I can see some sample code on how the library is used in regular .NET apps, I can take a look at what it would take to get this working in .NET CF 3.5.

Editor
Apr 29, 2011 at 8:21 AM

Here are some examples of using the WCF Data Services client library; however, as Turker mentioned, we don't support this library on Windows Mobile 6.5:

On any client platform that supports HTTP and XML, you will have to compose your query URIs and send them to the data service by using something like HttpWebRequest, and parse the returned XML to read the returned entity data. The OData.org website discusses both how to build URIs (http://www.odata.org/developers/protocols/uri-conventions) and it also has some good examples of what the HTTP for CRUD requests to and responses from an OData service would look like (http://www.odata.org/developers/protocols/operations).

Glenn.

 

 

 

 

 

Apr 29, 2011 at 6:46 PM

Ok thanks. So the core issue, apart from porting the code to CF 3.5, is simply that there is no DataSvcUtil.exe that will produce something CF 3.5 friendly, and the source for that code generator is not available? If the source for that is somewhere, then I could look into it. But otherwise I think I will just stick to regular WCF services and stick to what CF 3.5 can support.

Editor
Apr 29, 2011 at 6:56 PM

The issue is that I don't belive that System.Data.Services.Client.dll can be deployed on WM 6.5 (I've never tried it).

Good of luck on your application.

Glenn.