Understand how the EIS fetches pending operations from SAP Mobile Server using SAP Mobile Server HTTP services.
http://domain:port/end2end.rdb:1.0/PendingOperations?username=test& remoteId=cc134c3a-1e7b-41cf-821c-900ec61eef91&$skip=0&$top=10All parameters are optional. If username and remoteId are not provided, SAP Mobile Server returns all pending operations for the package. Successful invocation generates get response 200 OK with the entity set in JSON format in the response body:
[ {"data":"{\"id\":1,\"lname\":\"lname2\",\"fname\":\"fname1\",\"id1\":3520011}", "entityName":"topicCustomer","operation":"ChangeNameNeedManager","requestId":3520012, "remoteId":"582b509f-677e-4879-b1fb-d2e0f11d9deb","username":"test"}, {"data":"{\"id\":2,\"lname\":\"lname4\",\"fname\":\"fname3\",\"id1\":3520013}", "entityName":"topicCustomer","operation":"ChangeNameNeedManager","requestId":3520014, "remoteId":"582b509f-677e-4879-b1fb-d2e0f11d9deb","username":"test"} ]
http://domain:port/end2end.rdb:1.0/UpdatePendingOperationswith this put string:
{"data":[ { "remoteId":"13ac059a-ad00-47e2-b85e-f659c6865651", "results":[ {"lid":900,"hid":909,"success":false,"errorMessage":"They must all fail!","eisCode":"14"}, {"lid":910,"hid":1000,"success":true}, {"lid":1001,"success":false,"errorMessage":"It must fail!","eisCode":"1234"}, {"lid":1002,"hid":1010,"success":false,"errorMessage":"They must all fail too!","eisCode":"5678"} ] }, { "remoteId":"25ac059a-bc00-4ag2-bc5e-f659c6234887", "results":[ {"lid":2000,"success":true}, {"lid":2001,"success":false,"errorMessage":"It must fail!","eisCode":"1234"}, {"lid":2002,"hid":2100,"success":true}, {"lid":2101,"success":false,"errorMessage":"It must fail!","eisCode":"1234"} ] } ]}The above example request contains two sub-requests. Each sub-request is required to specify a “remoteId” attribute. This remoteId is the same remoteId SAP Mobile Server uses to notify the EIS of the operation uploads. It identifies the device that submitted all the operations listed in the “results” attribute. Upon completion of operation updates, SAP Mobile Server sends a notification to the device identified by the “remoteId”. The “results” attribute can contain a list of single operation, or range of operations. If “lid” and “hid” are both specified (hid >= lid), all operations with requestId value between “lid” and “hid” (inclusive) are updated. If only “lid” is specified, only one operation is updated. The values of “lid” and “hid” should be the values of the “requestId” in the PendingOperations query results. The range of values between “lid” and “hid” might not be continuous within the scope of one remoteId.
{"data":[ {"success":false,"requestId":13930007,"errorMessage":"It must fail!","eisCode":"1234"}, {"success":false,"requestId":13930009,"errorMessage":"It must fail!","eisCode":"1234"}, {"success":true,"requestId":13930008}]}