NXP-11212: set timeout with an Integer instead of a Long, to be compliant with http-core libs
NXP-11215 Avoid NPE when used with non persited DocumentModel