From 057f884903954203339182649daa100ef4ce89e3 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> Date: Mon, 22 Dec 2003 17:28:21 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Build_001'. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build_001@85 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../service/SignatureVerificationService.java | 130 --------------------- 1 file changed, 130 deletions(-) delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java') diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java b/spss.server/src/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java deleted file mode 100644 index adb09ca0a..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java +++ /dev/null @@ -1,130 +0,0 @@ -package at.gv.egovernment.moa.spss.server.service; - -import org.w3c.dom.Element; - -import org.apache.axis.AxisFault; - -import at.gv.egovernment.moa.spss.MOAException; -import at.gv.egovernment.moa.spss.MOASystemException; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; -import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser; -import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureResponseBuilder; -import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser; -import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse; -import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker; -import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker; - -/** - * The service endpoint for the SignatureVerification web service. - * - * @author Patrick Peck - * @version $Id$ - */ -public class SignatureVerificationService { - - /** - * Handle a VerifyCMSSignatureRequest. - * - * @param request The VerifyCMSSignatureRequest to work on - * (contained in the 0th element of the array). - * @return A VerifyCMSSignatureResponse as the only element of - * the Element array. - * @throws AxisFault An error occurred during handling of the message. - */ - public Element[] VerifyCMSSignatureRequest(Element[] request) - throws AxisFault { - CMSSignatureVerificationInvoker invoker = - CMSSignatureVerificationInvoker.getInstance(); - Element[] response = new Element[1]; - - try { - // create a parser and builder for binding API objects to/from XML - VerifyCMSSignatureRequestParser requestParser = - new VerifyCMSSignatureRequestParser(); - VerifyCMSSignatureResponseBuilder responseBuilder = - new VerifyCMSSignatureResponseBuilder(); - Element reparsedReq; - VerifyCMSSignatureRequest requestObj; - VerifyCMSSignatureResponse responseObj; - - // validate the request - reparsedReq = ServiceUtils.reparseRequest(request[0]); - - // convert to API objects - requestObj = requestParser.parse(reparsedReq); - - // invoke the core logic - responseObj = invoker.verifyCMSSignature(requestObj); - - // map back to XML - response[0] = responseBuilder.build(responseObj).getDocumentElement(); - - } catch (MOAException e) { - AxisFault fault = AxisFault.makeFault(e); - fault.setFaultDetail(new Element[] { e.toErrorResponse()}); - throw fault; - } catch (Throwable t) { - MOASystemException e = new MOASystemException("2900", null, t); - AxisFault fault = AxisFault.makeFault(e); - fault.setFaultDetail(new Element[] { e.toErrorResponse()}); - throw fault; - } - - return response; - } - - /** - * Handle a VerifyXMLSignatureRequest. - * - * @param request The VerifyXMLSignatureRequest to work on - * (contained in the 0th element of the array). - * @return A VerifyXMLSignatureResponse as the only element of - * the Element array. - * @throws AxisFault An error occurred during handling of the message. - */ - public Element[] VerifyXMLSignatureRequest(Element[] request) - throws AxisFault { - XMLSignatureVerificationInvoker invoker = - XMLSignatureVerificationInvoker.getInstance(); - Element[] response = new Element[1]; - - try { - // create a parser and builder for binding API objects to/from XML - VerifyXMLSignatureRequestParser requestParser = - new VerifyXMLSignatureRequestParser(); - VerifyXMLSignatureResponseBuilder responseBuilder = - new VerifyXMLSignatureResponseBuilder(); - Element reparsedReq; - VerifyXMLSignatureRequest requestObj; - VerifyXMLSignatureResponse responseObj; - - // validate the request - reparsedReq = ServiceUtils.reparseRequest(request[0]); - - // convert to API objects - requestObj = requestParser.parse(reparsedReq); - - // invoke the core logic - responseObj = invoker.verifyXMLSignature(requestObj); - - // map back to XML - response[0] = responseBuilder.build(responseObj).getDocumentElement(); - - } catch (MOAException e) { - AxisFault fault = AxisFault.makeFault(e); - fault.setFaultDetail(new Element[] { e.toErrorResponse()}); - throw fault; - } catch (Throwable t) { - MOASystemException e = new MOASystemException("2900", null, t); - AxisFault fault = AxisFault.makeFault(e); - fault.setFaultDetail(new Element[] { e.toErrorResponse()}); - throw fault; - } - - return response; - } - -} -- cgit v1.2.3