diff options
-rw-r--r-- | eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java index 458305c6..81d1d657 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java @@ -231,14 +231,30 @@ public class SZRClient { } + //check if Clients can be initialized + if (szr == null ) { + log.error("SZR " + CLIENT_DEFAULT + " is 'NULL'. Something goes wrong"); + throw new RuntimeException("SZR " + CLIENT_DEFAULT + " is 'NULL'. Something goes wrong"); + + } + if (dispatch == null ) { + log.error("SZR " + CLIENT_RAW + " is 'NULL'. Something goes wrong"); + throw new RuntimeException("SZR " + CLIENT_RAW + " is 'NULL'. Something goes wrong"); + + } + + //inject handler log.info("Use SZR service-URL: " + szrURL); injectBindingProvider((BindingProvider) szr, CLIENT_DEFAULT); injectBindingProvider((BindingProvider) dispatch, CLIENT_RAW); + //inject http parameters and SSL context log.debug("Inject HTTP client settings ... "); injectHTTPClient(szr, CLIENT_DEFAULT); injectHTTPClient(dispatch, CLIENT_RAW); + + log.info("SZR-Client initialization successfull"); } |