cancel
Showing results for 
Search instead for 
Did you mean: 

Get error-messages for download-data on client

norbertk
Participant
0 Kudos

hello,

is it possible to receive error-messages for downloaded data (i.e. the return-table or -structure of getlist) on the client? i can see them in merep_mon, but would also want to display them in the client-application, but it seems SyncBOReplyObserver does not receive them.

thanks in advance!

regards,

norbert

Accepted Solutions (1)

Accepted Solutions (1)

norbertk
Participant
0 Kudos

hello,

thank you for your repsonses!

we tried both SyncReplyObserver and the deprecated SyncBoInDeltaObserver. we get messages if e.g. an upload-syncbo could not be created, this works. but we would also like to get a message if download-syncbo's could not be downloaded (getlist returns an error), the same message we can see in merep_mon. the ErrorConflictInbox doesn't contain this message either.

regards,

norbert

Former Member
0 Kudos

Hi Norbert,

does the merep_mon contain an outbound worklist in which an error is passed on to the client? If that is the case the ErrorConflictInbox would contain the error

Best Regards,

Karthik

norbertk
Participant
0 Kudos

hi karthik,

merep_mon contains an inbound (not an outbound) worklist with the error...

regards,

norbert

Former Member
0 Kudos

Hi Norbert,

Problems like 'getlist returns an error' would come to the client as a MessageReply, would you have to implement a MessageReplyObserver to capture this error.

Best Regards,

Karthik

norbertk
Participant
0 Kudos

thanks karthik, it works!

Answers (2)

Answers (2)

kishorg
Advisor
Advisor
0 Kudos

Hi Nobert,

You can make use of the SyncBoResponse and ErrorConflictInbox interfaces.

SyncBoRepsonse represents the error/conflict response information, which corresponds to a specific quarantined SyncBo. This has the following information:

1. SyncBoResponse type i.e. Error or Conflict.

2. SyncKey.

3. Current and history log.

4. SyncBoDescriptor instance

5. SyncBoResolver used to resolve the quarantined state by either reverting to server state or keeping the client state.

The SyncBoResponses can be retrieved from the ErrorConflictInbox.

<<code tempalte>>

<b>ErrorConflictInbox errorConflictInbox= SmartSyncRuntime.getInstance().getInboxNotifier().getErrorConflictInbox();

MeIterator iter;

SyncBoResponse resp;

try {

iter= errorConflictInbox.getAllSyncBoResponses();

while(iter.hasNext()){

resp= (SyncBoResponse)iter.next();

resp.getSyncBoDescriptor().getSyncBoName();//SyncBo Name

resp.getSyncBoResponseState().toString();

resp.getResponseType().toString();//Get the SyncBo response type (conflict or ERROR)

resp.getText();// This will return the exact message from the server

}

boolean syncStatusComplete= SmartSyncRuntime.getInstance().getInboxNotifier().isSyncStatusComplete();

}catch (Exception e) {

e.printStackTrace();

}</b>

and refer this link

http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/javadoc/com/sap/ip/me/api/sma...

Regards

Kishor Gopinathan

Former Member
0 Kudos

hello norbert,

do you mean SyncReplyObserver for SyncBOReplyObserver?

you can implement and register your SyncBOReplyObserver

<b>before on every synchronization</b> to get the SyncReply

notification. this however is NOT recommended becoz of

performance reasons. you can also use MessageReply if you

just want to get notified for MessageReply to check for

MessageReplyType. Take note that SyncReply and MessageReply

interfaces are used in different context. (pls refer to the

Javadoc for details)...

you have to make your observer implement the Serializable

interface and get rid of unserializable references on

your code...

regards

jo

Former Member
0 Kudos

Hi Norbert,

Have you already implemented a SyncReplyObserver or are you using the MAM Observer?

If that is the case, Observers get registered only if you click on the Application link once before you do a sync. If you login and press on sync immediately the observers would not be registered.

Best Regards,

Karthik

Former Member
0 Kudos

Hi Karthik,

How to handle situations like:

"If you login and press on sync immediately the observers would not be registered".

Let's suppose the RFC dest is broken between MW and Backend.

How can I get the errors (like RFC communication errors between MW and Backend) if I don't click on the application link?

Regards

Ramdane

Former Member
0 Kudos

Hi Ramdane,

Yes you are right, when you do not click the application after logon the observers are not registered.

There is only one alternative that I can suggest.

From 04 SP20 onwards there is a parameter

MobileEngine.JSP.StartApplicationDirectlyForUser=<user name>:<application name>

If this parameter is added to the MobileEngine.config file then when the user logs on he directly goes to the application instead of the MI Homepage.

This is not the ideal solution to your problem but a good workaround.

Hope this works for you.

Best Regards,

Karthik