Quantcast
Channel: SCN : Discussion List - SAP for Mobile
Viewing all articles
Browse latest Browse all 5806

ODataOfflineException Android SMP 3.0

$
0
0

Hi!

 

I´m trying to open an OfflineStore (using Android, SMP 3.0 SP04 and SDK 3.0 SP05) but I´m getting this error  com.sap.smp.client.odata.offline.ODataOfflineException: [-10060] An error occurred while performing a synchronization.  Reason: -1305 (MOBILINK_COMMUNICATIONS_ERROR) %1:24 %2: %3:336134278.

 

In this link I´ve found what it could be a solution http://scn.sap.com/thread/3470776 but it´s oriented to SUP and I´ve couldn´t find how to create the connection profile, neither the synchronization profile in SMP 3.0. My code looks like this:

 

try {

  ODataOfflineStore.globalInit();

 

  LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();

 

  lgCtx.setAppEndPointUrl("https://xxx.xxx.local:xxxx/gateway/odata/XXXXX/XXXXXXX/");

  lgCtx.setHost("https://xxx.xxx.local");

  lgCtx.setPort(xxxx);

  lgCtx.setHttps(true);

  lgCtx.setConnId(Globales.getappCID());

 

  String endPointURL = lgCtx.getAppEndPointUrl();

  URL url = new URL(endPointURL);

 

  ODataOfflineStoreOptions options = new ODataOfflineStoreOptions();

 

  options.host = url.getHost();

  options.port = String.valueOf(url.getPort());

  options.enableHTTPS = lgCtx.isHttps();

  options.serviceRoot= endPointURL;

 

  options.extraStreamParms = "custom_header=Authorization:Basic " + ";custom_header=X-SMP-APPCID:" +  Globales.getappCID() + ";";

 

 

  String appConnID = lgCtx.getConnId();

  options.customHeaders.put("X-SMP-APPCID", appConnID);

  options.enableRepeatableRequests = false;

  options.storeName="SMP3";

 

  options.definingRequests.put("reg1","test");

 

  offlineStore = new ODataOfflineStore(context);

 

  offlineStore.openStoreSync(options);------> Exception here

  TraceLog.d("openOfflineStore: library version "+ ODataOfflineStore.libraryVersion());

 

} catch (ODataException e) {

  e.printStackTrace();

}

 

Thank you in advance.


Viewing all articles
Browse latest Browse all 5806

Trending Articles