You can configure OData service so it itself limits (hard limit) to number of items it will ever return – DataServiceConfiguration.MaxResultsPerCollection. This limit is not the same as one that gives you URI with token added where you can ask for more. This is hard limit, which, if you go over it, produces error. Sadly the error in
<m:error> is inside invalid XML. The XML is missing closing tag.
And that’s expected. :\ That means if you’re parsing the XML manually using some parser that parses the whole XML completely in one batch, you’re out of luck. You’ll not be even able to read what happened. Solution is, of course, to read the using some “just forward reader” that parses one item at time, ignoring what’s next until you ask for it.
The reason I was given when asked was that they don’t want you to accidentally succeed. Good way of enforcing that, not! I can think of different way of doing that while not breaking the validity of the XML.
Anyway, if you’re parsing the result on your own, be prepared to handle also invalid XML.
I was recently doing my course on Entity Framework (drop me a line, if you’re interested) and the last day we were diving into WCF Data Services aka OData.
There’s a MimeType attribute that allows you, simply speaking, set the MIME type for the output of some operation. That’s great, because you can immediately provide i.e.
text/html output where the HTML is saved in come column in database. But it’s a fair need to want to specify the MIME type for operations you have. Sadly the MimeType attribute has to be on class and has
AllowMultiple = false. Bummer.
After some poking around, research etc. I found that there’s indeed a limitation that you currently cannot specify the MIME type for more than one operation. But good news is, that in future release(s) this limitation should be lifted.
Wondering how’s possible I never thought about this myself before???
I have to be honest with you. I’m ill, desperately ill developer. First day I was just playing with PlayBook and exploring as much details as I was able to. First half of day two I was doing the same, but slowly. The other half was “lost” – I started to think about developing something.
Right now you can choose between Adobe Air and BlackBerry WebWorks. I jumped into WebWorks. I’ll not describe the details, because I know, I gained close-to-zero knowledge so far. But even this small was enough to create simple application. It’s even using OData.
Following screens will walk you through the application – it’s a simple eBay search application. You put some search keywords and it will show you matching listings with price and small image. That’s all. Nothing more. No fancy UI (actually no UI at all), no icon, no settings, no error handling, no …
Home screen – before starting the application
Application is starting
Ready to do the search
Search in progress (take notice of super cool throbber 8))
Application while switching to another application
Cannot say I like the development process, but who knows where it ends (I end).
I almost forgot to announce the topics touching ADO.NET provider for Firebird. This year I have three sessions. You can find more info, and register, of course, at firebird-conference.com. Here’s the list.
- New features in .NET provider for Firebird
- Connecting to Firebird using .NET provider from various devices – iPad, iPhone, Android, Windows Phone,…
- Creating services for rich internet applications using Firebird and the OData protocol
So if you’re interested in any of these topic, come, ask, participate. Especially hearing scenarios in what you’re using the .NET provider is very valuable for me. I also like talking between sessions, I always learn something new and I’m eager to to my best to answer all questions people are asking.
Pokud jste nestihli první pražskou nebo brněnskou přednášku, máte v Praze další šanci. 3.11.2009 (úterý) od 17:20 v rámci programátorských večerů na MFF UK.
Více info zde nebo zde, registrace na http://akce.altairis.cz.
Prezentace ke stažení.