on 04-01-2016 2:50 PM
Hi Experts,
Have anyone tried batch request with Offline Store in iOS?
I followed http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/202ed7ed-6b58-3210-bbbb-cde7ba5ed... H2G and created a batch request with a single read request.
Code :
self.batchRequestParam = [[SODataRequestParamBatchDefault alloc] init];
SODataRequestParamSingleDefault *requestParamSalesOrders = [[SODataRequestParamSingleDefault alloc] initWithMode:SODataRequestModeRead resourcePath:[NSString stringWithFormat:@"%@/SalesOrders", [MyLogonHandler shared].data.applicationEndpointURL]];
SODataRequestParamSingleDefault *requestParamSalesOrderItems = [[SODataRequestParamSingleDefault alloc] initWithMode:SODataRequestModeRead resourcePath:[NSString stringWithFormat:@"%@/SalesOrderItemDetails", [MyLogonHandler shared].data.applicationEndpointURL]];
[self.batchRequestParam.batchItems addObject:requestParamSalesOrders];
[self.batchRequestParam.batchItems addObject:requestParamSalesOrderItems];
[self.offlineStore scheduleRequest:self.batchRequestParam delegate:self];
Now when I check for isRequestQueueEmpty, it is returning true value.
And when I try flush, the request is not reaching the gateway also.
Can anyone tell me where in my code I am doing wrong.
SDK used is SP11.
Regards,
Dhani
Hi Dhani,
The offline store will locally execute read requests within a batch; read requests, including those in batches, do not get added to the request queue. Only modification requests get added to the request queue (including change sets within batches).
In offline OData, only a refresh will cause a read request to be executed against the backend OData server; the refresh will send the defining requests or their associated delta links to the OData server.
Hope this helps,
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>And when I try flush, the request is not reaching the gateway also.
Do you see the behavior with online store too? Or just happening with offline store?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.