on 09-15-2007 2:59 PM
Hi,
I am developing a Smart Sync application and I am trying to read the ErrorConflict inbox. There is a special class for it called surprisingly ErrorConflictInbox. I have at the backend a call transaction logic, and I am simulating an error in this giving bad datum data to the call transaction. I am exporting a RETURN structure and after the call transaction I set the fields of it. In merep_mon transaction I can see that the return type of my BAPI is 'E' (error) though no error text can be seen in the transaction. What is worse, on the client side I can see no message regarding this error. In merep_mon I can see a line telling: Inbox data deleted (mobile ID = 0000000167, sequence number = 26). Could it be the cause that no error message appear on the client side? Or my approach is totally wrong?
I am using the following code:
try {
SyncBoDescriptor sbd = dbAccess.getSyncBoDescriptor(SYNCBO_NAME_CREA );
ErrorConflictInbox errorConflictInbox = SmartSyncRuntime.getInstance().getInboxNotifier().getErrorConflictInbox();
MeIterator it = errorConflictInbox.getSyncBoResponses(sbd);
while( it.hasNext() ) {
SyncBoResponse sbr = (SyncBoResponse) it.next();
String text = sbr.getText();
aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = {0}", text );
}
} catch( Exception e ) {
aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = {0}", "Error reading SyncBo responses" );
aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = ", e.getMessage() );
}
So does anybody know how to handle errors and conflicts and how to show it to the user when I restart the application after synchronization?
Any help is highly appreciated.
Regards,
Pal
Hi Pal,
was the error triggered by a client sync? ie. some data was sent to the middleware
and an error occurred?
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jo,
yes, I have an upload SyncBO, and I sent some data to the backend which applies a call transaction logic for the incoming data. I sent purposely wrong datum data to have an error at the backend which I wanted to show to the client. At the backend I filled up the return structure with the error message of the call transaction, and at the client side I set up a MessageReplyObserver and a SyncReplyObserver object to catch this error message. The MessageReplyObserver didn't react at all for the error, and the SyncReplyObserver got an error message but it was a Middleware generated error message (Message class MEREP_01, message number 185) not the message with which I filled up the return structure. My question is how can I see the message from the backend at the client side.
Thanks for your reply,
Regards,
Pal
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.