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.java44
1 files changed, 27 insertions, 17 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 cec36d4b..4840a5e0 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
@@ -88,21 +88,28 @@ public class SZRClient {
private SZRService szrService = null;
private String szrURL = null;
private QName qname = null;
-
- public IdentityLinkType getIdentityLink(PersonInfoType personInfo, List<KeyValueType> keyValue, Boolean insertERnP) throws SZRCommunicationException {
- try {
- return szr.getIdentityLink(
- personInfo,
- keyValue,
- insertERnP);
-
- } catch (SZRException_Exception e) {
- log.warn("SZR communication FAILED. Reason: " + e.getMessage(), e);
- throw new SZRCommunicationException("ernb.02", new Object[] {e.getMessage()}, e);
-
- }
-
- }
+
+ /*
+ * 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 {
try {
@@ -139,7 +146,9 @@ public class SZRClient {
// ok, we have success
Document doc = DOMUtils.parseDocument(
new ByteArrayInputStream(szrResponse),
- true, XMLNamespaceConstants.ALL_SCHEMA_LOCATIONS, null, null
+ true,
+ XMLNamespaceConstants.ALL_SCHEMA_LOCATIONS + " " + Constants.SZR_SCHEMA_LOCATIONS,
+ null, null
);
String xpathExpression = "//saml:Assertion";
Element nsNode = doc.createElementNS("urn:oasis:names:tc:SAML:1.0:assertion", "saml:NSNode");
@@ -288,7 +297,8 @@ public class SZRClient {
LoggingHandler loggingHandler = new LoggingHandler();
handlerList.add(loggingHandler);
- }
+ }
+ bindingProvider.getBinding().setHandlerChain(handlerList);
}
private SSLContext createSSLContext(String clientType) {