aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/web
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-02-07 10:08:21 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-02-07 10:08:21 +0000
commita0de2a3b2a5f4a99f280f5caebbca0d183ae109a (patch)
tree7479e30c10c3994cba18c6bf8784f61748bb6cd3 /src/main/java/at/knowcenter/wag/egov/egiz/web
parent8f7cebd9c2c5c0f6e33863ba57ad1c215f35605c (diff)
downloadpdf-as-3-a0de2a3b2a5f4a99f280f5caebbca0d183ae109a.tar.gz
pdf-as-3-a0de2a3b2a5f4a99f280f5caebbca0d183ae109a.tar.bz2
pdf-as-3-a0de2a3b2a5f4a99f280f5caebbca0d183ae109a.zip
Bugfix: Querformat, BKU 2.7.x, ...
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@35 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/web')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousDataResponder.java21
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousRedirectResponder.java6
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java9
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/SessionInformation.java3
4 files changed, 30 insertions, 9 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousDataResponder.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousDataResponder.java
index 847bbcf..52846f5 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousDataResponder.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousDataResponder.java
@@ -18,7 +18,9 @@
package at.knowcenter.wag.egov.egiz.web;
import java.io.IOException;
+import java.util.Enumeration;
import java.util.List;
+import java.util.Properties;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -34,6 +36,7 @@ import org.apache.log4j.Logger;
import at.knowcenter.wag.egov.egiz.cfg.ConfigLogger;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
+import at.knowcenter.wag.egov.egiz.sig.connectors.BKUPostConnection;
/**
* Servlet that responds to the data post requests of the local service (e.g.
@@ -143,7 +146,23 @@ public class AsynchronousDataResponder extends HttpServlet
}
- si.response_string[si.current_operation] = resp_string; //request.getParameter("XMLResponse");
+ // TODO hotfix
+ if (logger_.isDebugEnabled())
+ {
+ Enumeration header_names = request.getHeaderNames();
+ while (header_names.hasMoreElements())
+ {
+ String header_name = (String)header_names.nextElement();
+ String header_value = request.getHeader(header_name);
+ logger_.debug("header: name = " + header_name + ", value = " +header_value);
+ }
+ }
+ String user_agent = request.getHeader("User-Agent");
+ logger_.debug("User-Agent header = " + user_agent);
+ Properties response_properties = new Properties();
+ BKUPostConnection.parseBKUVersion(user_agent, response_properties);
+ response_properties.setProperty("response_string", resp_string);
+ si.response_properties[si.current_operation] = response_properties; //request.getParameter("XMLResponse");
//logger_.debug("AsyncDataResponder: si.response_string[si.current_operation] = " + si.response_string[si.current_operation]);
si.current_operation++;
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousRedirectResponder.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousRedirectResponder.java
index b79dd87..031b03c 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousRedirectResponder.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/AsynchronousRedirectResponder.java
@@ -147,9 +147,9 @@ public class AsynchronousRedirectResponder extends HttpServlet
{
List results = new ArrayList();
- for (int i = 0; i < si.response_string.length; i++)
+ for (int i = 0; i < si.response_properties.length; i++)
{
- SignatureResponse sig_resp = local_conn.analyzeVerifyResponse(si.response_string[i]);
+ SignatureResponse sig_resp = local_conn.analyzeVerifyResponse(si.response_properties[i]);
results.add(sig_resp);
}
@@ -176,7 +176,7 @@ public class AsynchronousRedirectResponder extends HttpServlet
// has already been computed - don't recompute it.
if (si.sign_result == null)
{
- si.iui.signed_signature_object = local_conn.analyzeSignResponse(si.response_string[0], si.type);
+ si.iui.signed_signature_object = local_conn.analyzeSignResponse(si.response_properties[0], si.type);
PdfASID algorithm = FormFields.translateSignatureModeToPdfASID(si.mode);
Signator signator = SignatorFactory.createSignator(algorithm);
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java
index 50bea41..95f72ef 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
+import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -82,8 +83,8 @@ public abstract class LocalRequestHelper
si.requests = new LocalRequest[1];
si.requests[0] = new LocalRequest(local_conn.getSignURL(si.type), request_string);
si.current_operation = 0;
- si.response_string = new String[1];
- si.response_string[0] = null;
+ si.response_properties = new Properties[1];
+ si.response_properties[0] = null;
// SessionTable.put(si);
request.getSession().setAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION, si);
@@ -113,7 +114,7 @@ public abstract class LocalRequestHelper
HttpServletResponse response) throws SignatureException, NormalizeException, IOException, ConnectorFactoryException
{
si.requests = new LocalRequest[holders_to_verify.size()];
- si.response_string = new String[si.requests.length];
+ si.response_properties = new Properties[si.requests.length];
si.current_operation = 0;
si.finished = false;
@@ -134,7 +135,7 @@ public abstract class LocalRequestHelper
LocalRequest local_request = new LocalRequest(local_conn.getVerifyURL(holder.getSignatureObject().getSignationType()), request_string);
si.requests[i] = local_request;
- si.response_string[i] = null;
+ si.response_properties[i] = null;
}
// ByteArrayOutputStream baos = new ByteArrayOutputStream();
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionInformation.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionInformation.java
index f3c34d3..52a51a3 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionInformation.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionInformation.java
@@ -19,6 +19,7 @@ package at.knowcenter.wag.egov.egiz.web;
import java.io.Serializable;
import java.util.List;
+import java.util.Properties;
import at.knowcenter.wag.egov.egiz.framework.SignResult;
import at.knowcenter.wag.egov.egiz.pdf.IncrementalUpdateInformation;
@@ -91,7 +92,7 @@ public class SessionInformation implements Serializable
/**
* An array of response strings of the local requests.
*/
- public String[] response_string = null;
+ public Properties[] response_properties = null;
/**
* Tells, if the current local request has been finished.