Disconnected Agent

Topics: Mobile Client Software Factory
Jan 16, 2007 at 9:01 AM
I have an issue with the disconnected agent in that I cannot call a web service. I get the following error

Could not establish connection to network.
System.InvalidOperationException {System.Net.WebException}

If I call the web service directly.

I am using the emulator and I had the stamp setting to 1 have also tried 2. I used the guidance package to create the disconnected agent code and I am purely calling the guidance generated method.

Am I doing something strange it fails in the WebServiceRequestDispatcher class in the Dispatch method at the following call

object result = InvokeOnlineProxyMethod(onlineProxy, request);

Please Help
Jan 17, 2007 at 10:41 AM
Further Information

The following appears in the putput window when the call fails

The thread 0xb6d6a0aa has exited with code 0 (0x0).
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Web.Services.dll
A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll

Any Ideas. I think this is something obvious.

The ConnectionMonitor thinks it is connected, when debugging the settings are as follows

ConnectionPrice = 1
CurrentNetwork = Home
IsConnected = true

Jan 17, 2007 at 10:42 AM
have tried to make a call to the Order Test web service that came with the labs and I get the same issue. So I am assumming it is my application or settings. Here is how I call the web service

I create an instance of this class by adding it to the root work item, then handle the call back from a button click. Can someone have a look at it and see if they can spot an issue.

The ServiceDisconnectedAgent is created from the guidance package using the OrderTest web service with the settings

Endpoint MyHost
Stamps 5
Retries 0
Max Timeout 0:0:2:0
tag OrderTest

ServiceDisconnectedAgent serviceAgent = new ServiceDisconnectedAgent(ReqManager.RequestQueue);
Order order = new Order();
order.SalesOrderID = 0;
order.RevisionNumber = 0;
order.OrderDate = DateTime.Today;
order.DueDate = DateTime.Today + new TimeSpan(7, 0, 0, 0); //Today + 7 days
order.ShipDate = DateTime.Today + new TimeSpan(3, 0, 0, 0); //Today + 3 days;
order.Status = 1;
order.OnlineOrderFlag = false;
order.SalesOrderNumber = string.Empty;
order.PurchaseOrderNumber = 0;
order.AccountNumber = 0;
order.CustomerID = 0;
order.ContactID = 0;
order.SalesPersonID = 0;
order.TerritoryID = 0;
order.BillToAddress = new Address();
order.ShipToAddress = new Address();
order.ShipMethodID = ShipMethod.Ground;
order.CreditCardID = 0;
order.CreditCardApprovalCode = string.Empty;
order.CurrencyRateID = 0;
order.SubTotal = 0;
order.TaxAmt = 0;
order.Freight = 0;
order.TotalDue = 0;
order.Comment = string.Empty;