I was exploring LayerAccessSOI java sample.
Attached the LayerAccessSOI to SampleWorldCities map service, when accessed the map service in ArcGIS REST Services Directory...
Before Login - "Layers" section was not showing any layers, this is the correct behaviour.
After Login - "Layers" section was still not showing any (authorized) layers, seems there is something wrong.
When I DEBUG the SOI for "After Login" scenario the "userName" is getting empty for the below lines of code.
IServerUserInfo userInfo = ServerUtilities.getServerUserInfo();
String userName = userInfo.getName();
Please refer to the attachment.
Did any body experienced this? Can help?
Edit:
- I checked the LayerAccessSOI .Net sample, it has no issues.
- For .Net, every page refresh on the map service rest directory was triggering handleRESTRequest method. But it's not the case with Java sample.