I looked at the code again (logrequest.cs) and checked where it saves the file.

public override void Execute()
{
if (this.RequestCopy != null)
{
this.RequestCopy.Seek(0, SeekOrigin.Begin); 
SaveStream(this.RequestCopy, this.strInput); 
this.RequestCopy.Seek(0, SeekOrigin.Begin); 
}
try
{
base.Execute(); 
} catch (GDataRequestException re)
{
Tracing.TraceMsg("Got into exception handling for base.execute"); 
HttpWebResponse response = re.Response as HttpWebResponse;
if (response != null)
{
Stream req = response.GetResponseStream(); 
SaveStream(req, this.strOutput); 
}
throw re; 
}
}

It seems that the RequestCopy is always null and is read only and is set when 
GetRequestStream() method is called and which is called only when 
base.Execute() is called.

Frank, Can you help ?

Thanks
Kulvinder Singh

----- Original Message ----
From: Kulvinder Singh <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, September 21, 2007 5:01:38 PM
Subject: Re: How to log Response and Request for Google Calendar API ?


Hi Frank,
 
Thanks for your kind reply. I tried out the changes in CalenderService.cs in 
the following manner :
 
/// <summary>
/// default constructor
/// </summary>
/// <param name="applicationName">the applicationname</param>
public CalendarService(string applicationName) : base(GCalendarService, 
applicationName, GCalendarAgent)
{
this.NewFeed += new ServiceEventHandler(this.OnNewFeed);
 
// You can set factory.methodOverride = true if you are behind a 
// proxy that filters out HTTP methods such as PUT and DELETE.
GDataLoggingRequestFactory factory = new 
GDataLoggingRequestFactory(GCalendarService, applicationName);
factory.MethodOverride = true;
 
// No of Retries is 0 by default. So, set it to 3 so that it will try it again 
for the Response
factory.NumberOfRetries = 3;
this.RequestFactory = factory;
}
 
the code runs fine but still i dont see the files i require which contains all 
the information regarding what was actually sent and what was received. These 
files are supposed to be 
 
this.strInput = "GDatarequest.xml";
this.strOutput = "GDataresponse.xml"; 
this.strCombined = "GDatatraffic.log"; 
 
but there is no files as such.
 
 
Can you help again ?
 
Thanks
Kulvinder Singh



----- Original Message ----
From: Frank Mantek <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, September 21, 2007 4:06:31 PM
Subject: Re: How to log Response and Request for Google Calendar API ?

Yes. Go to the client/cs/src/unittests and check out unittests.cs 


If you just set the factory used to be of kind GDataLoggingRequestFactory, all 
data will automatically be logged in the current directory as xml and log files 
(see the implementation of GDataLoggingRequest.cs for details).


Let me know if you need any more help.


Frank Mantek
Google

On Sep 21, 2007, at 11:57 AM, Kulvinder Singh wrote:


Hi,
To debug the problem which a user faces on his machine, i want to know whether 
there is a way by which i can figure out what data was sent to the Google 
server and what was actually recieved ?
I see that there is a GDataLoggingRequest.cs class as well but i dont know how 
do i enable the tracing in my application so that all the data being sent and 
being recieved can be sent by a user and i can debug the issue.
Any ideas ?
Thanks
Kulvinder Singh



Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.












Pinpoint customers who are looking for what you sell. 


       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to