I had the same problem in one of my projects and I had solved it with
Microsoft Offline Application Block. Since at that time there was no
CF.NET version of Offline Block I had to port some parts of it by myself.
At this moment OpenNETCF has the Microsoft Application Block for CF.NET
which is available for download here:
http://www.opennetcf.org/PermaLink.a...9-f1b35813db79
To read more about Offline block see this link:
http://msdn.microsoft.com/library/de...fline-ap01.asp
--
Sergey Bogdanov
http://www.sergeybogdanov.com
Pancho wrote:
> Hello,
>
> First time poster here. We are developing an application running on the
> Pocket PC O/s that connects to a Java application server. We have real
> time services working. We are now developing code for a disconnected
> state.
>
> On the pocket PC we catch a SoapException, letting us know the system is
> unavailable. At this point, I would like to start caching pertinent web
> service
> calls. My first question is how should these web service calls be stored. As
> raw XML? How to save these message so I may call the web service again
> asynchronously? During the asynch call, I still need to make sure it
> completed.
>
> I am thinking I would start a thread that would wake up and attempt to
> reprocess
> the first of these cached messages. If unsuccessful, it would go back to
> sleep. If successful, it would run thru any saved messages and set back to a
> connected or real time mode.
>
> Here is a sample service ....
> // DimFreight Service ----------------------------------------------------
> public void DimFreight(string mode, string freightlKey, string length,
> string width, string height, out string exceptionCode)
> {
> string nowDate = DateTime.Now.ToString("yyyymmdd");
> string nowTime = DateTime.Now.ToString("HHMMss");
> exceptionCode = "";
> Global global = Global.GetGlobals();
>
> // Call Service
> freightService.FreightService service = new freightService.FreightService();
> service.Url = FREIGHT_INTERFACE_URL;
> try
> {
> service.DimFreight(mode, global.GetDevice().DeviceID,
> global.getEmployee().ID, freightKey, length, width, height, nowDate, nowTime);
> }
> catch(SoapException soapEx)
> {
> exceptionCode = soapEx.GetBaseException().Message;
> }
> catch(Exception ex)
> {
> exceptionCode = ex.Message;
> }
> } //End - DimFreight ----------------------------------------------------