Jim,
The altered sample does indeed demonstrate the issue you describe. I
have checked my working code and have a workaround for this - specify
the type of the batch operation in the batch data. This ensures that
the correct number of entries are returned.
In the sample, after the line (118):
entry.BatchData.Id = batchId;
add the line:
entry.BatchData.Type = GDataBatchOperationType.insert;
The correct results are then returned. I would imagine that this is
the same reason my 503 batches are reporting the correct number of
failures.
Andy
2008/12/7 Jim <[EMAIL PROTECTED]>:
>
> Andy,
>
> The sample code presented below reproduces the "400" problem every
> time. Load the the C# sample app in Sources\Samples\appsforyourdomain
> \migration. Edit the file migrationsample.cs.
>
> On line 115 replace this line:
> entry.Rfc822Msg = new Rfc822MsgElement(GenerateRandomRfcText());
>
> with these lines:
> string s = GenerateRandomRfcText();
> if (batchId == "0")
> {
> s = s.Replace("Date: Mon, 16 Jul 2007 10:12:26 -0700",
> @"Date: Wed May 30 15:37:01 EDT 2001"
> );
> }
> entry.Rfc822Msg = new Rfc822MsgElement(s);
>
> After this line:
> MailItemFeed batchResult = mailItemService.Batch(domain,
> destinationUser, entries);
>
> Add these two lines:
> Console.WriteLine("Batch feed size is {0}, inserted feed size is {1}",
> entries.Length, batchResult.Entries.Count);
>
> Finally, replace this line:
> MailItemFeed batchResults = BatchInsertMailItems(10);
> With these two lines:
> MailItemFeed batchResults = BatchInsertMailItems(1);
> batchResults = BatchInsertMailItems(2);
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Apps APIs" 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-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---