Skip to Content
0
Former Member
Apr 01, 2016 at 01:50 PM

Batch Request with Offline Store iOS

31 Views

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-cde7ba5ed654?QuickLink=index&… 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.

@Kenichi Unnai expecting your help.

Regards,

Dhani