|
| D2007 web service proxy not 'honoring' CacheDuration setting on web service |
 |
Wed, 20 Feb 2008 12:02:34 -060 |
I have a web service (written in VS2005/C#) that the Delphi created proxy
class is not working correctly with the CacheDuration setting.
Example:
[WebMethod(Description = "Number of times this service has been
accessed",
CacheDuration = 60, MessageName = "ServiceUsage")]
public int ServiceUsage()
{
// If the XML Web service has not been accessed, initialize it to 1.
if (Application["MyServiceUsage"] == null)
{
Application["MyServiceUsage"] = 1;
}
else
{
// Increment the usage count.
Application["MyServiceUsage"] =
((int)Application["MyServiceUsage"]) + 1;
}
// Return the usage count.
return Application["MyServiceUsage"];
}
The Delphi created client (D6 and D2007) always returns the incrementing
number where IE and VS2005 return the cached value.
Is this a bug? Is there a workaround?
Thanks for any info,
krf
|
| Post Reply
|
| Re: D2007 web service proxy not 'honoring' CacheDuration setting on web service |
 |
Tue, 26 Feb 2008 10:24:38 -080 |
Hello Kevin,
Do you have a way to peek at the HTTP request/response going back and forth
between client and server/service? The issue is to find out how
'CacheDuration' is implemented. There's nothing at the SOAP packet level
that I know of that handles caching... so my guess is that this is being
handled (maybe?) via an HTTP header. The 'Cache-Control' header would be the
perfect fit.
If the above assumption is correct the Delphi SOAP runtime (see
SOAPHTTPTrans.pas) sets the INTERNET_FLAG_NO_CACHE_WRITE flag. You probably
would not want that as it requests that the response to be added to the
cache.
If you have a log of the HTTP transaction, specially between a client where
it works and one between the Delphi client and the service (where it does
not work), that would be very helpful!
Cheers,
Bruneau.
|
| Post Reply
|
| Re: D2007 web service proxy not 'honoring' CacheDuration setting on web service |
 |
Tue, 26 Feb 2008 13:32:21 -060 |
Thanks for the reply.
Do you have a suggestion on a http monitoring utility?
krf
"Jean-Marie Babet" <bbabet@borland.com> wrote in message
news:47c458bf$2@newsgroups.borland.com...
> Hello Kevin,
>
> Do you have a way to peek at the HTTP request/response going back and
> forth
> between client and server/service? The issue is to find out how
> 'CacheDuration' is implemented. There's nothing at the SOAP packet level
> that I know of that handles caching... so my guess is that this is being
> handled (maybe?) via an HTTP header. The 'Cache-Control' header would be
> the
> perfect fit.
>
> If the above assumption is correct the Delphi SOAP runtime (see
> SOAPHTTPTrans.pas) sets the INTERNET_FLAG_NO_CACHE_WRITE flag. You
> probably
> would not want that as it requests that the response to be added to the
> cache.
>
> If you have a log of the HTTP transaction, specially between a client
> where
> it works and one between the Delphi client and the service (where it does
> not work), that would be very helpful!
>
> Cheers,
>
> Bruneau.
>
>
|
| Post Reply
|
| Re: D2007 web service proxy not 'honoring' CacheDuration setting on web service |
 |
Tue, 18 Mar 2008 13:18:31 -080 |
Hello,
I've used ProxyTrace for this kind of monitoring before:
http://www.pocketsoap.com/tcptrace/pt.aspx
Cheers,
Bruneau.
|
| Post Reply
|
| Re: D2007 web service proxy not 'honoring' CacheDuration setting on web service |
 |
Tue, 25 Mar 2008 08:01:32 -050 |
"Jean-Marie Babet" <bbabet@borland.com> wrote in message
news:47e030b5$1@newsgroups.borland.com...
> Hello,
>
> I've used ProxyTrace for this kind of monitoring before:
>
> http://www.pocketsoap.com/tcptrace/pt.aspx
Thanks, but it doesn't do anything. Starts up fine, status bar states
'Proxy started....', then that's pretty much it.
How did you use it before?
krf
|
| Post Reply
|
|
|
|
|
|
|
|
|
|