PDA

View Full Version : wait for answer of a Webservice



nfariss
10-Feb-2005, 09:44 AM
Hello,
I heard, it gives a possibility that a client program doesn't have to wait
for the answer of a Webservice, Before it further run the remained
Instruction.
Is it possible and when yes how?

thanks
Naima

Curtis Krauskopf
10-Feb-2005, 01:25 PM
Naima,

Most browsers will render (display) the page as soon as data is received
from the web server. There are some exceptions to this; the most common
being when the client receives a table tag. Most browsers will not render
the contents of a table until the end table tag (/table) is received.

The other part of this is the web server. Some web servers can be
configured to buffer (cache) the data being sent to the client. I'm told
that this improves the overall web server throughput but your clients might
not see any data about the page until the entire page has been internally
processed by the web server.

One way around this is to tell the web server to flush its cache and send
what it has to the client immediately. An IIS web servers will obey a flush
command but its still up to the client's browser to decide whether or not to
display any information.

For the most common situation in which you have IE6 and are using an IIS web
server, an IE6 browser will display the page unless a table has not been
completely defined. The (admittedly conservative) rule I use is to only
expect the browser to render part of the page when there aren't any
unterminated HTML tags and buffering is either turned off or I've told the
web server to flush in a buffered situation.

Look for 'buffer' and 'flush' in your favorite ASP programming book for
examples.

Hope this helps.

Curtis



"nfariss" <nafariss@gmx.de> wrote in message
news:eiPF393DFHA.1248@dacmail.dataaccess.com...
> Hello,
> I heard, it gives a possibility that a client program doesn't have to
wait
> for the answer of a Webservice, Before it further run the remained
> Instruction.
> Is it possible and when yes how?
>
> thanks
> Naima
>
>

Knut Sparhell
11-Feb-2005, 02:58 AM
nfariss wrote:

> I heard, it gives a possibility that a client program doesn't have to wait
> for the answer of a Webservice, Before it further run the remained
> Instruction.
> Is it possible and when yes how?

I don't know how with VDF, but I have used the Microsoft XMLDOM a lot,
and it has a property Async. This lets you loop while checking the
readystate, until the final state, and in the meantime you can do
anything. This could work easily in a business process in VDF, and by
combinig this with a timer you could even let the user interact with
your program while data is downloaded.

In VDF cHttpTransfer there is an event OnDataReceived, but I am not sure
how to use this, and not how to make the transfer asynchronous.

I will be much interested in the answer to this.

--
Knut Sparhell, Norway

Knut Sparhell
11-Feb-2005, 03:10 AM
Curtis Krauskopf wrote:

> Most browsers will ...
.......
> Look for 'buffer' and 'flush' in your favorite ASP programming book for
> examples.

You normally don't use a web browser as a web service client, and no ASP
code to make the web service. So I don't think this is relevant.

web page <> web service

What would be nice is for a VDF web service client not to wait for the
result from a web service as long as the request is sendt. How the web
service is made, buffering or not, doesn't necessarily have any effect
on this. There may be a delay to even get _any_ response, like the time
the request "travels" to the server, and the server response time, and
the response travel time. This delay may, in som type of
implementations, be used to do something else than keeping the user
waiting and hoping.

--
Knut Sparhell, Norway

Curtis Krauskopf
11-Feb-2005, 11:21 AM
Knut,

You are right. I misread his message as web server.

Curtis

"Knut Sparhell" <knut@sparhell.no> wrote in message
news:CN2jyEBEFHA.1248@dacmail.dataaccess.com...
>
> You normally don't use a web browser as a web service client, and no ASP
> code to make the web service. So I don't think this is relevant.
>
> web page <> web service
>

nfariss
18-Feb-2005, 05:15 AM
I tried to use OnDataReceived, but it's work like "While", that mean, i cant
use it to run Instruction, while the webservice run, but it is ein idea for
monitoring webservices.
that would be good, when it can be possible, not to wait for the answer for
websevices in VDF.

Naima

"Knut Sparhell" <knut@sparhell.no> schrieb im Newsbeitrag
news:B9iWr9AEFHA.1248@dacmail.dataaccess.com...
> nfariss wrote:
>
> > I heard, it gives a possibility that a client program doesn't have to
wait
> > for the answer of a Webservice, Before it further run the remained
> > Instruction.
> > Is it possible and when yes how?
>
> I don't know how with VDF, but I have used the Microsoft XMLDOM a lot,
> and it has a property Async. This lets you loop while checking the
> readystate, until the final state, and in the meantime you can do
> anything. This could work easily in a business process in VDF, and by
> combinig this with a timer you could even let the user interact with
> your program while data is downloaded.
>
> In VDF cHttpTransfer there is an event OnDataReceived, but I am not sure
> how to use this, and not how to make the transfer asynchronous.
>
> I will be much interested in the answer to this.
>
> --
> Knut Sparhell, Norway