BZ-1051459 - The first time call of a web service task is always unsuccessful

(cherry picked from commit 162c419c551439a587601fbf9fdb3f09f909ceea)