aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java47
1 files changed, 11 insertions, 36 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 a372ae15..2003a5eb 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
@@ -69,7 +69,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import org.w3._2000._09.xmldsig.KeyValueType;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -83,9 +82,10 @@ import at.gv.egiz.eaaf.core.impl.utils.FileUtils;
import at.gv.egiz.eaaf.core.impl.utils.KeyStoreUtils;
import szrservices.GetBPK;
import szrservices.GetBPKResponse;
-import szrservices.GetIdentityLink;
-import szrservices.GetIdentityLinkResponse;
+import szrservices.GetIdentityLinkEidas;
+import szrservices.GetIdentityLinkEidasResponse;
import szrservices.IdentityLinkType;
+import szrservices.ObjectFactory;
import szrservices.PersonInfoType;
import szrservices.SZR;
import szrservices.SZRException_Exception;
@@ -110,38 +110,13 @@ public class SZRClient {
private SZRService szrService = null;
private String szrURL = null;
private QName qname = null;
-
- /*
- * This method does not return a valid signed IDL, because Apache CXF XML parser switch namespaces!!!!
- */
-// public IdentityLinkType getIdentityLink(PersonInfoType personInfo, List<KeyValueType> keyValue, Boolean insertERnP) throws SZRCommunicationException {
-// try {
-// return szr.getIdentityLink(
-// personInfo,
-// keyValue,
-// insertERnP);
-//
-// } catch (SZRException_Exception | SOAPFaultException e) {
-// log.warn("SZR communication FAILED. Reason: " + e.getMessage(), e);
-// throw new SZRCommunicationException("ernb.02", new Object[] {e.getMessage()}, e);
-//
-// } catch (Exception e) {
-// log.warn("SZR communication FAILED. Reason: " + e.getMessage(), e);
-// throw new SZRCommunicationException("ernb.02", new Object[] {e.getMessage()}, e);
-//
-// }
-//
-// }
- public IdentityLinkType getIdentityLinkInRawMode(PersonInfoType personInfo, List<KeyValueType> keyValue, Boolean insertERnP) throws SZRCommunicationException {
+ public IdentityLinkType getIdentityLinkInRawMode(PersonInfoType personInfo) throws SZRCommunicationException {
try {
- GetIdentityLink getIDL = new GetIdentityLink();
- getIDL.setInsertERnP(insertERnP);
+ GetIdentityLinkEidas getIDL = new GetIdentityLinkEidas();
getIDL.setPersonInfo(personInfo);
- if (keyValue != null)
- getIDL.getKeyValue().addAll(keyValue);
-
- JAXBContext jaxbContext = JAXBContext.newInstance(GetIdentityLink.class);
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
@@ -156,9 +131,9 @@ public class SZRClient {
log.trace("Receive RAW response from SZR");
byte[] szrResponse = sourceToByteArray(response);
- JAXBContext ctx = JAXBContext.newInstance(IdentityLinkType.class
- .getPackage().getName());
- GetIdentityLinkResponse jaxbElement = (GetIdentityLinkResponse) ctx
+ //JAXBContext ctx = JAXBContext.newInstance(IdentityLinkType.class
+// .getPackage().getName());
+ GetIdentityLinkEidasResponse jaxbElement = (GetIdentityLinkEidasResponse) jaxbContext
.createUnmarshaller().unmarshal(new ByteArrayInputStream(szrResponse));
@@ -221,7 +196,7 @@ public class SZRClient {
@PostConstruct
private void initialize() {
log.info("Starting SZR-Client initialization .... ");
- URL url = SZRClient.class.getResource("/szr_client/SZR-1.WSDL");
+ URL url = SZRClient.class.getResource("/szr_client/SZR-1.1.WSDL");
boolean useTestSZR = basicConfig.getBasicMOAIDConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_SZRCLIENT_USETESTSERVICE,