G
Guest
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 ----------------------------------------------------
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 ----------------------------------------------------