Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034277Retail ModulesStoreServerpublic2016-10-23 10:572016-12-23 15:17
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR17Q1RR17Q1 
marvintm
No
0034277: Support stateless web/mobile service requests which do not create a http session but still supports login
The standard webservice calls from retail to the server do login and create a http session.

We should support an approach in which a webservice does support login, but does not create/keep a session.

Note: that this approach only works for simple webservices which do not require data present in http session. But this is fine.
See retail webservices, more specific see MobileServerStatusInformation webservice as an example. It is called many times and each time causes a http session to be created.
No tags attached.
related to feature request 00344863.0PR17Q1 closed mtaal Openbravo ERP Support web/mobile service requests which do not create a http session but still supports login 
diff stateless-mobile-core.diff (10,645) 2016-11-04 16:38
https://issues.openbravo.com/file_download.php?file_id=10018&type=bug
Issue History
2016-10-23 10:57mtaalNew Issue
2016-10-23 10:57mtaalAssigned To => mtaal
2016-10-23 10:57mtaalTriggers an Emergency Pack => No
2016-10-23 13:39mtaalTypedesign defect => feature request
2016-10-23 13:39mtaalSummaryMake the MobileServerStatusInformation not keep the session => Implement basewebservice which does not create a session but still supports login
2016-10-23 13:39mtaalDescription Updatedbug_revision_view_page.php?rev_id=13455#r13455
2016-10-23 13:39mtaalSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13457#r13457
2016-10-23 13:39mtaalProposed Solution updated
2016-10-25 11:17Asantos9Issue Monitored: Asantos9
2016-11-04 16:38mtaalFile Added: stateless-mobile-core.diff
2016-11-04 16:38mtaalFile Added: stateless-erp.diff
2016-11-14 12:04mtaalSummaryImplement basewebservice which does not create a session but still supports login => Support web/mobile service requests which do not create a http session but still supports login
2016-11-14 12:05mtaalSummarySupport web/mobile service requests which do not create a http session but still supports login => Support stateless web/mobile service requests which do not create a http session but still supports login
2016-11-14 12:08mtaalRelationship addedrelated to 0034486
2016-11-14 12:24mtaalFile Deleted: stateless-erp.diff
2016-11-15 09:23hgbotCheckin
2016-11-15 09:23hgbotNote Added: 0091528
2016-11-15 09:23hgbotStatusnew => resolved
2016-11-15 09:23hgbotResolutionopen => fixed
2016-11-15 09:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0a4ebceba03923ba9f8fa851fea5cc9a6730ded0 [^]
2016-11-15 09:26hgbotCheckin
2016-11-15 09:26hgbotNote Added: 0091530
2016-11-15 11:09mtaalNote Added: 0091547
2016-11-16 21:02hgbotCheckin
2016-11-16 21:02hgbotNote Added: 0091613
2016-11-20 00:58hgbotCheckin
2016-11-20 00:58hgbotNote Added: 0091671
2016-11-20 22:48hgbotCheckin
2016-11-20 22:48hgbotNote Added: 0091679
2016-12-02 19:36hgbotCheckin
2016-12-02 19:36hgbotNote Added: 0092046
2016-12-02 19:55mtaalNote Deleted: 0091547
2016-12-02 19:56mtaalNote Added: 0092050
2016-12-02 20:13hgbotCheckin
2016-12-02 20:13hgbotNote Added: 0092051
2016-12-03 01:24mtaalReview Assigned To => migueldejuana
2016-12-23 15:17marvintmReview Assigned Tomigueldejuana => marvintm
2016-12-23 15:17marvintmStatusresolved => closed
2016-12-23 15:17marvintmFixed in Version => RR17Q1

Notes
(0091528)
hgbot   
2016-11-15 09:23   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0a4ebceba03923ba9f8fa851fea5cc9a6730ded0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Nov 15 09:22:39 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0a4ebceba03923ba9f8fa851fea5cc9a6730ded0 [^]

Fixes issue 34277: Support stateless web/mobile service requests which do not create a http session but still supports login

Summary of changes:
- MobileKeyAuthenticationManager: prevent creating http session, in case of stateless requests do a webservice login
- DataSynchronizationProcess: noticed during testing that if import entry id is not set then when an error occurred also a separate error was created because the import entry id was not set, change not directly related to the topic of the issue, but too small to warrant own issue
- JSONRowConverter: prevent creating http session when creating error message
- MobileService: determine if the service is a stateless service and if so set the correct attribute
- SecuredJSONProcess: prevent hasPermission check as we don't have http session
- MobileServerRequestExecutor: move read of cookie to later place as then clearer error message if given on connection error, during testing the system seemed to stall on storing the session cookie
- MobileServerStatusInformation: make this a stateless service
- RetrieveMobileServerStatus: make this a stateless service

