on 12-29-2015 4:44 PM
Dear Experts,
We have developed "Native Android Online/Offline App", in SMP3.0 SP09 PL04 Server. The Online is working fine (CRUD), also in Offline "Read" is populating all the data sets correctly, as showing in Online, but for the "Create/Update" it (Offline) is failing. So this shows that "Offline Store" is creating, "Refresh" is also working correctly, but "Flush" is leading to exception. The debug output of "Offline Flush" is as follows:
AgencyOfflineErrorListener::offlineStoreRequestFailed()::offlineStoreRequestFailed()
offlineStoreRequestFailed------com.sap.smp.client.odata.exception.ODataNetworkException: Unknown network response error occured
I followed the template suggested by Claudia Pacheco's blog to develop this app:
After looking at various threads, it looks like that I need to pass few more parameters... i.e.
options.extraStreamParms = "custom_header=Authorization:Basic " + ";custom_header=X-SMP-APPCID:" + Globales.getappCID() + ";";
options.customHeaders.put("X-SMP-APPCID", appConnID);
However, I did the changes suggested above, but still getting the same error. Probably I am missing something. Could anyone of you guide to resolve the problem or suggest the correct ways to pass "extraStreaParms".
However the in SMP Cockpit details are as follows:
I really appreciate your help.
Thanks,
Warm Regards
Hemendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We replicated the same client environment in our local landscape. We are able to perform all CRUD operations successfully but still struggling in client environment. The only difference we see at the data level (Rest all the SMP settings are similar) i.e. in our local landscape, we hardly have 500 entries, but for client this is around 38000 entries (because this is duplicate of "Production").
So in the client environment the Online is correctly fetching (i.e. showing around 145 entries, because this is user based filtered data set), but for offline this is limiting to 6 entries only. After debugging, I found that even in Online, if I look at the count for "Executor Method for Reading an Entity Set" (store.executeReadEntitySet), shows the the 1000 entries for complete entity set (As I removed the filter for user based data, which is above fetching 145), while this should be 38000 (because this collection has 38000 entries). So it looks like that in Offline this always fetch the user specific entries from this 1000 data set instead of 38000 record set. Is there any setting in SMP which is restricting this collection entries? Which is restricting the "Request Payload", and allowing default holds 1000 records at a time.
However in Offline, I have also set the filter for user specific data in "addDefiningRequest", so it should have around 145 entries, but for this it is fetching 6 entries, because this is referring to 1000 in the entity set, instead of 38000.
As suggested, please also find log file details fetched from SMP Server for your considerations:
2016 01 05 12:11:26#+0530#ERROR#com.sap.odata.offline.util.NativeLogger###Thread-252####4599e27a-1cf4-46c1-a6ba-000000000000####<16> [-10279] Connection was dropped due to lack of network activity |
2016 01 05 12:15:24#+0530#WARN#com.sybase.security.integration.tomcat7.CSIRealm###http-bio-8080-exec-10####430da0f4-166e-4801-8ad7-7d9ce8d10fc8#RequestResponse###No configuration could be found that met the conditions specified by the supplied selectors. com.sybase.security.SecException: No configuration could be found that met the conditions specified by the supplied selectors.
Thanks,
Warm Regards
Hemendra
Thanks Marvin Hoffmann for your guidance.
It is restricting because default with Integration Gateway is picking 1000 records (for performance reasons). One has to do the custom code in JavaScript or Groovy to overwrite this behavior either by setting the header MAX_RECORDS when requesting the data or by using custom coding:
message.setHeader(ODataCamelExchangeHeaders.MAX_RECORDS.toString(), 2000);
Warm Regards
Hemendra
Hi Hemendra,
I am facing the same problem.
Can you please tell me where I need to change this setting?
Best Regards,
Saleem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemandra,
Could you please also tell the version of the SMP SDK?
Have you tried to use the latest one to have a test?
Best Regards,
Charlie
SAP Product Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.