Fix ws certificate generator for java 8
Merge pull request #2657 from pvlugter/java8-tests

Fix WS certificate generator for java 8