---
M src/org/openbravo/mobile/core/authenticate/MobileKeyAuthenticationManager.java
M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
M src/org/openbravo/mobile/core/process/JSONRowConverter.java
M src/org/openbravo/mobile/core/process/MobileService.java
M src/org/openbravo/mobile/core/process/SecuredJSONProcess.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/RetrieveMobileServerStatus.java
---
(0091530)
hgbot   
2016-11-15 09:26   
Repository: erp/pmods/org.openbravo.retail.postest
Changeset: 79702a25c485ef542d409e90c85dbfd027fa18e6
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Nov 15 09:25:50 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.postest/rev/79702a25c485ef542d409e90c85dbfd027fa18e6 [^]

Related to issue 34277: Support stateless web/mobile service requests which do not create a http session
Adding test webservices to be called from test cases

---
A src/org/openbravo/retail/postest/POSTestParameterStatelessMobileService.java
A src/org/openbravo/retail/postest/POSTestParameterStatelessWebservice.java
A src/org/openbravo/retail/postest/POSTestStatefulMobileService.java
A src/org/openbravo/retail/postest/POSTestStatefulWebservice.java
A src/org/openbravo/retail/postest/POSTestStatelessMobileService.java
A src/org/openbravo/retail/postest/POSTestStatelessWebservice.java
---
(0091613)
hgbot   
2016-11-16 21:02   
Repository: erp/pmods/org.openbravo.retail.postest
Changeset: 1c0a2ecb0cc9a37eff8a8586dcddc74d30d87928
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Nov 16 21:01:55 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.postest/rev/1c0a2ecb0cc9a37eff8a8586dcddc74d30d87928 [^]

Related to issue 34277: Support stateless web/mobile service requests which do not create a http session
Add config of webservice

---
A config/org.openbravo.retail.postest-provider-config.xml
---
(0091671)
hgbot   
2016-11-20 00:58   
Repository: tools/automation/pi-mobile
Changeset: dd68f2b5bab47e9de1694b6cf719254ea12fe23c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Nov 20 00:57:45 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/dd68f2b5bab47e9de1694b6cf719254ea12fe23c [^]

Related to issue 34277: Support stateless web/mobile service requests which do not create a http session
Added testcases

---
A src-test/org/openbravo/test/mobile/retail/extmodules/unittest/suites/StatelessTestSuite.java
A src-test/org/openbravo/test/mobile/retail/extmodules/unittest/tests/statelesswebservice/TestStatelessWebService.java
---
(0091679)
hgbot   
2016-11-20 22:48   
Repository: tools/automation/pi-mobile
Changeset: 41c22490c55fb33a9d9a5397ec163b7fb61568c3
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Nov 20 22:46:06 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/41c22490c55fb33a9d9a5397ec163b7fb61568c3 [^]

Related to issue 34277: Support stateless web/mobile service requests which do not create a http session
Remove unused methods

---
M src-test/org/openbravo/test/mobile/retail/extmodules/unittest/tests/statelesswebservice/TestStatelessWebService.java
---
(0092046)
hgbot   
2016-12-02 19:36   
Repository: tools/automation/pi-mobile
Changeset: cdf73c649e759b2c02e407436439dbb85ebcfc8b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Dec 02 19:36:20 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cdf73c649e759b2c02e407436439dbb85ebcfc8b [^]

Related to issue 34277: Support stateless web/mobile service requests which do not create a http session but still supports login
Add a test which does basic authentication to show that stateless works with basic authentication

---
M src-test/org/openbravo/test/mobile/retail/extmodules/unittest/tests/statelesswebservice/TestStatelessWebService.java
---
(0092050)
mtaal   
2016-12-02 19:56   
Documentation:
http://wiki.openbravo.com/wiki/How_to_create_a_new_REST_webservice#Stateless_Webservice_Requests_-_HTTP_Session [^]
(0092051)
hgbot   
2016-12-02 20:13   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 3c0642565a0f27b1daddf6733272d4a525beffca
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Dec 02 20:12:41 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/3c0642565a0f27b1daddf6733272d4a525beffca [^]

Related to issue 34277: Support stateless web/mobile service requests which do not create a http session but still supports login
Make retrieve sync status stateless

---
M src/org/openbravo/retail/storeserver/synchronization/RetrieveSyncStatus.java
---