summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-03-01 17:47:58 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-03-01 17:47:58 +0000
commit83a9b613836910f7edc370c2fe60fa2268dc4461 (patch)
tree9b177edb4154bb84fe3888a5b0b88174eaa65712 /bkucommon/src/main/java/at/gv/egiz/bku
parent21ce9bef1e2b7cb1d2fe271045da9eebb86cef52 (diff)
downloadmocca-83a9b613836910f7edc370c2fe60fa2268dc4461.tar.gz
mocca-83a9b613836910f7edc370c2fe60fa2268dc4461.tar.bz2
mocca-83a9b613836910f7edc370c2fe60fa2268dc4461.zip
add redirect for CreateXMLSignatureResponse (top level) type
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@643 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java
index 8e3f6ece..ab2f08cc 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java
@@ -169,13 +169,19 @@ public class SLCommandFactory {
private synchronized void ensureJaxbContext() {
if (jaxbContext == null) {
try {
+ // add top-level types explicitly to jaxb context, otherwise the unmarshaller won't find them.
+ // cf. http://forums.java.net/jive/thread.jspa?threadID=75778&tstart=0
+ String slImplPkg = at.gv.egiz.slbinding.impl.CreateXMLSignatureResponseType.class.getPackage().getName();
+
String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName();
String xmldsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName();
String cardChannelPkg = at.buergerkarte.namespaces.cardchannel.ObjectFactory.class.getPackage().getName();
String slPkgLegacy1_0 = at.buergerkarte.namespaces.securitylayer._20020225_.ObjectFactory.class.getPackage().getName();
String slPkgLegacy1_1 = at.buergerkarte.namespaces.securitylayer._20020831_.ObjectFactory.class.getPackage().getName();
- setJaxbContext(JAXBContext.newInstance(slPkg + ":" + xmldsigPkg + ":" + cardChannelPkg
- + ":" + slPkgLegacy1_0 + ":" + slPkgLegacy1_1));
+ String contextPath = slImplPkg + ":" + slPkg + ":" + xmldsigPkg + ":" + cardChannelPkg
+ + ":" + slPkgLegacy1_0 + ":" + slPkgLegacy1_1;
+ log.debug("jaxb context path: " + contextPath);
+ setJaxbContext(JAXBContext.newInstance(contextPath));
} catch (JAXBException e) {
log.error("Failed to setup JAXBContext security layer request.", e);
throw new SLRuntimeException(e);
@@ -378,7 +384,7 @@ public class SLCommandFactory {
SLCommand slCommand;
try {
slCommand = implClass.newInstance();
- log.debug("SLCommand " + slCommand.getName() + " created.");
+ log.debug("SLCommand " + slCommand.getClass().toString() + " created.");
} catch (InstantiationException e) {
// unexpected error
log.error("Failed to instantiate security layer command implementation.",