I'm not sure I understand. It appears as if you are suggesting that I
populate the drop down lists with the results of a webservice if online, but
with the stored xml resource if not. What I need to do is actually replace
the stored xml resource with results from the webservice query so that a user
might be online in the morning, receive the latest resources, and then be
offline for the rest of the day. Basically I want to synchronize the offline
data source with the server when conencted online.
Thanks,
Alfred
Alfred,
Thanks for the clarification; I was misreading your question.
You can't save data for later use in the secondary data source because
it is not persisted. You will need to write some custom code with the
following logic:
if (web service is available) {
run query from the web service
persist XML from the web service to user's disk
} else {
Load values from the saved file on disk into the
secondary data source using MSXML object model
}
You will need to make your solution full-trust in order to make this
work (use regform or digitally sign the form).
Good luck,
Alex @ Microsoft
-----Original Message-----
From: Alfred Goldberg [mailto:Alfred Goldberg@discussions.microsoft.com]
Posted At: Friday, May 06, 2005 10:34 AM
Posted To: microsoft.public.infopath
Conversation: Updating External Secondary Data Source
Subject: Re: Updating External Secondary Data Source
I'm not sure I understand. It appears as if you are suggesting that I
populate the drop down lists with the results of a webservice if online,
but
with the stored xml resource if not. What I need to do is actually
replace
the stored xml resource with results from the webservice query so that a
user
might be online in the morning, receive the latest resources, and then
be
offline for the rest of the day. Basically I want to synchronize the
offline
data source with the server when conencted online.
Thanks,
Alfred
"Alex [MSFT]" wrote:
> Alfred,
>
[quoted text clipped - 30 lines]
>
> Alfred Goldberg
Alfred Goldberg - 09 May 2005 14:44 GMT
Thank you Alex.
I have a question about
> if (web service is available) {
> run query from the web service
> persist XML from the web service to user's disk
> } else {
I am having trouble loading the webservice. Here is my code
if (0==Application.MachineOnlineState){
XDocument.UI.Alert("Your computer is offline.");
}
else{
var httpGetURL = "http://myserver/mywebservice.asmx/myfunction"
var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.4.0");
xmlDoc.Load(httpGetURL)
}
I am getting an error on xmlDoc.Load(httpGetURL). If this is the wrong way
to do this can you point me to a MSDN or KB article that can help.
Best regards,
Alfred
> Alfred,
>
[quoted text clipped - 82 lines]
> >
> > Alfred Goldberg