I'm using Arcgis Java SDK 10.2.4 and developing desktop application.
During development we're using feature services without any authentication and now we're secured them with username and password.
But secured feature layer access is denied sometimes, says "Unauthorized access to a secure service" even though password is correct. We're able to login through web with the same username and password and query features works.
We're creating user credentials following code:
UserCredentials userCredentials = new UserCredentials();
final GeodatabaseFeatureServiceTable fsTable = new GeodatabaseFeatureServiceTable(layerData.getFullUrl(), userCredentials, layerData.getLayerIndex());
Our feature service is running with self signed certificate and we've set custom trust store which has the feature service certificate.
Any things to check?