summaryrefslogtreecommitdiff
path: root/BKUOnline/src
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-01-28 19:40:11 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-01-28 19:40:11 +0000
commit54aa4703e3d66c5b1a63b8d925fd4c9c1766687c (patch)
tree28bde8b9ec66dd2f94a34e39ee8392e40e9f0809 /BKUOnline/src
parentcfae494572cdac7ab124f9a4214bc8f43b87b7fe (diff)
downloadmocca-54aa4703e3d66c5b1a63b8d925fd4c9c1766687c.tar.gz
mocca-54aa4703e3d66c5b1a63b8d925fd4c9c1766687c.tar.bz2
mocca-54aa4703e3d66c5b1a63b8d925fd4c9c1766687c.zip
activation
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@291 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src')
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java3
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java8
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java18
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java10
-rw-r--r--BKUOnline/src/main/webapp/applet.jsp14
-rw-r--r--BKUOnline/src/main/webapp/slRequestForm.html3
6 files changed, 37 insertions, 19 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java
index d9be0981..c758bcee 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java
@@ -133,6 +133,9 @@ public class BKURequestHandler extends SpringBKUServlet {
.getFormData("appletHashDataDisplay"), charset);
String localeFormParam = getStringFromStream(bindingProcessor
.getFormData("locale"), charset);
+ String extension = getStringFromStream(bindingProcessor
+ .getFormData("appletExtension"), charset);
+
if (width != null) {
try {
log.trace("Found applet width parameter: " + width);
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
index a617c61f..81b70b7c 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
@@ -19,19 +19,17 @@ package at.gv.egiz.stal.service.impl;
import at.gv.egiz.stal.ErrorResponse;
import at.gv.egiz.stal.HashDataInput;
-import at.gv.egiz.stal.InfoboxReadRequest;
import at.gv.egiz.stal.QuitRequest;
import at.gv.egiz.stal.STALRequest;
import at.gv.egiz.stal.STALResponse;
import at.gv.egiz.stal.SignRequest;
import at.gv.egiz.stal.service.translator.STALTranslator;
import at.gv.egiz.stal.service.translator.TranslationException;
-import at.gv.egiz.stal.service.types.InfoboxReadRequestType;
import at.gv.egiz.stal.service.types.ObjectFactory;
import at.gv.egiz.stal.service.types.QuitRequestType;
import at.gv.egiz.stal.service.types.RequestType;
import at.gv.egiz.stal.service.types.ResponseType;
-import at.gv.egiz.stal.service.types.SignRequestType;
+import at.gv.egiz.stalx.service.translator.STALXTranslationHandler;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -71,10 +69,12 @@ public class STALRequestBrokerImpl implements STALRequestBroker {
if (timeoutMillisec <= 0)
timeoutMillisec = DEFAULT_TIMEOUT_MS;
timeout = timeoutMillisec;
-// translator.registerTranslationHandler(handler);
requests = new ArrayList<JAXBElement<? extends RequestType>>();
responses = new ArrayList<JAXBElement<? extends ResponseType>>();
hashDataInputs = new ArrayList<HashDataInput>();
+
+ // register handler for STAL-X
+ translator.registerTranslationHandler(new STALXTranslationHandler());
}
/**
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java
index afeba9cb..a30c6bb2 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java
@@ -18,6 +18,8 @@ package at.gv.egiz.stal.service.impl;
//import at.buergerkarte.namespaces.cardchannel.service.CommandAPDUType;
//import at.buergerkarte.namespaces.cardchannel.service.ScriptType;
+import at.buergerkarte.namespaces.cardchannel.service.CommandAPDUType;
+import at.buergerkarte.namespaces.cardchannel.service.ScriptType;
import at.gv.egiz.bku.binding.BindingProcessor;
import at.gv.egiz.bku.binding.BindingProcessorManager;
import at.gv.egiz.bku.binding.Id;
@@ -78,8 +80,10 @@ public class STALServiceImpl implements STALPortType {
@Resource
protected WebServiceContext wsContext;
protected IdFactory idF = IdFactory.getInstance();
+ /** JAXB ObjectFactories */
private at.gv.egiz.stal.service.types.ObjectFactory stalObjFactory = new at.gv.egiz.stal.service.types.ObjectFactory();
-// private at.buergerkarte.namespaces.cardchannel.service.ObjectFactory ccObjFactory = new at.buergerkarte.namespaces.cardchannel.service.ObjectFactory();
+ /** don't confuse with at.buergerkarte.namespaces.cardchannel */
+ private at.buergerkarte.namespaces.cardchannel.service.ObjectFactory ccObjFactory = new at.buergerkarte.namespaces.cardchannel.service.ObjectFactory();
@Override
public GetNextRequestResponseType connect(String sessId) {
@@ -331,12 +335,12 @@ public class STALServiceImpl implements STALPortType {
if (responsesIn == null) {
log.info("[TestSession] received CONNECT, return dummy requests ");
-// ScriptType scriptT = ccObjFactory.createScriptType();
-// CommandAPDUType cmd = ccObjFactory.createCommandAPDUType();
-// cmd.setValue("TestSession CardChannelCMD 1234".getBytes());
-// scriptT.getResetOrCommandAPDUOrVerifyAPDU().add(cmd);
-// reqs.add(ccObjFactory.createScript(scriptT));
- addDummyRequests(reqs);
+// addDummyRequests(reqs);
+ ScriptType scriptT = ccObjFactory.createScriptType();
+ CommandAPDUType cmd = ccObjFactory.createCommandAPDUType();
+ cmd.setValue("TestSession CardChannelCMD 1234".getBytes());
+ scriptT.getResetOrCommandAPDUOrVerifyAPDU().add(cmd);
+ reqs.add(ccObjFactory.createScript(scriptT));
} else if (responsesIn != null && responsesIn.size() > 0 && responsesIn.get(0).getValue() instanceof ErrorResponseType) {
log.info("[TestSession] received ErrorResponse, return QUIT request");
QuitRequestType quitT = stalObjFactory.createQuitRequestType();
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java
index 92559254..9caf950f 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java
@@ -47,11 +47,11 @@ public class STALXJAXBContextFactory implements JAXBContextFactory {
}
List<Class> classes = new ArrayList<Class>();
classes.addAll(classesToBind);
-// Class ccOF = at.buergerkarte.namespaces.cardchannel.service.ObjectFactory.class;
-// if (!classes.contains(ccOF)) {
-// log.debug("adding " + ccOF + " to JAXBContext seed");
-// classes.add(ccOF);
-// }
+ Class ccOF = at.buergerkarte.namespaces.cardchannel.service.ObjectFactory.class;
+ if (!classes.contains(ccOF)) {
+ log.debug("adding " + ccOF + " to JAXBContext seed");
+ classes.add(ccOF);
+ }
//TODO add typeReference?
diff --git a/BKUOnline/src/main/webapp/applet.jsp b/BKUOnline/src/main/webapp/applet.jsp
index 3bf0ff40..ada48f22 100644
--- a/BKUOnline/src/main/webapp/applet.jsp
+++ b/BKUOnline/src/main/webapp/applet.jsp
@@ -39,6 +39,16 @@
String backgroundImg = (String) session.getAttribute("appletBackground");
String guiStyle = (String) session.getAttribute("appletGuiStyle");
String locale = (String) session.getAttribute("locale");
+
+ String appletClass, appletArchive;
+ //if (Boolean.parseBoolean((String) session.getAttribute("appletExtension"))) {
+ if ("activation".equals(guiStyle)) {
+ appletArchive = "BKUAppletExt.jar";
+ appletClass = "at.gv.egiz.bku.online.applet.ext.BKUAppletExt.class";
+ } else {
+ appletArchive = "BKUApplet.jar";
+ appletClass = "at.gv.egiz.bku.online.applet.BKUApplet.class";
+ }
%>
<body id="appletpage" style="width:<%=width%>">
<script>
@@ -48,8 +58,8 @@
} else {
var attributes = {
codebase :'applet',
- code :'at.gv.egiz.bku.online.applet.BKUApplet.class',
- archive :'BKUApplet.jar, commons-logging-1.1.1.jar, iaik_jce_me4se-3.04.jar',
+ code : '<%=appletClass%>',
+ archive : '<%=appletArchive + ", commons-logging.jar, iaik_jce_me4se.jar"%>',
width : <%=width%>,
height :<%=height%>
};
diff --git a/BKUOnline/src/main/webapp/slRequestForm.html b/BKUOnline/src/main/webapp/slRequestForm.html
index 10330c8c..ff96a6fa 100644
--- a/BKUOnline/src/main/webapp/slRequestForm.html
+++ b/BKUOnline/src/main/webapp/slRequestForm.html
@@ -95,9 +95,10 @@ legend {
name="appletBackground" value="" id="appletBackground">
<p>
<label for="appletGuiStyle">GUI Style</label>
- <input type="radio" name="appletGuiStyle" value="tiny" checked="checked">tiny
+ <input type="radio" name="appletGuiStyle" value="tiny">tiny
<input type="radio" name="appletGuiStyle" value="simple" checked="checked">simple
<input type="radio" name="appletGuiStyle" value="advanced">advanced
+ <input type="radio" name="appletGuiStyle" value="activation">activation
</p>
<!--