Well, I can now report that, in this case, eConnect 10 is not producing random errors and is not returning invalid document info in its error messages. The problem I experienced was caused by a poor application design by the original developer, and that design was unable to properly handle certain simple errors and program failures, resulting in the appearance of bizarre and misleading errors coming from eConnect. So eConnect 10 appears to be working fine, but this is a lesson on how NOT to code an eConnect integration.
For those who like The Daily WTF (http://thedailywtf.com), here are the fun details:
The application had one "main" routine that imported RM invoices. That routine starts by retrieving a list of the document numbers from the source system that are available for import. Only the document numbers are retrieved--the full invoice info is not retrieved (that would be too efficient).
In the second step of bad design, the main routine then loops though every document number, and for each document number, calls a sub-routine that initiates a connection back to the source system, retrieves just 1 record with the invoice data, serializes the data, and then saves the data as an XML file to the hard drive. The main routine then calls another sub-routine, which reads the XML file, passes it to eConnect, and handles error messages. If you aren't dizzy already, read on.
So, with this design, what happens when the first sub-routine attempts to retrieve the 1 record with the invoice data, but for some reason the SQL statement fails or experiences an error? Well, the developer simply writes a catch statement that does nothing, including not overwriting or deleting the last XML file that is sitting on the hard drive, and the app returns back to the calling procedure. The calling procedure dutifully calls the next sub-procedure, which plods along and reads whatever XML file is on the hard drive.
Of course the XML file sitting on the hard drive was from a prior invoice that did import properly, and of course, eConnect errors and says that the document number already exists. But the great part is that the integration application is logging a completely different document number--one that was never even written out as an XML file, and one that was never actually passed to eConnect. So the log file info and the eConnect error cite completely different invoices, and the great part is that both are correct.
The code is like a .NET Rube Goldberg device.