aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java
index 30bffb7..4f4a3c0 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java
@@ -31,9 +31,6 @@ import javax.xml.rpc.Call;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
-import at.gv.egiz.pdfas.exceptions.ErrorCode;
-import at.gv.egiz.pdfas.exceptions.external.ExternalErrorException;
-
import org.apache.axis.message.SOAPBodyElement;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
@@ -41,6 +38,8 @@ import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.w3c.dom.Document;
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.gv.egiz.pdfas.exceptions.external.ExternalErrorException;
import at.knowcenter.wag.egov.egiz.cfg.ConfigLogger;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
@@ -53,7 +52,6 @@ import at.knowcenter.wag.egov.egiz.sig.SignatureObject;
import at.knowcenter.wag.egov.egiz.sig.SignatureResponse;
import at.knowcenter.wag.egov.egiz.sig.X509Cert;
import at.knowcenter.wag.egov.egiz.tools.CodingHelper;
-import at.knowcenter.wag.egov.egiz.tools.FileHelper;
/**
* Connector to access the MOA service.
@@ -181,8 +179,9 @@ public class MOAConnector implements Connector
String sign_request_filename = getSignRequestTemplateFileName(sigType);
String key_ident = getSignKeyIdentifier(sigType);
- // FIXME[tknall]: might fail since template has been moved to library
- String sign_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename));
+
+ //String sign_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename));
+ String sign_req_str = this.settings_.readInternalResourceAsString(sign_request_filename);
if (sign_req_str == null)
{
SignatureException se = new SignatureException(300, "File not found:" + sign_request_filename);
@@ -414,10 +413,12 @@ public class MOAConnector implements Connector
}
String verify_template = getVerifyTemplateFileName(sigObject.getSignationType());
String sig_prop_template = getSigPropFileName(sigObject.getSignationType());
- // FIXME[tknall]: might fail since template has been moved to library
- String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_template));
- // FIXME[tknall]: might fail since template has been moved to library
- String sig_prop_str = FileHelper.readFromFile(SettingsReader.relocateFile(sig_prop_template));
+
+ //String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_template));
+ String verify_req_str = this.settings_.readInternalResourceAsString(verify_template);
+
+ //String sig_prop_str = FileHelper.readFromFile(SettingsReader.relocateFile(sig_prop_template));
+ String sig_prop_str = this.settings_.readInternalResourceAsString(sig_prop_template);
if (logger_.isDebugEnabled())
{
@@ -525,8 +526,9 @@ public class MOAConnector implements Connector
// +
// ".request");
String trust_profile = getVerifyTrustProfileID(sigObject.getSignationType());
- // FIXME[tknall]: might fail since template has been moved to library
- String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request));
+
+ //String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request));
+ String verify_req_str = this.settings_.readInternalResourceAsString(verify_request);
String verify_template_str = null;
if (sigObject.isMOASigned())