diff options
author | ferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-12-14 17:41:46 +0000 |
---|---|---|
committer | ferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-12-14 17:41:46 +0000 |
commit | 8cd55d606208aa21932a043641cc57c35f146db4 (patch) | |
tree | ed5c2ba85b368b9d77077322709b979d8849b3c6 /src/main/java/at/knowcenter/wag/egov | |
parent | e1116afd140b5d7e15013b5f1771da46baed554e (diff) | |
download | pdf-as-3-8cd55d606208aa21932a043641cc57c35f146db4.tar.gz pdf-as-3-8cd55d606208aa21932a043641cc57c35f146db4.tar.bz2 pdf-as-3-8cd55d606208aa21932a043641cc57c35f146db4.zip |
new template loading
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@511 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java | 26 |
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())
|