views:

19

answers:

1

Hello

I have a Win Mobile 6.0 .NET CF application that uses a reference to a WebService in order to call web methods on it. In normal situations where the device is in WLAN coverage, the web methods can be executed synchronously by the device. The issue is when the device goes off-line (no WIFI or GPRS coverage). I want that the application can still operate but need to "buffer" web method calls so that all operations are stored locally and if the device goes online again, all pending web requests are executed on WebService. Is there any generic solutions for that in .NET CF? Or do I have to implement it manually? The only think I can think of now is to extract the interface of WebService manually and implement custom implementation of it which checks whether WebService is available and in that case refer all web method call to the WebService proxy. If WebService is not available (no Internet connection etc), then my custom implementation is called which stores are WebMethod calls locally (ie in a local file). Does .NET CF support some sort of transaction mechanism from WCF?

Thanks Dominik

+1  A: 

link textThere definitely isn't anything available out of the box to do this. The behavior you're describing isn't a transaction behavior, but more of a guaranteed delivery behavior. Microsoft has the Disconnected Service Agent Application Block as part of the desktop SCSF that addresses this type of scenario.

The Patterns and Practices team did do a scaled-down version of it in the Mobile Client Software Factory as the Offline Application Block (sample here), though be aware that a lot of the other stuff in the MCSF was ported from the desktop SCSF without any real thought about performance or memory on an embedded device and it therefore is really unusable on a real device (that's my nice way of saying it completely sucks). The OAB, though, appears to be a reasonable implementation and will probably do what you want.

ctacke