not able to call web service with disconencted agent

Topics: Mobile Client Software Factory
Jan 29, 2007 at 6:26 AM
Hi,
I am using the disconnected web service agent block of the mobile client software factory to make disconected web service calls.I am using an emulator for the testing the code. The issue is that the Connection state never changes to 'Connected' because of which my web services never get called. I have ensured that the emulator has been cradled.Eventually my web service calls get moved to the dead letter queue. Is there something I am missing here ? Is this supported on emulator at all ?

The code is as follows

String filename = Path.Combine(DirectoryUtils.BaseDirectory,"MyQueueDatastore.sdf");
String connectString = String.Format("Data Source=\"{0}\"", filename);
SqlDatabase queueDB = new SqlDatabase(connectString);
DatabaseRequestQueue reqQueue = new DatabaseRequestQueue(queueDB,"Pending");

IConnectionMonitor connAdapter = new ConnectionMonitorAdapter(ConnMonitor);
// WebServiceRequestDispatcher = new WebServiceRequestDispatcher(EndPoints);
RequestManager.Instance.Initialize(EndPoints, connAdapter, queueDB);
Request req = new Request();
req.MethodName = "HelloWorld";
req.Endpoint = "HelloWorlEndPoint";
req.Behavior.Tag = "MyTag";
req.Behavior.MaxRetries = 3;
req.Behavior.Stamps = 5;
req.OnlineProxyType = typeof(PleaseWorkPro.localhost.Service);
req.Behavior.ReturnCallback
= new CommandCallback(typeof(MyDisconnectedServiceClass),
"MyReturnCallbackMethod");
req.Behavior.ExceptionCallback
= new CommandCallback(typeof(MyDisconnectedServiceClass),
"MyExceptionCallbackMethod");
RequestManager.Instance.RequestQueue.Enqueue(req);
RequestManager.Instance.
StartAutomaticDispatch();


Please do let me know how to solve this issue..I am really stuck here..

Thanks,
Deepthi