From 32d17447a258188b2d534bcb0bf65a659ba7b7d0 Mon Sep 17 00:00:00 2001 From: mcentner Date: Fri, 29 Aug 2008 12:11:34 +0000 Subject: Initial import. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUApplet/keystore.ks | Bin 0 -> 5635 bytes BKUApplet/pom.xml | 117 + BKUApplet/src/main/java/META-INF/MANIFEST.MF | 3 + .../at/gv/egiz/bku/online/applet/BKUApplet.java | 101 + .../at/gv/egiz/bku/online/applet/BKUWorker.java | 286 +++ .../online/applet/InternalSSLSocketFactory.java | 101 + .../applet/InternalSSLSocketFactoryException.java | 45 + .../gv/egiz/bku/online/applet/Messages.properties | 58 + .../egiz/bku/online/applet/Messages_de.properties | 42 + .../at/gv/egiz/bku/online/applet/images/logo.png | Bin 0 -> 4035 bytes .../at/gv/egiz/stal/client/STALServiceTest.java | 96 + BKUCommonGUI/pom.xml | 33 + BKUCommonGUI/src/main/java/META-INF/MANIFEST.MF | 3 + .../src/main/java/at/gv/egiz/bku/gui/BKUGUI.java | 909 +++++++ .../main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java | 66 + .../java/at/gv/egiz/bku/gui/BKUGUIFactory.java | 32 + .../java/at/gv/egiz/bku/gui/HashDataInput.java | 36 + .../at/gv/egiz/bku/gui/Messages.properties | 39 + BKUCommonGUI/src/main/resources/images/logo.png | Bin 0 -> 4035 bytes .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 53 + .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 136 ++ ...clipse.wst.jsdt.core.javascriptValidator.launch | 7 + BKULocal/pom.xml | 79 + .../egiz/bku/local/conf/ConfigurationUpdater.java | 44 + .../at/gv/egiz/bku/local/conf/Configurator.java | 274 +++ .../java/at/gv/egiz/bku/local/stal/PINDialog.java | 214 ++ .../gv/egiz/bku/local/stal/QuitRequestHandler.java | 41 + .../java/at/gv/egiz/bku/local/stal/SMCCSTAL.java | 95 + .../at/gv/egiz/bku/local/stal/SMCCSTALFactory.java | 27 + .../egiz/bku/local/stal/SwingInsertCardDialog.java | 147 ++ .../gv/egiz/bku/local/stal/SwingPINProvider.java | 57 + .../at/gv/egiz/bku/local/stal/SwingPinDialog.java | 265 ++ .../egiz/bku/local/webapp/BKURequestHandler.java | 100 + .../gv/egiz/bku/local/webapp/SpringBKUServlet.java | 30 + .../at/gv/egiz/bku/local/Userdialog.properties | 27 + .../resources/at/gv/egiz/bku/local/baseconfig.xml | 38 + .../main/resources/at/gv/egiz/bku/local/logo.png | Bin 0 -> 4035 bytes .../resources/at/gv/egiz/bku/local/truststore.jks | Bin 0 -> 1037 bytes BKULocal/src/main/resources/log4j.properties | 31 + BKULocal/src/main/webapp/META-INF/MANIFEST.MF | 3 + .../src/main/webapp/WEB-INF/applicationContext.xml | 69 + BKULocal/src/main/webapp/WEB-INF/web.xml | 57 + BKULocal/src/test/java/ConfigTest.java | 49 + BKULocal/src/test/java/JustASandbox.java | 78 + .../at/gv/egiz/bku/local/stal/TestSignRequest.java | 55 + .../at/gv/egiz/bku/local/stal/sigInfo.xml | 79 + BKUOnline/catalog.xml | 4 + BKUOnline/nb-configuration.xml | 15 + BKUOnline/pom.xml | 120 + BKUOnline/private/cache/retriever/catalog.xml | 5 + .../java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd | 362 +++ .../cache/retriever/www.w3.org/2001/XMLSchema.xsd | 2534 ++++++++++++++++++++ .../src/main/custom-binding/stalservice-custom.xml | 102 + .../src/main/custom-binding/staltypes-custom.xml | 70 + .../at/gv/egiz/bku/online/conf/Configurator.java | 69 + .../egiz/bku/online/webapp/BKURequestHandler.java | 91 + .../gv/egiz/bku/online/webapp/ResultServlet.java | 120 + .../gv/egiz/bku/online/webapp/SessionTimeout.java | 49 + .../egiz/bku/online/webapp/SpringBKUServlet.java | 31 + .../service/impl/RequestBrokerSTALFactory.java | 38 + .../egiz/stal/service/impl/STALRequestBroker.java | 43 + .../stal/service/impl/STALRequestBrokerImpl.java | 554 +++++ .../gv/egiz/stal/service/impl/STALServiceImpl.java | 220 ++ .../src/main/resources/commons-logging.properties | 16 + BKUOnline/src/main/resources/log4j.properties | 34 + BKUOnline/src/main/webapp/HTTP-ohne.html | 85 + BKUOnline/src/main/webapp/META-INF/MANIFEST.MF | 3 + BKUOnline/src/main/webapp/META-INF/context.xml | 18 + .../src/main/webapp/WEB-INF/applicationContext.xml | 43 + BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml | 36 + BKUOnline/src/main/webapp/WEB-INF/web.xml | 97 + BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl | 82 + BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd | 135 ++ BKUOnline/src/main/webapp/appletPage.jsp | 65 + BKUOnline/src/main/webapp/expired.html | 28 + BKUOnline/src/main/webapp/index.html | 59 + BKUOnline/src/main/webapp/js/deployJava.js | 886 +++++++ .../egiz/stal/service/STALRequestBrokerTest.java | 362 +++ LICENSE.txt | 202 ++ NOTICE.txt | 17 + STAL/catalog.xml | 4 + STAL/pom.xml | 48 + STAL/private/cache/retriever/catalog.xml | 5 + .../java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd | 362 +++ .../cache/retriever/www.w3.org/2001/XMLSchema.xsd | 2534 ++++++++++++++++++++ STAL/src/main/java/META-INF/MANIFEST.MF | 3 + .../main/java/at/gv/egiz/stal/ErrorResponse.java | 112 + .../at/gv/egiz/stal/HashDataInputCallback.java | 24 + .../java/at/gv/egiz/stal/InfoboxReadRequest.java | 112 + .../java/at/gv/egiz/stal/InfoboxReadResponse.java | 78 + .../src/main/java/at/gv/egiz/stal/QuitRequest.java | 48 + STAL/src/main/java/at/gv/egiz/stal/STAL.java | 43 + .../src/main/java/at/gv/egiz/stal/STALFactory.java | 22 + .../src/main/java/at/gv/egiz/stal/STALRequest.java | 54 + .../main/java/at/gv/egiz/stal/STALResponse.java | 89 + .../src/main/java/at/gv/egiz/stal/SignRequest.java | 113 + .../main/java/at/gv/egiz/stal/SignResponse.java | 78 + .../signedinfo/CanonicalizationMethodType.java | 125 + .../gv/egiz/stal/signedinfo/DigestMethodType.java | 127 + .../at/gv/egiz/stal/signedinfo/ObjectFactory.java | 178 ++ .../at/gv/egiz/stal/signedinfo/ReferenceType.java | 230 ++ .../egiz/stal/signedinfo/SignatureMethodType.java | 125 + .../at/gv/egiz/stal/signedinfo/SignedInfoType.java | 183 ++ .../at/gv/egiz/stal/signedinfo/TransformsType.java | 88 + .../at/gv/egiz/stal/signedinfo/package-info.java | 25 + .../at/gv/egiz/stal/util/JCEAlgorithmNames.java | 51 + STALService/pom.xml | 22 + STALService/src/main/java/META-INF/MANIFEST.MF | 3 + .../egiz/stal/service/GetHashDataInputFault.java | 69 + .../stal/service/GetHashDataInputFaultType.java | 98 + .../stal/service/GetHashDataInputResponseType.java | 206 ++ .../gv/egiz/stal/service/GetHashDataInputType.java | 172 ++ .../stal/service/GetNextRequestResponseType.java | 114 + .../gv/egiz/stal/service/GetNextRequestType.java | 114 + .../at/gv/egiz/stal/service/ObjectFactory.java | 212 ++ .../java/at/gv/egiz/stal/service/STALPortType.java | 70 + .../java/at/gv/egiz/stal/service/STALService.java | 69 + .../java/at/gv/egiz/stal/service/package-info.java | 18 + addResources/eclipseFormatter.xml | 267 +++ bkucommon/pom.xml | 78 + .../cache/retriever/www.w3.org/2000/09/xmldsig | 7 + bkucommon/src/main/java/META-INF/MANIFEST.MF | 3 + .../egiz/bku/binding/AbstractBindingProcessor.java | 86 + .../at/gv/egiz/bku/binding/BindingProcessor.java | 75 + .../egiz/bku/binding/BindingProcessorManager.java | 102 + .../bku/binding/BindingProcessorManagerImpl.java | 258 ++ .../main/java/at/gv/egiz/bku/binding/DataUrl.java | 62 + .../at/gv/egiz/bku/binding/DataUrlConnection.java | 79 + .../gv/egiz/bku/binding/DataUrlConnectionImpl.java | 216 ++ .../gv/egiz/bku/binding/DataUrlConnectionSPI.java | 42 + .../at/gv/egiz/bku/binding/DataUrlResponse.java | 98 + .../java/at/gv/egiz/bku/binding/ExpiryRemover.java | 67 + .../gv/egiz/bku/binding/FixedFormParameters.java | 28 + .../java/at/gv/egiz/bku/binding/FormParameter.java | 39 + .../at/gv/egiz/bku/binding/FormParameterImpl.java | 93 + .../at/gv/egiz/bku/binding/FormParameterStore.java | 146 ++ .../gv/egiz/bku/binding/HTTPBindingProcessor.java | 820 +++++++ .../main/java/at/gv/egiz/bku/binding/HttpUtil.java | 78 + .../src/main/java/at/gv/egiz/bku/binding/Id.java | 27 + .../java/at/gv/egiz/bku/binding/IdFactory.java | 106 + .../main/java/at/gv/egiz/bku/binding/IdImpl.java | 80 + .../java/at/gv/egiz/bku/binding/InputDecoder.java | 41 + .../gv/egiz/bku/binding/InputDecoderFactory.java | 89 + .../bku/binding/MultiPartFormDataInputDecoder.java | 133 + .../at/gv/egiz/bku/binding/RemovalStrategy.java | 26 + .../gv/egiz/bku/binding/SLCommandInvokerImpl.java | 66 + .../egiz/bku/binding/XWWWFormUrlInputDecoder.java | 101 + .../binding/multipart/InputStreamPartSource.java | 66 + .../egiz/bku/binding/multipart/SLResultPart.java | 57 + .../bku/slcommands/AccessControlInvocation.java | 21 + .../bku/slcommands/CreateXMLSignatureCommand.java | 25 + .../bku/slcommands/CreateXMLSignatureResult.java | 20 + .../at/gv/egiz/bku/slcommands/ErrorResult.java | 20 + .../gv/egiz/bku/slcommands/InfoboxReadCommand.java | 20 + .../gv/egiz/bku/slcommands/InfoboxReadResult.java | 20 + .../gv/egiz/bku/slcommands/InvocationStrategy.java | 20 + .../egiz/bku/slcommands/NullOperationCommand.java | 20 + .../egiz/bku/slcommands/NullOperationResult.java | 20 + .../java/at/gv/egiz/bku/slcommands/SLCommand.java | 31 + .../gv/egiz/bku/slcommands/SLCommandContext.java | 42 + .../gv/egiz/bku/slcommands/SLCommandFactory.java | 370 +++ .../gv/egiz/bku/slcommands/SLCommandInvoker.java | 45 + .../java/at/gv/egiz/bku/slcommands/SLResult.java | 44 + .../at/gv/egiz/bku/slcommands/SLSourceContext.java | 63 + .../at/gv/egiz/bku/slcommands/SLTargetContext.java | 50 + .../impl/CreateXMLSignatureCommandImpl.java | 229 ++ .../impl/CreateXMLSignatureResultImpl.java | 138 ++ .../egiz/bku/slcommands/impl/ErrorResultImpl.java | 60 + .../slcommands/impl/InfoboxReadCommandImpl.java | 409 ++++ .../bku/slcommands/impl/InfoboxReadResultImpl.java | 171 ++ .../slcommands/impl/NullOperationCommandImpl.java | 43 + .../slcommands/impl/NullOperationResultImpl.java | 47 + .../gv/egiz/bku/slcommands/impl/SLCommandImpl.java | 162 ++ .../gv/egiz/bku/slcommands/impl/SLResultImpl.java | 117 + .../impl/xsect/AlgorithmMethodFactory.java | 79 + .../impl/xsect/AlgorithmMethodFactoryImpl.java | 125 + .../impl/xsect/ByteArrayDereferencer.java | 65 + .../egiz/bku/slcommands/impl/xsect/DataObject.java | 1006 ++++++++ .../bku/slcommands/impl/xsect/IdValueFactory.java | 37 + .../slcommands/impl/xsect/IdValueFactoryImpl.java | 127 + .../slcommands/impl/xsect/LocRefDereferencer.java | 113 + .../bku/slcommands/impl/xsect/STALPrivateKey.java | 122 + .../bku/slcommands/impl/xsect/STALProvider.java | 64 + .../bku/slcommands/impl/xsect/STALSignature.java | 165 ++ .../impl/xsect/STALSignatureException.java | 92 + .../egiz/bku/slcommands/impl/xsect/Signature.java | 935 ++++++++ .../slcommands/impl/xsect/SignatureContext.java | 129 + .../slcommands/impl/xsect/SignatureLocation.java | 235 ++ .../impl/xsect/SimpleDOMErrorHandler.java | 98 + .../impl/xsect/URIDereferncerAdapter.java | 103 + .../bku/slcommands/impl/xsect/XSECTReference.java | 112 + .../bku/slcommands/impl/xsect/XSECTTransforms.java | 124 + .../egiz/bku/slexceptions/SLBindingException.java | 31 + .../egiz/bku/slexceptions/SLCanceledException.java | 26 + .../egiz/bku/slexceptions/SLCommandException.java | 30 + .../at/gv/egiz/bku/slexceptions/SLException.java | 88 + .../egiz/bku/slexceptions/SLExceptionMessages.java | 50 + .../egiz/bku/slexceptions/SLRequestException.java | 30 + .../egiz/bku/slexceptions/SLRuntimeException.java | 37 + .../egiz/bku/slexceptions/SLViewerException.java | 25 + .../at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd | 877 +++++++ .../at/gv/egiz/bku/slcommands/schema/xml.xsd | 145 ++ .../bku/slcommands/schema/xmldsig-core-schema.xsd | 308 +++ .../bku/slcommands/schema/xmldsig-transforms.xsd | 41 + .../slexceptions/SLExceptionMessages.properties | 97 + .../slexceptions/SLExceptionMessages_de.properties | 98 + .../bku/binding/BindingProcessorManagerTest.java | 46 + .../gv/egiz/bku/binding/DataUrlConnectionTest.java | 186 ++ .../at/gv/egiz/bku/binding/DummyStalFactory.java | 30 + .../at/gv/egiz/bku/binding/ExpiryRemoverTest.java | 65 + .../egiz/bku/binding/HttpBindingProcessorTest.java | 315 +++ .../java/at/gv/egiz/bku/binding/IdFactoryTest.java | 63 + .../egiz/bku/binding/InputDecoderFactoryTest.java | 96 + .../bku/binding/MultiTestDataUrlConnection.java | 49 + .../egiz/bku/binding/MultipartSLRequestTest.java | 57 + .../at/gv/egiz/bku/binding/NullOperationTest.java | 52 + .../at/gv/egiz/bku/binding/RequestFactory.java | 116 + .../egiz/bku/binding/SSLDataUrlConnectionTest.java | 39 + .../gv/egiz/bku/binding/TestDataUrlConnection.java | 123 + .../egiz/bku/slcommands/SLCommandFactoryTest.java | 78 + .../impl/CreateXMLSignatureComandImplTest.java | 100 + .../bku/slcommands/impl/ErrorResultImplTest.java | 45 + .../slcommands/impl/InfoboxReadComandImplTest.java | 86 + .../impl/NullOperationResultImplTest.java | 42 + .../bku/slcommands/impl/xsect/SignatureTest.java | 747 ++++++ bkucommon/src/test/java/moaspss/MOASPSSTest.java | 119 + .../java/moaspss/generated/AllSignatoriesType.java | 64 + .../java/moaspss/generated/AnyChildrenType.java | 96 + .../java/moaspss/generated/CMSContentBaseType.java | 51 + .../generated/CMSDataObjectOptionalMetaType.java | 106 + .../generated/CanonicalizationMethodType.java | 118 + .../java/moaspss/generated/CheckResultType.java | 114 + .../java/moaspss/generated/ContentBaseType.java | 139 ++ .../moaspss/generated/ContentExLocRefBaseType.java | 56 + .../moaspss/generated/ContentOptionalRefType.java | 84 + .../moaspss/generated/ContentRequiredRefType.java | 54 + .../CreateSignatureEnvironmentProfile.java | 115 + .../generated/CreateSignatureLocationType.java | 109 + .../generated/CreateTransformsInfoProfile.java | 115 + .../generated/CreateXMLSignatureRequest.java | 50 + .../generated/CreateXMLSignatureRequestType.java | 466 ++++ .../generated/CreateXMLSignatureResponseType.java | 160 ++ .../java/moaspss/generated/DSAKeyValueType.java | 236 ++ .../java/moaspss/generated/DataObjectInfoType.java | 211 ++ .../java/moaspss/generated/DigestMethodType.java | 120 + .../java/moaspss/generated/ErrorResponseType.java | 107 + .../moaspss/generated/FinalDataMetaInfoType.java | 82 + .../test/java/moaspss/generated/InputDataType.java | 120 + .../test/java/moaspss/generated/KeyInfoType.java | 151 ++ .../java/moaspss/generated/KeyStorageType.java | 67 + .../test/java/moaspss/generated/KeyValueType.java | 101 + .../src/test/java/moaspss/generated/MOAFault.java | 70 + .../generated/ManifestRefsCheckResultInfoType.java | 53 + .../generated/ManifestRefsCheckResultType.java | 52 + .../test/java/moaspss/generated/ManifestType.java | 120 + .../test/java/moaspss/generated/MetaInfoType.java | 151 ++ .../test/java/moaspss/generated/ObjectFactory.java | 1032 ++++++++ .../test/java/moaspss/generated/ObjectType.java | 180 ++ .../test/java/moaspss/generated/PGPDataType.java | 114 + .../moaspss/generated/PublicAuthorityType.java | 78 + .../java/moaspss/generated/RSAKeyValueType.java | 102 + .../test/java/moaspss/generated/ReferenceType.java | 223 ++ .../generated/ReferencesCheckResultInfoType.java | 52 + .../generated/ReferencesCheckResultType.java | 52 + .../moaspss/generated/RetrievalMethodType.java | 136 ++ .../test/java/moaspss/generated/SPKIDataType.java | 92 + .../moaspss/generated/SignatureMethodType.java | 124 + .../moaspss/generated/SignaturePropertiesType.java | 120 + .../moaspss/generated/SignaturePropertyType.java | 153 ++ .../test/java/moaspss/generated/SignatureType.java | 204 ++ .../java/moaspss/generated/SignatureValueType.java | 108 + .../generated/SignatureVerificationPortType.java | 57 + .../generated/SignatureVerificationService.java | 87 + .../java/moaspss/generated/SignedInfoType.java | 176 ++ .../moaspss/generated/TransformParameterType.java | 226 ++ .../test/java/moaspss/generated/TransformType.java | 125 + .../java/moaspss/generated/TransformsInfoType.java | 106 + .../java/moaspss/generated/TransformsType.java | 85 + .../generated/VerifyCMSSignatureRequest.java | 85 + .../generated/VerifyCMSSignatureRequestType.java | 171 ++ .../generated/VerifyCMSSignatureResponseType.java | 95 + .../generated/VerifyTransformsDataType.java | 91 + .../generated/VerifyTransformsInfoProfile.java | 115 + .../generated/VerifyXMLSignatureRequestType.java | 439 ++++ .../generated/VerifyXMLSignatureResponseType.java | 263 ++ .../test/java/moaspss/generated/X509DataType.java | 109 + .../moaspss/generated/X509IssuerSerialType.java | 107 + .../java/moaspss/generated/XMLContentType.java | 79 + .../generated/XMLDataObjectAssociationType.java | 106 + .../test/java/moaspss/generated/package-info.java | 18 + bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl | 61 + .../at/gv/egiz/bku/binding/Multipart.txt.bin | 337 +++ .../gv/egiz/bku/binding/MultipartFromTutorial.txt | 37 + .../at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt | 47 + .../at/gv/egiz/bku/binding/Nulloperation.xml | 1 + .../egiz/bku/binding/NulloperationRequest.txt.bin | 1 + .../at/gv/egiz/bku/binding/Statemachine1.txt | 36 + .../at/gv/egiz/bku/binding/Stylesheet.txt | 56 + .../at/gv/egiz/bku/binding/stylesheet.xslt | 16 + .../CreateXMLSignatureRequest.xml | 23 + .../at/gv/egiz/bku/slcommands/impl/Cert.p12 | Bin 0 -> 4158 bytes .../at/gv/egiz/bku/slcommands/impl/DataObject1.bin | 6 + .../at/gv/egiz/bku/slcommands/impl/DataObject1.txt | 1 + .../at/gv/egiz/bku/slcommands/impl/DataObject1.xml | 6 + .../impl/DataObjectInfo_Base64Content_1.xml | 13 + .../slcommands/impl/DataObjectInfo_Detached_1.xml | 11 + .../impl/DataObjectInfo_Detached_Base64Content.xml | 13 + .../impl/DataObjectInfo_LocRefContent_1.xml | 11 + .../impl/DataObjectInfo_LocRefContent_2.xml | 13 + .../slcommands/impl/DataObjectInfo_Reference_1.xml | 13 + .../impl/DataObjectInfo_XMLContent_1.xml | 14 + .../impl/DataObjectInfo_XMLContent_2.xml | 17 + .../at/gv/egiz/bku/slcommands/impl/Document.dtd | 3 + .../bku/slcommands/impl/SignatureEnvironment1.xml | 6 + .../bku/slcommands/impl/SignatureInfo_Base64_1.xml | 23 + .../bku/slcommands/impl/SignatureInfo_Base64_2.xml | 18 + .../bku/slcommands/impl/SignatureInfo_Base64_3.xml | 20 + .../slcommands/impl/SignatureInfo_Reference_1.xml | 11 + .../slcommands/impl/SignatureInfo_XMLContent_1.xml | 13 + .../egiz/bku/slcommands/impl/TransformsInfo_1.xml | 304 +++ .../at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd | 15 + .../IdentityLink.Binary.Invalid-1.xml | 1 + .../IdentityLink.Binary.Invalid-2.xml | 1 + .../infoboxreadcommand/IdentityLink.Binary.xml | 1 + .../src/test/resources/commons-logging.properties | 1 + bkucommon/src/test/resources/log4j.properties | 19 + pom.xml | 188 ++ smcc/keystore.ks | Bin 0 -> 5635 bytes smcc/pom.xml | 73 + smcc/src/main/java/META-INF/MANIFEST.MF | 3 + smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java | 310 +++ .../at/gv/egiz/smcc/AbstractSignatureCard.java | 259 ++ .../java/at/gv/egiz/smcc/CancelledException.java | 39 + .../at/gv/egiz/smcc/CardNotSupportedException.java | 74 + .../src/main/java/at/gv/egiz/smcc/PINProvider.java | 35 + smcc/src/main/java/at/gv/egiz/smcc/PINSpec.java | 85 + .../src/main/java/at/gv/egiz/smcc/STARCOSCard.java | 341 +++ smcc/src/main/java/at/gv/egiz/smcc/SWCard.java | 322 +++ .../main/java/at/gv/egiz/smcc/SignatureCard.java | 103 + .../at/gv/egiz/smcc/SignatureCardException.java | 76 + .../java/at/gv/egiz/smcc/SignatureCardFactory.java | 97 + .../main/java/at/gv/egiz/smcc/util/SMCCHelper.java | 150 ++ .../java/at/gv/egiz/smcc/util/SmartCardIO.java | 196 ++ .../gv/egiz/smcc/utils/SingletonPINProvider.java | 38 + .../resources/at/gv/egiz/smcc/ACOSCard.properties | 21 + .../at/gv/egiz/smcc/ACOSCard_de.properties | 21 + .../at/gv/egiz/smcc/ACOSCard_en.properties | 21 + .../at/gv/egiz/smcc/STARCOSCard.properties | 20 + .../at/gv/egiz/smcc/STARCOSCard_de.properties | 20 + .../at/gv/egiz/smcc/STARCOSCard_en.properties | 20 + .../test/java/at/gv/egiz/smcc/SMCCApplication.java | 46 + smcc/src/test/java/at/gv/egiz/smcc/SWCardTest.java | 63 + smcc/src/test/resources/IdentityLink.bin | Bin 0 -> 395 bytes smcc/src/test/resources/log4j.properties | 19 + smccSTAL/pom.xml | 40 + smccSTAL/src/main/java/META-INF/MANIFEST.MF | 3 + .../egiz/bku/smccstal/AbstractRequestHandler.java | 86 + .../at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java | 116 + .../at/gv/egiz/bku/smccstal/DomainIdConverter.java | 85 + .../bku/smccstal/InfoBoxReadRequestHandler.java | 140 ++ .../egiz/bku/smccstal/SMCCSTALRequestHandler.java | 36 + .../gv/egiz/bku/smccstal/STALMessageConsumer.java | 21 + .../gv/egiz/bku/smccstal/SignRequestHandler.java | 151 ++ .../src/test/java/at/gv/egiz/smcc/ASN1Test.java | 105 + src/main/assemblies/assembly-test.xml | 36 + src/main/resources/META-INF/MANIFEST.MF | 3 + src/main/resources/commons-logging.properties | 16 + src/main/resources/log4j.properties | 34 + utils/pom.xml | 108 + utils/src/main/java/META-INF/MANIFEST.MF | 3 + .../_20020506_/CompressedIdentityLinkType.java | 310 +++ .../personenbindung/_20020506_/ObjectFactory.java | 76 + .../personenbindung/_20020506_/package-info.java | 25 + .../securitylayer/_1/AccessAuthorizationType.java | 112 + .../securitylayer/_1/AllSignatoriesType.java | 71 + .../securitylayer/_1/AnyChildrenType.java | 98 + .../securitylayer/_1/AnyMixedChildrenType.java | 102 + .../securitylayer/_1/AuthenticationClassType.java | 80 + .../securitylayer/_1/Base64ContentType.java | 87 + .../securitylayer/_1/Base64OptRefContentType.java | 85 + .../securitylayer/_1/Base64XMLContentType.java | 116 + .../_1/Base64XMLLocRefContentType.java | 147 ++ .../_1/Base64XMLLocRefOptRefContentType.java | 85 + .../_1/Base64XMLLocRefReqRefContentType.java | 85 + .../_1/Base64XMLOptRefContentType.java | 85 + .../namespaces/securitylayer/_1/BindingType.java | 88 + .../_1/CMSDataObjectOptionalMetaType.java | 117 + .../_1/CMSDataObjectRequiredMetaType.java | 59 + .../securitylayer/_1/CMSEncryptedContentType.java | 113 + .../_1/CMSRecipientPublicKeyType.java | 83 + .../securitylayer/_1/CMSToBeEncryptedType.java | 113 + .../securitylayer/_1/CheckResultType.java | 116 + .../_1/CreateCMSSignatureRequestType.java | 151 ++ .../_1/CreateCMSSignatureResponseType.java | 83 + .../_1/CreateHashInfoRequestType.java | 163 ++ .../_1/CreateHashInfoResponseType.java | 169 ++ .../securitylayer/_1/CreateHashRequestType.java | 92 + .../securitylayer/_1/CreateHashResponseType.java | 92 + .../_1/CreateXMLSignatureRequestType.java | 151 ++ .../_1/CreateXMLSignatureResponseType.java | 88 + .../_1/DataObjectAssociationType.java | 113 + .../securitylayer/_1/DataObjectInfoType.java | 188 ++ .../securitylayer/_1/DecryptCMSRequestType.java | 143 ++ .../securitylayer/_1/DecryptCMSResponseType.java | 83 + .../securitylayer/_1/DecryptXMLRequestType.java | 180 ++ .../securitylayer/_1/DecryptXMLResponseType.java | 265 ++ .../securitylayer/_1/EncryptCMSRequestType.java | 152 ++ .../securitylayer/_1/EncryptCMSResponseType.java | 83 + .../securitylayer/_1/EncryptXMLRequest.java | 57 + .../securitylayer/_1/EncryptXMLRequestType.java | 157 ++ .../securitylayer/_1/EncryptXMLResponseType.java | 189 ++ .../securitylayer/_1/EncryptedDataType.java | 110 + .../securitylayer/_1/EncryptionInfoType.java | 243 ++ .../securitylayer/_1/ErrorResponseType.java | 105 + .../securitylayer/_1/GetPropertiesRequest.java | 57 + .../securitylayer/_1/GetPropertiesRequestType.java | 57 + .../_1/GetPropertiesResponseType.java | 265 ++ .../securitylayer/_1/GetStatusRequestType.java | 116 + .../securitylayer/_1/GetStatusResponseType.java | 85 + .../namespaces/securitylayer/_1/HashDataType.java | 113 + .../_1/InfoboxAssocArrayPairType.java | 83 + .../_1/InfoboxAvailableRequestType.java | 53 + .../_1/InfoboxAvailableResponseType.java | 95 + .../securitylayer/_1/InfoboxCreateRequestType.java | 284 +++ .../_1/InfoboxCreateResponseType.java | 53 + .../securitylayer/_1/InfoboxDeleteRequestType.java | 88 + .../_1/InfoboxDeleteResponseType.java | 53 + .../_1/InfoboxReadDataAssocArrayType.java | 132 + .../_1/InfoboxReadParamsAssocArrayType.java | 450 ++++ .../_1/InfoboxReadParamsBinaryFileType.java | 85 + .../securitylayer/_1/InfoboxReadRequestType.java | 174 ++ .../securitylayer/_1/InfoboxReadResponseType.java | 113 + .../securitylayer/_1/InfoboxTypeType.java | 74 + .../_1/InfoboxUpdateParamsAssocArrayType.java | 297 +++ .../securitylayer/_1/InfoboxUpdateRequestType.java | 174 ++ .../_1/InfoboxUpdateResponseType.java | 53 + .../_1/ManifestRefsCheckResultInfoType.java | 109 + .../_1/ManifestRefsCheckResultType.java | 116 + .../namespaces/securitylayer/_1/MetaInfoType.java | 152 ++ .../securitylayer/_1/NullOperationRequestType.java | 53 + .../_1/NullOperationResponseType.java | 53 + .../namespaces/securitylayer/_1/ObjectFactory.java | 1265 ++++++++++ .../_1/QualifiedBoxIdentifierType.java | 124 + .../_1/ReferencesCheckResultInfoType.java | 103 + .../_1/ReferencesCheckResultType.java | 116 + .../securitylayer/_1/RequesterIDType.java | 110 + .../securitylayer/_1/ReturnResultType.java | 77 + .../_1/SignatureInfoCreationType.java | 148 ++ .../_1/SignatureInfoVerificationType.java | 118 + .../securitylayer/_1/SignatureLocationType.java | 117 + .../securitylayer/_1/ToBeEncryptedType.java | 325 +++ .../securitylayer/_1/TokenStatusType.java | 74 + .../securitylayer/_1/TransformsInfoType.java | 114 + .../_1/UserConfirmationSimpleType.java | 80 + .../securitylayer/_1/UserConfirmationType.java | 102 + .../securitylayer/_1/VerificationResultType.java | 105 + .../_1/VerifyCMSSignatureRequestType.java | 177 ++ .../_1/VerifyCMSSignatureResponseType.java | 103 + .../_1/VerifyHashInfoRequestType.java | 169 ++ .../securitylayer/_1/VerifyHashRequestType.java | 92 + .../securitylayer/_1/VerifyHashResponseType.java | 92 + .../_1/VerifyXMLSignatureRequestType.java | 151 ++ .../_1/VerifyXMLSignatureResponseType.java | 205 ++ .../securitylayer/_1/XMLContentType.java | 86 + .../_1/XMLRecipientPublicKeyType.java | 112 + .../_1/XMLToBeEncryptedNewContentType.java | 85 + .../securitylayer/_1/XMLToBeEncryptedNewType.java | 175 ++ .../namespaces/securitylayer/_1/package-info.java | 25 + .../persondata/_20020228_/AbstractAddressType.java | 159 ++ .../persondata/_20020228_/AbstractPersonType.java | 159 ++ .../persondata/_20020228_/CorporateBodyType.java | 260 ++ .../_20020228_/DefinedAlternativeNameTypeType.java | 83 + .../persondata/_20020228_/DefinedRelationType.java | 95 + .../persondata/_20020228_/IdentificationType.java | 333 +++ .../persondata/_20020228_/InternetAddressType.java | 158 ++ .../persondata/_20020228_/MaritalStatusType.java | 80 + .../_20020228_/MobileTelcomNumberType.java | 83 + .../persondata/_20020228_/ObjectFactory.java | 436 ++++ .../persondata/_20020228_/PersonDataType.java | 262 ++ .../persondata/_20020228_/PersonNameType.java | 636 +++++ .../persondata/_20020228_/PhysicalPersonType.java | 565 +++++ .../persondata/_20020228_/PostalAddressType.java | 627 +++++ .../namespace/persondata/_20020228_/SexType.java | 77 + .../_20020228_/TelcomNumberListType.java | 197 ++ .../persondata/_20020228_/TelcomNumberType.java | 225 ++ .../_20020228_/TelephoneAddressType.java | 162 ++ .../_20020228_/TypedPostalAddressType.java | 157 ++ .../persondata/_20020228_/package-info.java | 25 + .../egiz/bku/local/ui/BKUControllerInterface.java | 23 + .../at/gv/egiz/bku/local/ui/TrayIconDialog.java | 202 ++ .../egiz/bku/local/ui/TrayIconDialogInterface.java | 33 + .../main/java/at/gv/egiz/bku/utils/HexDump.java | 75 + .../main/java/at/gv/egiz/bku/utils/StreamUtil.java | 101 + .../at/gv/egiz/bku/utils/binding/Protocol.java | 41 + .../utils/urldereferencer/FormDataURLSupplier.java | 26 + .../HTTPURLProtocolHandlerImpl.java | 76 + .../urldereferencer/SimpleFormDataContextImpl.java | 41 + .../egiz/bku/utils/urldereferencer/StreamData.java | 61 + .../utils/urldereferencer/URIResolverAdapter.java | 96 + .../bku/utils/urldereferencer/URLDereferencer.java | 90 + .../urldereferencer/URLDereferencerContext.java | 27 + .../utils/urldereferencer/URLProtocolHandler.java | 32 + utils/src/main/java/at/gv/egiz/dom/DOMUtils.java | 115 + .../egiz/idlink/CompressedIdentityLinkFactory.java | 416 ++++ .../at/gv/egiz/idlink/IdentityLinkTransformer.java | 285 +++ .../at/gv/egiz/idlink/ans1/CitizenPublicKey.java | 92 + .../java/at/gv/egiz/idlink/ans1/IdentityLink.java | 315 +++ .../java/at/gv/egiz/idlink/ans1/PersonData.java | 91 + .../at/gv/egiz/idlink/ans1/PhysicalPersonData.java | 143 ++ .../apache/tomcat/util/http/AcceptLanguage.java | 151 ++ .../egiz/slbinding/NamespaceContextCallback.java | 41 + .../at/gv/egiz/slbinding/RedirectCallback.java | 42 + .../at/gv/egiz/slbinding/RedirectEventFilter.java | 259 ++ .../slbinding/RedirectUnmarshallerListener.java | 68 + .../egiz/slbinding/impl/SignatureLocationType.java | 50 + .../gv/egiz/slbinding/impl/TransformsInfoType.java | 70 + .../at/gv/egiz/slbinding/impl/XMLContentType.java | 60 + .../egiz/xades/QualifyingPropertiesException.java | 40 + .../gv/egiz/xades/QualifyingPropertiesFactory.java | 225 ++ .../egiz/xmldsig/KeyTypeNotSupportedException.java | 65 + .../java/at/gv/egiz/xmldsig/KeyValueFactory.java | 279 +++ .../java/org/etsi/uri/_01903/v1_1/AnyType.java | 119 + .../etsi/uri/_01903/v1_1/CRLIdentifierType.java | 174 ++ .../java/org/etsi/uri/_01903/v1_1/CRLRefType.java | 113 + .../java/org/etsi/uri/_01903/v1_1/CRLRefsType.java | 92 + .../org/etsi/uri/_01903/v1_1/CRLValuesType.java | 92 + .../org/etsi/uri/_01903/v1_1/CertIDListType.java | 92 + .../java/org/etsi/uri/_01903/v1_1/CertIDType.java | 114 + .../uri/_01903/v1_1/CertificateValuesType.java | 133 + .../uri/_01903/v1_1/CertifiedRolesListType.java | 92 + .../etsi/uri/_01903/v1_1/ClaimedRolesListType.java | 92 + .../_01903/v1_1/CommitmentTypeIndicationType.java | 180 ++ .../v1_1/CommitmentTypeQualifiersListType.java | 92 + .../_01903/v1_1/CompleteCertificateRefsType.java | 120 + .../_01903/v1_1/CompleteRevocationRefsType.java | 176 ++ .../etsi/uri/_01903/v1_1/CounterSignatureType.java | 86 + .../etsi/uri/_01903/v1_1/DataObjectFormatType.java | 200 ++ .../uri/_01903/v1_1/DigestAlgAndValueType.java | 112 + .../_01903/v1_1/DocumentationReferencesType.java | 94 + .../uri/_01903/v1_1/EncapsulatedPKIDataType.java | 115 + .../org/etsi/uri/_01903/v1_1/HashDataInfoType.java | 116 + .../org/etsi/uri/_01903/v1_1/IdentifierType.java | 112 + .../org/etsi/uri/_01903/v1_1/IntegerListType.java | 93 + .../etsi/uri/_01903/v1_1/NoticeReferenceType.java | 113 + .../etsi/uri/_01903/v1_1/OCSPIdentifierType.java | 145 ++ .../java/org/etsi/uri/_01903/v1_1/OCSPRefType.java | 113 + .../org/etsi/uri/_01903/v1_1/OCSPRefsType.java | 92 + .../org/etsi/uri/_01903/v1_1/OCSPValuesType.java | 92 + .../org/etsi/uri/_01903/v1_1/ObjectFactory.java | 755 ++++++ .../etsi/uri/_01903/v1_1/ObjectIdentifierType.java | 141 ++ .../uri/_01903/v1_1/OtherCertStatusRefsType.java | 92 + .../uri/_01903/v1_1/OtherCertStatusValuesType.java | 92 + .../org/etsi/uri/_01903/v1_1/QualifierType.java | 74 + .../v1_1/QualifyingPropertiesReferenceType.java | 149 ++ .../uri/_01903/v1_1/QualifyingPropertiesType.java | 176 ++ .../etsi/uri/_01903/v1_1/RevocationValuesType.java | 176 ++ .../org/etsi/uri/_01903/v1_1/SPUserNoticeType.java | 113 + .../_01903/v1_1/SigPolicyQualifiersListType.java | 92 + .../uri/_01903/v1_1/SignaturePolicyIdType.java | 170 ++ .../_01903/v1_1/SignaturePolicyIdentifierType.java | 144 ++ .../_01903/v1_1/SignatureProductionPlaceType.java | 169 ++ .../v1_1/SignedDataObjectPropertiesType.java | 191 ++ .../etsi/uri/_01903/v1_1/SignedPropertiesType.java | 148 ++ .../_01903/v1_1/SignedSignaturePropertiesType.java | 200 ++ .../org/etsi/uri/_01903/v1_1/SignerRoleType.java | 113 + .../org/etsi/uri/_01903/v1_1/TimeStampType.java | 150 ++ .../v1_1/UnsignedDataObjectPropertiesType.java | 92 + .../uri/_01903/v1_1/UnsignedPropertiesType.java | 148 ++ .../v1_1/UnsignedSignaturePropertiesType.java | 338 +++ .../org/etsi/uri/_01903/v1_1/package-info.java | 25 + .../_09/xmldsig_/CanonicalizationMethodType.java | 125 + .../org/w3/_2000/_09/xmldsig_/DSAKeyValueType.java | 243 ++ .../w3/_2000/_09/xmldsig_/DigestMethodType.java | 127 + .../org/w3/_2000/_09/xmldsig_/KeyInfoType.java | 158 ++ .../org/w3/_2000/_09/xmldsig_/KeyValueType.java | 108 + .../org/w3/_2000/_09/xmldsig_/ManifestType.java | 127 + .../org/w3/_2000/_09/xmldsig_/ObjectFactory.java | 575 +++++ .../java/org/w3/_2000/_09/xmldsig_/ObjectType.java | 187 ++ .../org/w3/_2000/_09/xmldsig_/PGPDataType.java | 121 + .../org/w3/_2000/_09/xmldsig_/RSAKeyValueType.java | 109 + .../org/w3/_2000/_09/xmldsig_/ReferenceType.java | 230 ++ .../w3/_2000/_09/xmldsig_/RetrievalMethodType.java | 143 ++ .../org/w3/_2000/_09/xmldsig_/SPKIDataType.java | 99 + .../w3/_2000/_09/xmldsig_/SignatureMethodType.java | 131 + .../_09/xmldsig_/SignaturePropertiesType.java | 127 + .../_2000/_09/xmldsig_/SignaturePropertyType.java | 160 ++ .../org/w3/_2000/_09/xmldsig_/SignatureType.java | 211 ++ .../w3/_2000/_09/xmldsig_/SignatureValueType.java | 115 + .../org/w3/_2000/_09/xmldsig_/SignedInfoType.java | 183 ++ .../org/w3/_2000/_09/xmldsig_/TransformType.java | 132 + .../org/w3/_2000/_09/xmldsig_/TransformsType.java | 92 + .../org/w3/_2000/_09/xmldsig_/X509DataType.java | 116 + .../_2000/_09/xmldsig_/X509IssuerSerialType.java | 114 + .../org/w3/_2000/_09/xmldsig_/package-info.java | 25 + .../_04/xmldsig_more_/BasePointParamsType.java | 145 ++ .../_04/xmldsig_more_/CharTwoFieldElemType.java | 88 + .../_04/xmldsig_more_/CharTwoFieldParamsType.java | 95 + .../_2001/_04/xmldsig_more_/CurveParamsType.java | 146 ++ .../_2001/_04/xmldsig_more_/DomainParamsType.java | 175 ++ .../_2001/_04/xmldsig_more_/ECDSAKeyValueType.java | 113 + .../w3/_2001/_04/xmldsig_more_/ECPointType.java | 113 + .../_04/xmldsig_more_/ExplicitParamsType.java | 141 ++ .../w3/_2001/_04/xmldsig_more_/FieldElemType.java | 59 + .../_2001/_04/xmldsig_more_/FieldParamsType.java | 59 + .../w3/_2001/_04/xmldsig_more_/ObjectFactory.java | 180 ++ .../OddCharExtensionFieldElemType.java | 86 + .../OddCharExtensionFieldParamsType.java | 119 + .../_04/xmldsig_more_/PnBFieldParamsType.java | 148 ++ .../_04/xmldsig_more_/PrimeFieldElemType.java | 86 + .../_04/xmldsig_more_/PrimeFieldParamsType.java | 90 + .../_04/xmldsig_more_/TnBFieldParamsType.java | 90 + .../w3/_2001/_04/xmldsig_more_/package-info.java | 25 + .../java/at/gv/egiz/bku/utils/HexDumpTest.java | 49 + .../at/gv/egiz/idlink/CompressIdentityLink.java | 57 + .../java/at/gv/egiz/slbinding/RedirectTest.java | 194 ++ .../at/gv/egiz/urldereferencer/FormDataTest.java | 88 + .../test/requests/CreateCMSSignatureRequest01.xml | 14 + .../test/requests/CreateXMLSignatureRequest01.xml | 27 + .../requests/CreateXMLSignatureRequest01_bound.xml | 3 + .../CreateXMLSignatureRequest01_redirect.xml | 5 + .../test/requests/CreateXMLSignatureRequest02.xml | 304 +++ .../CreateXMLSignatureRequest02.xml_bound.xml | 1 + .../CreateXMLSignatureRequest02.xml_redirect.txt | 164 ++ .../test/requests/CreateXMLSignatureRequest03.xml | 10 + .../CreateXMLSignatureRequest03.xml_bound.xml | 1 + .../CreateXMLSignatureRequest03.xml_redirect.txt | 3 + .../src/test/resources/commons-logging.properties | 1 + utils/src/test/resources/log4j.properties | 19 + 628 files changed, 79271 insertions(+) create mode 100644 BKUApplet/keystore.ks create mode 100644 BKUApplet/pom.xml create mode 100644 BKUApplet/src/main/java/META-INF/MANIFEST.MF create mode 100644 BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java create mode 100644 BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java create mode 100644 BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactory.java create mode 100644 BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactoryException.java create mode 100644 BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages.properties create mode 100644 BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages_de.properties create mode 100644 BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png create mode 100644 BKUApplet/src/test/java/at/gv/egiz/stal/client/STALServiceTest.java create mode 100644 BKUCommonGUI/pom.xml create mode 100644 BKUCommonGUI/src/main/java/META-INF/MANIFEST.MF create mode 100644 BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java create mode 100644 BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java create mode 100644 BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFactory.java create mode 100644 BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataInput.java create mode 100644 BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties create mode 100644 BKUCommonGUI/src/main/resources/images/logo.png create mode 100644 BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java create mode 100644 BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java create mode 100644 BKULocal/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch create mode 100644 BKULocal/pom.xml create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/conf/ConfigurationUpdater.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/conf/Configurator.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/PINDialog.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/QuitRequestHandler.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingInsertCardDialog.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPINProvider.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPinDialog.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java create mode 100644 BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/SpringBKUServlet.java create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/local/Userdialog.properties create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/local/baseconfig.xml create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/local/logo.png create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/local/truststore.jks create mode 100644 BKULocal/src/main/resources/log4j.properties create mode 100644 BKULocal/src/main/webapp/META-INF/MANIFEST.MF create mode 100644 BKULocal/src/main/webapp/WEB-INF/applicationContext.xml create mode 100644 BKULocal/src/main/webapp/WEB-INF/web.xml create mode 100644 BKULocal/src/test/java/ConfigTest.java create mode 100644 BKULocal/src/test/java/JustASandbox.java create mode 100644 BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java create mode 100644 BKULocal/src/test/resources/at/gv/egiz/bku/local/stal/sigInfo.xml create mode 100644 BKUOnline/catalog.xml create mode 100644 BKUOnline/nb-configuration.xml create mode 100644 BKUOnline/pom.xml create mode 100644 BKUOnline/private/cache/retriever/catalog.xml create mode 100644 BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd create mode 100644 BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd create mode 100644 BKUOnline/src/main/custom-binding/stalservice-custom.xml create mode 100644 BKUOnline/src/main/custom-binding/staltypes-custom.xml create mode 100644 BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java create mode 100644 BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java create mode 100644 BKUOnline/src/main/resources/commons-logging.properties create mode 100644 BKUOnline/src/main/resources/log4j.properties create mode 100644 BKUOnline/src/main/webapp/HTTP-ohne.html create mode 100644 BKUOnline/src/main/webapp/META-INF/MANIFEST.MF create mode 100644 BKUOnline/src/main/webapp/META-INF/context.xml create mode 100644 BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml create mode 100644 BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml create mode 100644 BKUOnline/src/main/webapp/WEB-INF/web.xml create mode 100644 BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl create mode 100644 BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd create mode 100644 BKUOnline/src/main/webapp/appletPage.jsp create mode 100644 BKUOnline/src/main/webapp/expired.html create mode 100644 BKUOnline/src/main/webapp/index.html create mode 100644 BKUOnline/src/main/webapp/js/deployJava.js create mode 100644 BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java create mode 100644 LICENSE.txt create mode 100644 NOTICE.txt create mode 100644 STAL/catalog.xml create mode 100644 STAL/pom.xml create mode 100644 STAL/private/cache/retriever/catalog.xml create mode 100644 STAL/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd create mode 100644 STAL/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd create mode 100644 STAL/src/main/java/META-INF/MANIFEST.MF create mode 100644 STAL/src/main/java/at/gv/egiz/stal/ErrorResponse.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/HashDataInputCallback.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/InfoboxReadRequest.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/InfoboxReadResponse.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/QuitRequest.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/STAL.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/STALFactory.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/STALRequest.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/STALResponse.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/SignRequest.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/SignResponse.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/CanonicalizationMethodType.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/DigestMethodType.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/ObjectFactory.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/ReferenceType.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignatureMethodType.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignedInfoType.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/TransformsType.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/signedinfo/package-info.java create mode 100644 STAL/src/main/java/at/gv/egiz/stal/util/JCEAlgorithmNames.java create mode 100644 STALService/pom.xml create mode 100644 STALService/src/main/java/META-INF/MANIFEST.MF create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFault.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFaultType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestResponseType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/ObjectFactory.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/STALPortType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/STALService.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/package-info.java create mode 100644 addResources/eclipseFormatter.xml create mode 100644 bkucommon/pom.xml create mode 100644 bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig create mode 100644 bkucommon/src/main/java/META-INF/MANIFEST.MF create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java create mode 100644 bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java create mode 100644 bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd create mode 100644 bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd create mode 100644 bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd create mode 100644 bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd create mode 100644 bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties create mode 100644 bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java create mode 100644 bkucommon/src/test/java/moaspss/MOASPSSTest.java create mode 100644 bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CheckResultType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ContentBaseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/DigestMethodType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/InputDataType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/KeyInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/KeyStorageType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/KeyValueType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/MOAFault.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ManifestType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/MetaInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ObjectFactory.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ObjectType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/PGPDataType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ReferenceType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SPKIDataType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignatureType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignatureValueType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java create mode 100644 bkucommon/src/test/java/moaspss/generated/SignedInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/TransformParameterType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/TransformType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/TransformsType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/X509DataType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/XMLContentType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java create mode 100644 bkucommon/src/test/java/moaspss/generated/package-info.java create mode 100644 bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml create mode 100644 bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml create mode 100644 bkucommon/src/test/resources/commons-logging.properties create mode 100644 bkucommon/src/test/resources/log4j.properties create mode 100644 pom.xml create mode 100644 smcc/keystore.ks create mode 100644 smcc/pom.xml create mode 100644 smcc/src/main/java/META-INF/MANIFEST.MF create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/CancelledException.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/CardNotSupportedException.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/PINProvider.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/PINSpec.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/SWCard.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/SignatureCardException.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/SignatureCardFactory.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/util/SmartCardIO.java create mode 100644 smcc/src/main/java/at/gv/egiz/smcc/utils/SingletonPINProvider.java create mode 100644 smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard.properties create mode 100644 smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_de.properties create mode 100644 smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_en.properties create mode 100644 smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard.properties create mode 100644 smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_de.properties create mode 100644 smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_en.properties create mode 100644 smcc/src/test/java/at/gv/egiz/smcc/SMCCApplication.java create mode 100644 smcc/src/test/java/at/gv/egiz/smcc/SWCardTest.java create mode 100644 smcc/src/test/resources/IdentityLink.bin create mode 100644 smcc/src/test/resources/log4j.properties create mode 100644 smccSTAL/pom.xml create mode 100644 smccSTAL/src/main/java/META-INF/MANIFEST.MF create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/DomainIdConverter.java create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SMCCSTALRequestHandler.java create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java create mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java create mode 100644 smccSTAL/src/test/java/at/gv/egiz/smcc/ASN1Test.java create mode 100644 src/main/assemblies/assembly-test.xml create mode 100644 src/main/resources/META-INF/MANIFEST.MF create mode 100644 src/main/resources/commons-logging.properties create mode 100644 src/main/resources/log4j.properties create mode 100644 utils/pom.xml create mode 100644 utils/src/main/java/META-INF/MANIFEST.MF create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/CompressedIdentityLinkType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/ObjectFactory.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/package-info.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AccessAuthorizationType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AllSignatoriesType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyChildrenType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyMixedChildrenType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AuthenticationClassType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64ContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64OptRefContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefOptRefContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefReqRefContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLOptRefContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/BindingType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectOptionalMetaType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectRequiredMetaType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSEncryptedContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSRecipientPublicKeyType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSToBeEncryptedType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CheckResultType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectAssociationType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectInfoType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequest.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptedDataType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptionInfoType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ErrorResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequest.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/HashDataType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAssocArrayPairType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadDataAssocArrayType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsAssocArrayType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsBinaryFileType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxTypeType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateParamsAssocArrayType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultInfoType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/MetaInfoType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ObjectFactory.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/QualifiedBoxIdentifierType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultInfoType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/RequesterIDType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReturnResultType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoCreationType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoVerificationType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureLocationType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ToBeEncryptedType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TokenStatusType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TransformsInfoType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationSimpleType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerificationResultType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashInfoRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureRequestType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureResponseType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLRecipientPublicKeyType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewContentType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewType.java create mode 100644 utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/package-info.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractAddressType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractPersonType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/CorporateBodyType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedAlternativeNameTypeType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedRelationType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/IdentificationType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/InternetAddressType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MaritalStatusType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MobileTelcomNumberType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/ObjectFactory.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonDataType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonNameType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PhysicalPersonType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PostalAddressType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/SexType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberListType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelephoneAddressType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TypedPostalAddressType.java create mode 100644 utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/package-info.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/HexDump.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/StreamUtil.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/binding/Protocol.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/FormDataURLSupplier.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/HTTPURLProtocolHandlerImpl.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/SimpleFormDataContextImpl.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/StreamData.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URIResolverAdapter.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencer.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencerContext.java create mode 100644 utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLProtocolHandler.java create mode 100644 utils/src/main/java/at/gv/egiz/dom/DOMUtils.java create mode 100644 utils/src/main/java/at/gv/egiz/idlink/CompressedIdentityLinkFactory.java create mode 100644 utils/src/main/java/at/gv/egiz/idlink/IdentityLinkTransformer.java create mode 100644 utils/src/main/java/at/gv/egiz/idlink/ans1/CitizenPublicKey.java create mode 100644 utils/src/main/java/at/gv/egiz/idlink/ans1/IdentityLink.java create mode 100644 utils/src/main/java/at/gv/egiz/idlink/ans1/PersonData.java create mode 100644 utils/src/main/java/at/gv/egiz/idlink/ans1/PhysicalPersonData.java create mode 100644 utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/NamespaceContextCallback.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/RedirectCallback.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/RedirectUnmarshallerListener.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/impl/SignatureLocationType.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java create mode 100644 utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java create mode 100644 utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesException.java create mode 100644 utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesFactory.java create mode 100644 utils/src/main/java/at/gv/egiz/xmldsig/KeyTypeNotSupportedException.java create mode 100644 utils/src/main/java/at/gv/egiz/xmldsig/KeyValueFactory.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/AnyType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLIdentifierType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefsType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLValuesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDListType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CertificateValuesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CertifiedRolesListType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/ClaimedRolesListType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeIndicationType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeQualifiersListType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteCertificateRefsType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteRevocationRefsType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/CounterSignatureType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/DataObjectFormatType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/DigestAlgAndValueType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/DocumentationReferencesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/EncapsulatedPKIDataType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/HashDataInfoType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/IdentifierType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/IntegerListType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/NoticeReferenceType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPIdentifierType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefsType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPValuesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectFactory.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectIdentifierType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusRefsType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusValuesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifierType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesReferenceType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/RevocationValuesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SPUserNoticeType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SigPolicyQualifiersListType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdentifierType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignatureProductionPlaceType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedDataObjectPropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedPropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedSignaturePropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/SignerRoleType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/TimeStampType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedDataObjectPropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedPropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedSignaturePropertiesType.java create mode 100644 utils/src/main/java/org/etsi/uri/_01903/v1_1/package-info.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/CanonicalizationMethodType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/DSAKeyValueType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/DigestMethodType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyInfoType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyValueType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/ManifestType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectFactory.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/PGPDataType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/RSAKeyValueType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509IssuerSerialType.java create mode 100644 utils/src/main/java/org/w3/_2000/_09/xmldsig_/package-info.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/BasePointParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldElemType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CurveParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/DomainParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECDSAKeyValueType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECPointType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ExplicitParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldElemType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ObjectFactory.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldElemType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PnBFieldParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldElemType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/TnBFieldParamsType.java create mode 100644 utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/package-info.java create mode 100644 utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java create mode 100644 utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java create mode 100644 utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java create mode 100644 utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java create mode 100644 utils/src/test/requests/CreateCMSSignatureRequest01.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest01.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest02.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest03.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml create mode 100644 utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt create mode 100644 utils/src/test/resources/commons-logging.properties create mode 100644 utils/src/test/resources/log4j.properties diff --git a/BKUApplet/keystore.ks b/BKUApplet/keystore.ks new file mode 100644 index 00000000..824c3a40 Binary files /dev/null and b/BKUApplet/keystore.ks differ diff --git a/BKUApplet/pom.xml b/BKUApplet/pom.xml new file mode 100644 index 00000000..35672e51 --- /dev/null +++ b/BKUApplet/pom.xml @@ -0,0 +1,117 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + BKUApplet + BKU Applet + 1.0-SNAPSHOT + + + + + maven-dependency-plugin + + + unpack + + unpack + + + ${project.build.outputDirectory} + META-INF\/ + + + at.gv.egiz + smcc + jar + + + at.gv.egiz + smccSTAL + jar + + + at.gv.egiz + STAL + jar + + + at.gv.egiz + STALService + jar + + + at.gv.egiz + BKUCommonGUI + jar + + + + + + + + maven-jar-plugin + + + + sign + + + + + + false + false + + false + true + + + test-applet signer + ./keystore.ks + storepass + keypass + true + + + + + + + at.gv.egiz + smcc + 1.0-SNAPSHOT + + + at.gv.egiz + STAL + 1.0-SNAPSHOT + + + at.gv.egiz + STALService + 1.0-SNAPSHOT + + + at.gv.egiz + smccSTAL + 1.0-SNAPSHOT + + + at.gv.egiz + BKUCommonGUI + 1.0-SNAPSHOT + + + commons-logging + commons-logging + + + \ No newline at end of file diff --git a/BKUApplet/src/main/java/META-INF/MANIFEST.MF b/BKUApplet/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/BKUApplet/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java new file mode 100644 index 00000000..56cc5ea2 --- /dev/null +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java @@ -0,0 +1,101 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.applet; + +import java.util.Locale; +import java.util.ResourceBundle; + +import javax.net.ssl.HttpsURLConnection; +import javax.swing.JApplet; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.gui.BKUGUIFacade; +import at.gv.egiz.bku.gui.BKUGUIFactory; + +/** + * + * + * + */ +public class BKUApplet extends JApplet { + + private static Log log = LogFactory.getLog(BKUApplet.class); + + public final static String RESOURCE_BUNDLE_BASE = "at/gv/egiz/bku/online/applet/Messages"; + + public final static String LOCALE_PARAM_KEY = "Locale"; + public final static String LOGO_URL_KEY="LogoURL"; + public final static String WSDL_URL="WSDL_URL"; + public final static String SESSION_ID="SessionID"; + + protected ResourceBundle resourceBundle; + protected BKUWorker worker; + protected Thread workerThread; + + public BKUApplet() { + } + + public void init() { + log.debug("Called init()"); + try { + HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory.getSocketFactory()); + HttpsURLConnection.setDefaultHostnameVerifier(InternalSSLSocketFactory.getHostNameVerifier()); + } catch (InternalSSLSocketFactoryException e) { + log.error(e); + } + String localeString = getMyAppletParameter(LOCALE_PARAM_KEY); + if (localeString != null) { + resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE, + new Locale(localeString)); + } else { + resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE); + } + BKUGUIFacade gui = BKUGUIFactory.createGUI(); + gui.init(getContentPane(), localeString); + worker = new BKUWorker(gui, this, resourceBundle); + } + + public void start() { + log.debug("Called start()"); + workerThread = new Thread(worker); + workerThread.start(); + } + + public void stop() { + log.debug("Called stop()"); + if ((workerThread != null) && (workerThread.isAlive())) { + workerThread.interrupt(); + } + } + + public void destroy() { + log.debug("Called destroy()"); + } + + /** + * Applet configuration parameters + * + * @param paramKey + * @return + */ + public String getMyAppletParameter(String paramKey) { + log.info("Getting parameter: "+paramKey+ ": "+ getParameter(paramKey)); + return getParameter(paramKey); + } +} diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java new file mode 100644 index 00000000..38fd6428 --- /dev/null +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java @@ -0,0 +1,286 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.applet; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.ResourceBundle; + +import javax.xml.namespace.QName; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.gui.BKUGUIFacade; +import at.gv.egiz.bku.smccstal.AbstractSMCCSTAL; +import at.gv.egiz.bku.smccstal.SMCCSTALRequestHandler; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.smcc.util.SMCCHelper; +import at.gv.egiz.stal.QuitRequest; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.service.GetNextRequestResponseType; +import at.gv.egiz.stal.service.GetNextRequestType; +import at.gv.egiz.stal.service.ObjectFactory; +import at.gv.egiz.stal.service.STALPortType; +import at.gv.egiz.stal.service.STALService; + +public class BKUWorker extends AbstractSMCCSTAL implements Runnable, + ActionListener, SMCCSTALRequestHandler { + + private static Log log = LogFactory.getLog(BKUWorker.class); + + protected BKUGUIFacade gui; + protected BKUApplet parent; + private STALPortType stalPort; + protected List actionCommandList = new ArrayList(); + protected Boolean actionPerformed = false; + protected boolean finished = false; + protected ResourceBundle errorMessages; + + /** + * + * @param gui + * must not be null + */ + public BKUWorker(BKUGUIFacade gui, BKUApplet parent, + ResourceBundle errorMessageBundle) { + if ((gui == null) || (parent == null) || (errorMessageBundle == null)) { + throw new NullPointerException("Parameter must not be set to null"); + } + this.gui = gui; + this.parent = parent; + this.errorMessages = errorMessageBundle; + addRequestHandler(QuitRequest.class, this); + } + + private STALPortType getSTALPort() throws MalformedURLException { + URL wsdlURL = null; + String wsdlLocation = parent.getMyAppletParameter(BKUApplet.WSDL_URL); + URL codebase = parent.getCodeBase(); + log.debug("Connecting to webservice: " + wsdlLocation); + if (wsdlLocation != null) { + try { + if (codebase.getProtocol().equalsIgnoreCase("file")) { + // for debugging in appletrunner + wsdlURL = new URL(wsdlLocation); + } else { + wsdlURL = new URL(codebase, wsdlLocation); + } + } catch (MalformedURLException ex) { + log.fatal("Paremeter 'wsdlLocation' is not a vailid URL.", ex); + throw new MalformedURLException(ex.getMessage()); + } + } else { + log.fatal("Paremeter 'wsdlLocation' is not set."); + throw new MalformedURLException("Null WSDL url"); + } + log.debug("Found WSDL url: " + wsdlURL); + QName endpointName = new QName("http://www.egiz.gv.at/wsdl/stal", + "STALService"); + STALService stal = new STALService(wsdlURL, endpointName); + return stal.getSTALPort(); + } + + @Override + public void run() { + gui.showWelcomeDialog(); + try { + stalPort = getSTALPort(); + } catch (Exception e) { + log.fatal("Failed to call STAL service.", e); + actionCommandList.clear(); + actionCommandList.add("ok"); + gui.showErrorDialog(errorMessages.getString("failed.WS")); + try { + waitForAction(); + } catch (InterruptedException e1) { + log.error(e1); + } + return; + } + + ObjectFactory factory = new ObjectFactory(); + GetNextRequestType nextRequest = factory.createGetNextRequestType(); + + String sessionId = parent.getMyAppletParameter(BKUApplet.SESSION_ID); + if (sessionId == null) { + // use the testsession for testing + sessionId = "TestSession"; + } + nextRequest.setSessionId(sessionId); + do { + GetNextRequestResponseType resp = stalPort.getNextRequest(nextRequest); + log.info("Got " + resp.getRequest().size() + " requests from server."); + List stalRequests = resp.getRequest(); + List responses = handleRequest(stalRequests); + log.info("Got " + responses.size() + " responses."); + nextRequest = factory.createGetNextRequestType(); + nextRequest.setSessionId(sessionId); + nextRequest.getResponse().addAll(responses); + } while (!finished); + log.info("Done " + Thread.currentThread().getName()); + gui.showWelcomeDialog(); + sendRedirect(); + } + + protected void sendRedirect() { + log.info("Done, sending redirect to get BKU response"); + String redirectURL = parent.getMyAppletParameter("redirectURL"); + String redirectTarget = parent.getMyAppletParameter("redirectTarget"); + log.info("Redirecting to: " + redirectURL + " target: " + redirectTarget); + URL url = null; + if (redirectURL != null) { + try { + url = new URL(parent.getCodeBase(),redirectURL + ";jsessionid=" + + parent.getMyAppletParameter(BKUApplet.SESSION_ID)); + } catch (MalformedURLException ex) { + log.warn("Parameter 'redirectURL': " + redirectURL + + " not a valid URL.", ex); + // gui.showErrorDialog(errorMsg, okListener, actionCommand) + } + if (url != null) { + if (redirectTarget == null) { + log.info("Done. Trying to redirect to " + url + " ..."); + parent.getAppletContext().showDocument(url); + } else { + log.info("Done. Trying to redirect to " + url + " (target=" + + redirectTarget + ") ..."); + parent.getAppletContext().showDocument(url, redirectTarget); + } + } + } else { + log.error("No redirect URL set"); + } + } + + protected synchronized void waitForAction() throws InterruptedException { + log.info("Waiting for Action"); + while (!actionPerformed) { + wait(); + } + actionPerformed = false; + } + + protected synchronized void actionOccured() { + log.info("Received Action"); + actionPerformed = true; + notifyAll(); + } + + @Override + public void actionPerformed(ActionEvent e) { + log.info("Action: " + e); + if (actionCommandList != null) { + if (actionCommandList.contains(e.getActionCommand())) { + actionOccured(); + } + } else { + actionOccured(); + } + } + + @Override + protected boolean waitForCard() { + SMCCHelper smccHelper = new SMCCHelper(); + actionCommandList.clear(); + actionCommandList.add("cancel"); + // while no sigcard found or cancel button pressed + int oldValue = SMCCHelper.PC_SC_NOT_SUPPORTED; // this is a save default + while ((signatureCard == null) && (!actionPerformed)) { + switch (smccHelper.getResultCode()) { + case SMCCHelper.PC_SC_NOT_SUPPORTED: + actionCommandList.clear(); + actionCommandList.add("ok"); + gui.showErrorDialog(errorMessages.getString("nopcscsupport"), this, + "ok"); + try { + waitForAction(); + } catch (InterruptedException e) { + log.error(e); + } + return true; + case SMCCHelper.TERMINAL_NOT_PRESENT: + actionCommandList.clear(); + actionCommandList.add("ok"); + gui.showErrorDialog(errorMessages.getString("nocardterminal"), this, + "ok"); + try { + waitForAction(); + } catch (InterruptedException e) { + log.error(e); + } + return true; + case SMCCHelper.CARD_NOT_SUPPORTED: + if (oldValue != SMCCHelper.CARD_NOT_SUPPORTED) { + actionCommandList.clear(); + actionCommandList.add("cancel"); + gui.showCardNotSupportedDialog(this, "cancel"); + oldValue = SMCCHelper.CARD_NOT_SUPPORTED; + } + break; + case SMCCHelper.NO_CARD: + if (oldValue != SMCCHelper.NO_CARD) { + actionCommandList.clear(); + actionCommandList.add("cancel"); + gui.showInsertCardDialog(this, "cancel"); + oldValue = SMCCHelper.NO_CARD; + } + break; + case SMCCHelper.CARD_FOUND: + gui.showWelcomeDialog(); + signatureCard = smccHelper.getSignatureCard(errorMessages.getLocale()); + return false; + } + smccHelper.update(3000); + } + return signatureCard == null; + } + + @Override + public STALResponse handleRequest(STALRequest request) { + if (request instanceof QuitRequest) { + finished = true; + } else { + log.error("Unexpected request to handle: " + request); + } + return null; + } + + @Override + public void init(SignatureCard sc, BKUGUIFacade gui) { + } + + @Override + public SMCCSTALRequestHandler newInstance() { + return this; + } + + @Override + public boolean requireCard() { + return false; + } + + @Override + protected BKUGUIFacade getGUI() { + return gui; + } +} diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactory.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactory.java new file mode 100644 index 00000000..ab04d2b6 --- /dev/null +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactory.java @@ -0,0 +1,101 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.online.applet; + +import java.io.IOException; +import java.security.KeyManagementException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.X509TrustManager; + +public class InternalSSLSocketFactory { + + private SSLSocketFactory factory; + + public static SSLSocketFactory getSocketFactory() throws InternalSSLSocketFactoryException { + return new InternalSSLSocketFactory().factory; + } + + public static HostnameVerifier getHostNameVerifier() throws InternalSSLSocketFactoryException { + return (new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }); + } + + public InternalSSLSocketFactory() throws InternalSSLSocketFactoryException { + SSLContext sslContext; + try { + sslContext = SSLContext.getInstance("TLSv1"); + sslContext.getClientSessionContext().setSessionTimeout(0); + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509"); + + KeyStore keyStore = KeyStore.getInstance("JKS"); + keyStore.load(null, null); + keyManagerFactory.init(keyStore, null); + + sslContext.init(keyManagerFactory.getKeyManagers(), + new X509TrustManager[] { new AcceptAllTrustManager() }, + null); + } catch (NoSuchAlgorithmException e) { + throw new InternalSSLSocketFactoryException(e); + } catch (CertificateException e) { + throw new InternalSSLSocketFactoryException(e); + } catch (IOException e) { + throw new InternalSSLSocketFactoryException(e); + } catch (KeyStoreException e) { + throw new InternalSSLSocketFactoryException(e); + } catch (UnrecoverableKeyException e) { + throw new InternalSSLSocketFactoryException(e); + } catch (KeyManagementException e) { + throw new InternalSSLSocketFactoryException(e); + } + + this.factory = sslContext.getSocketFactory(); + } + + class AcceptAllTrustManager implements X509TrustManager { + + public X509Certificate[] getAcceptedIssuers() { + return null; + } + + public void checkClientTrusted(X509Certificate[] chain, String authType) { + } + + public void checkServerTrusted(X509Certificate[] chain, String authType) { + //FIXME + } + } +}; diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactoryException.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactoryException.java new file mode 100644 index 00000000..c620284a --- /dev/null +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/InternalSSLSocketFactoryException.java @@ -0,0 +1,45 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.online.applet; + +/** + * + * @author mcentner + */ +public class InternalSSLSocketFactoryException extends Exception { + + public InternalSSLSocketFactoryException(Throwable cause) { + super(cause); + } + + public InternalSSLSocketFactoryException(String message, Throwable cause) { + super(message, cause); + } + + public InternalSSLSocketFactoryException(String message) { + super(message); + } + + public InternalSSLSocketFactoryException() { + } + +} diff --git a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages.properties b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages.properties new file mode 100644 index 00000000..752004e8 --- /dev/null +++ b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages.properties @@ -0,0 +1,58 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# -------- BEGIN bootstrap applet -----------# +java16required=This Applet requires Java 1.6 or higher to run. \ + Please download and install a recent version of Java. \ +

For Windows, Linux and Solaris plattforms you can download Java from \ + http://java.sun.com/javase/downloads.\ +

+ +failedtostart=Failed to start Applet. \ +

{0}

+# -------- END bootstrap applet -----------# + + +applet.name=Online Citicen Card Environment (CCE) + +nopcscsupport=The Java plattform does not seem to provide \ +a PC/SC interface to acces a smartcard. + +nocardterminal=Can not find a connected smartcard reader.\ +

Either there is no smartcard reader connected, or \ + no PC/SC driver is installed for a connected smartcard reader.

+ +insertcard=Please insert your citicen card (B\u00FCrgerkarte) into your \ + smartcard reader. + +unsupportedcard=The inserted smartcard is not supported.\ +

Please insert your citicen card (B\u00FCrgerkarte) \ + into your smartcard reader.

+ +enterpin=Please enter {0} \(min {1}, max {2} digits\). + +enterpinretries=Please enter {0} \(min {1}, max {2} digits, {3} retries left\). + +pinwrong=Entered PIN is wrong. + +button.ok=Ok + +button.cancel=Cancel + +status.findpcsc=Looking for PC/SC support + +status.findsupportedcard=Looking for a supported smartcard + +failed.WS=Webservice cannot be reached. \ No newline at end of file diff --git a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages_de.properties b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages_de.properties new file mode 100644 index 00000000..e6b815e9 --- /dev/null +++ b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/Messages_de.properties @@ -0,0 +1,42 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# -------- BEGIN bootstrap applet -----------# +java16required=Dieses Applet ben\u00F6tigt Java Version 1.6 oder h\u00F6her. \ + Bitte installieren sie eine aktulle Version von Java. \ +

F\u00FCr Windows, Linux and Solaris kann Java von \ + http://java.sun.com/javase/downloads \ + heruntergeladen werden.

+ +failedtostart=Das Applet konnte nicht gestartet werden. \ +

{0}

+# -------- END bootstrap applet -----------# + +applet.name=Online B\u00FCrgerkartenumgebung (BKU) + +nopcscsupport=Die Java-Installation stellt keine \ + PC/SC-Schnittstelle zum Zugriff auf eine Chipkarte zur Verf\u00FCgung. + +nocardterminal=Es konnte kein Chipkartenleser gefunden werden.\ +

Entweder, es ist kein Chipkartenleser angeschlossen, oder \ + f\u00FCr den angeschlossenen Chipkartenleser ist kein PC/SC-Treiber \ + installiert.

+ +insertcard=Bitte stecken Sie ihre B\u00FCrgerkarte in den Chipkartenleser. + +unsupportedcard=Die gesteckte Chipkarte wird nicht unterst\u00FCtzt.\ +

Bitte stecken Sie ihre B\u00FCrgerkare in den Chipkartenleser

+ +failed.WS=Das Webservice kann nicht erreicht werden. \ No newline at end of file diff --git a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png new file mode 100644 index 00000000..eee4be4f Binary files /dev/null and b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png differ diff --git a/BKUApplet/src/test/java/at/gv/egiz/stal/client/STALServiceTest.java b/BKUApplet/src/test/java/at/gv/egiz/stal/client/STALServiceTest.java new file mode 100644 index 00000000..9b58798d --- /dev/null +++ b/BKUApplet/src/test/java/at/gv/egiz/stal/client/STALServiceTest.java @@ -0,0 +1,96 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.stal.client; + +import static org.junit.Assert.assertNotNull; + +import java.net.MalformedURLException; +import java.net.URL; + +import javax.xml.namespace.QName; + +import org.junit.Test; + +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.service.GetHashDataInputFault; +import at.gv.egiz.stal.service.GetHashDataInputResponseType; +import at.gv.egiz.stal.service.GetHashDataInputType; +import at.gv.egiz.stal.service.GetNextRequestResponseType; +import at.gv.egiz.stal.service.GetNextRequestType; +import at.gv.egiz.stal.service.STALPortType; +import at.gv.egiz.stal.service.STALService; + +/** + * + * @author clemens + */ +public class STALServiceTest { + +// @Test + public void callSTAL() { + try { + URL endpointURL = new URL("http://localhost:8080/bkuonline/stal?wsdl"); + QName endpointName = new QName("http://www.egiz.gv.at/wsdl/stal", "STALService"); + STALService stal = new STALService(endpointURL, endpointName); +// stal = new STALService(); + STALPortType port = stal.getSTALPort(); + + GetNextRequestType nrReq = new GetNextRequestType(); + nrReq.setSessionId("TestSession"); //STALServiceImpl.TEST_SESSION_ID); +// req.getResponse().add(new ErrorResponse(1234)); + GetNextRequestResponseType nrResp = port.getNextRequest(nrReq); + assertNotNull(nrResp); + System.out.println("got response: " + nrResp.getRequest().size()); + for (STALRequest stalReq : nrResp.getRequest()) { + if (stalReq instanceof InfoboxReadRequest) { + String ibid = ((InfoboxReadRequest) stalReq).getInfoboxIdentifier(); + String did = ((InfoboxReadRequest) stalReq).getDomainIdentifier(); + System.out.println(" received InfoboxReadRequest for " + ibid + ", " + did); + } else { + System.out.println(" received STAL request " + stalReq.getClass().getName()); + } + } + + GetHashDataInputType hdReq = new GetHashDataInputType(); + hdReq.setSessionId("TestSession"); //STALServiceImpl.TEST_SESSION_ID); + GetHashDataInputType.Reference ref = new GetHashDataInputType.Reference(); + ref.setID("refId"); + hdReq.getReference().add(ref); + GetHashDataInputResponseType hdResp = port.getHashDataInput(hdReq); + GetHashDataInputResponseType.Reference hdRef = hdResp.getReference().get(0); + System.out.println("got HashDataInput " + new String(hdRef.getValue())); + + + } catch (GetHashDataInputFault ex) { + ex.printStackTrace(); + } catch (MalformedURLException ex) { + ex.printStackTrace(); + } + } + + @Test + public void testSTAL() { + //TODO + } + +} diff --git a/BKUCommonGUI/pom.xml b/BKUCommonGUI/pom.xml new file mode 100644 index 00000000..bd579c51 --- /dev/null +++ b/BKUCommonGUI/pom.xml @@ -0,0 +1,33 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + BKUCommonGUI + BKU Common GUI + 1.0-SNAPSHOT + + + + at.gv.egiz + smcc + 1.0-SNAPSHOT + + + + \ No newline at end of file diff --git a/BKUCommonGUI/src/main/java/META-INF/MANIFEST.MF b/BKUCommonGUI/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/BKUCommonGUI/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java new file mode 100644 index 00000000..87b4eab4 --- /dev/null +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java @@ -0,0 +1,909 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.bku.gui; + +import at.gv.egiz.smcc.PINSpec; +import java.awt.Color; +import java.awt.Container; +import java.awt.Cursor; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.text.MessageFormat; +import java.util.List; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.swing.GroupLayout; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.LayoutStyle; +import javax.swing.SwingUtilities; +import javax.swing.filechooser.FileFilter; +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.PlainDocument; + +/** + * + * @author clemens + */ +public class BKUGUI implements BKUGUIFacade { + + public static final String MESSAGES_BUNDLE = "at/gv/egiz/bku/gui/Messages"; + public static final String LOGO_RESOURCE = "/images/logo.png"; + + public static final int MAIN_PANEL_WIDTH = 100; +// public static final int MAIN_PANEL_HEIGHT = 20; + public static final int PREF_SIZE_PINFIELD = 118; + public static final Color ERROR_COLOR = Color.RED; + public static final Color HYPERLINK_COLOR = Color.BLUE; + + private static final String TITLE_WELCOME = "title.welcome"; + private static final String TITLE_INSERTCARD = "title.insertcard"; + private static final String TITLE_CARD_NOT_SUPPORTED = "title.cardnotsupported"; + private static final String TITLE_CARDPIN = "title.cardpin"; + private static final String TITLE_SIGN = "title.sign"; + private static final String TITLE_ERROR = "title.error"; + private static final String TITLE_RETRY = "title.retry"; + private static final String WINDOWTITLE_SAVE = "windowtitle.save"; + + private static final String MESSAGE_WAIT="message.wait"; + private static final String MESSAGE_INSERTCARD="message.insertcard"; + private static final String MESSAGE_HASHDATALINK="message.hashdatalink"; + private static final String MESSAGE_RETRIES="message.retries"; + private static final String LABEL_PIN="label.pin"; + private static final String LABEL_PINSIZE="label.pinsize"; +// private static final String LABEL_CARDPINSIZE="label.cardpinsize"; +// private static final String LABEL_SIGNPIN="label.signpin"; +// private static final String LABEL_SIGNPINSIZE="label.signpinsize"; + private static final String BUTTON_OK = "button.ok"; + private static final String BUTTON_CANCEL = "button.cancel"; + private static final String BUTTON_SIGN = "button.sign"; + + private static final String MIMETYPE_DESC_XML = "mimetype.desc.xml"; + private static final String MIMETYPE_DESC_TXT = "mimetype.desc.txt"; + private static final String MIMETYPE_DESC_PDF = "mimetype.desc.pdf"; + private static final String MIMETYPE_DESC_BIN = "mimetype.desc.bin"; + private static final String SAVE_HASHDATAINPUT_PREFIX = "save.hashdatainput.prefix"; + + protected Container contentPane; + protected ResourceBundle messages; + + /** left and right side main panels */ + protected JPanel iconPanel; + protected JPanel contentPanel; + /** right side content panels and layouts */ + protected JPanel headerPanel; + protected JPanel mainPanel; + protected JPanel buttonPanel; + /** right side fixed labels */ + protected JLabel titleLabel; + /** remember the pinfield to return to worker */ + protected JPasswordField pinField; + + /** + * @param contentPane + * @param localeString may be null + */ + @Override + public void init(final Container contentPane, String localeString) { + + if (localeString != null) { + messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, new Locale(localeString)); + } else { + messages = ResourceBundle.getBundle(MESSAGES_BUNDLE); + } + + this.contentPane = contentPane; + + try { + + SwingUtilities.invokeAndWait(new Runnable() { + + public void run() { + + initIconPanel(); + initContentPanel(); + + GroupLayout layout = new GroupLayout(contentPane); + contentPane.setLayout(layout); + layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(iconPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(contentPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); + layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(iconPanel, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(contentPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); + } + }); + } catch (Exception ex) { + throw new RuntimeException("Failed to init GUI: " + ex.getMessage()); + } + } + + protected void initIconPanel() { + iconPanel = new JPanel(); + JLabel iconLabel = new JLabel(); + iconLabel.setIcon(new ImageIcon(getClass().getResource(LOGO_RESOURCE))); // NOI18N + + GroupLayout iconPanelLayout = new GroupLayout(iconPanel); + iconPanel.setLayout(iconPanelLayout); + iconPanelLayout.setHorizontalGroup( + iconPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(iconPanelLayout.createSequentialGroup().addContainerGap().addComponent(iconLabel).addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); + iconPanelLayout.setVerticalGroup( + iconPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(iconPanelLayout.createSequentialGroup().addContainerGap().addComponent(iconLabel, GroupLayout.PREFERRED_SIZE, 105, GroupLayout.PREFERRED_SIZE).addContainerGap(41, Short.MAX_VALUE))); + } + + protected void initContentPanel() { + + contentPanel = new JPanel(); + + headerPanel = new JPanel(); + mainPanel = new JPanel(); + buttonPanel = new JPanel(); + +// headerPanel.setBorder(new TitledBorder("header")); +// mainPanel.setBorder(new TitledBorder("main")); +// buttonPanel.setBorder(new TitledBorder("button")); + + titleLabel = new JLabel(); + titleLabel.setFont(titleLabel.getFont().deriveFont(titleLabel.getFont().getStyle() | + java.awt.Font.BOLD, titleLabel.getFont().getSize() + 2)); +// titleLabel.setForeground(defaultForground); + + GroupLayout headerPanelLayout = new GroupLayout(headerPanel); + headerPanel.setLayout(headerPanelLayout); + + headerPanelLayout.setHorizontalGroup( + headerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(titleLabel, GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)); + headerPanelLayout.setVerticalGroup( + headerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(titleLabel)); + +// mainPanel.setPreferredSize(new Dimension(MAIN_PANEL_WIDTH, MAIN_PANEL_HEIGHT)); + + GroupLayout contentPanelLayout = new GroupLayout(contentPanel); + contentPanel.setLayout(contentPanelLayout); + contentPanelLayout.setHorizontalGroup( + contentPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(contentPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(contentPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(headerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(mainPanel, GroupLayout.DEFAULT_SIZE, MAIN_PANEL_WIDTH, Short.MAX_VALUE) + .addComponent(buttonPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); + contentPanelLayout.setVerticalGroup( + contentPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(contentPanelLayout.createSequentialGroup() + .addContainerGap() + .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(mainPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) //79, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(buttonPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addContainerGap())); + } + + @Override + public void showLoginDialog(ActionListener loginListener, String actionCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_ERROR)); +// titleLabel.setForeground(defaultForground); + + JLabel waitMsgLabel = new JLabel(); + waitMsgLabel.setFont(waitMsgLabel.getFont().deriveFont(waitMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + waitMsgLabel.setText("LoginDialog not supported yet."); + waitMsgLabel.setForeground(ERROR_COLOR); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(waitMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(waitMsgLabel)); + + contentPanel.validate(); + } + }); + } + + @Override + public void showWelcomeDialog() { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_WELCOME)); +// titleLabel.setForeground(defaultForground); + + JLabel waitMsgLabel = new JLabel(); + waitMsgLabel.setFont(waitMsgLabel.getFont().deriveFont(waitMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + waitMsgLabel.setText(messages.getString(MESSAGE_WAIT)); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(waitMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(waitMsgLabel)); + + contentPanel.validate(); + + } + }); + } + + @Override + public void showInsertCardDialog(final ActionListener cancelListener, final String cancelCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_INSERTCARD)); +// titleLabel.setForeground(defaultForground); + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont()); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.addActionListener(cancelListener); + cancelButton.setActionCommand(cancelCommand); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cancelButton) + .addContainerGap())); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(cancelButton)); + + contentPanel.validate(); + } + }); + } + + @Override + public void showCardNotSupportedDialog(final ActionListener cancelListener, final String cancelCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_CARD_NOT_SUPPORTED)); +// titleLabel.setForeground(defaultForground); + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont()); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.addActionListener(cancelListener); + cancelButton.setActionCommand(cancelCommand); + + JLabel errorMsgLabel = new JLabel(); + errorMsgLabel.setFont(errorMsgLabel.getFont().deriveFont(errorMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + errorMsgLabel.setText(messages.getString(MESSAGE_INSERTCARD)); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel)); + + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cancelButton) + .addContainerGap())); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(cancelButton)); + + contentPanel.validate(); + } + }); + } + + private void showCardPINDialog(final PINSpec pinSpec, final int numRetries, final ActionListener okListener, final String okCommand, final ActionListener cancelListener, final String cancelCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + + mainPanel.removeAll(); + buttonPanel.removeAll(); + + if (numRetries < 0) { + String cardpinTitle = messages.getString(TITLE_CARDPIN); + titleLabel.setText(MessageFormat.format(cardpinTitle, new Object[] {pinSpec.getLocalizedName()})); + } else { + titleLabel.setText(messages.getString(TITLE_RETRY)); + } + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont()); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.setActionCommand(cancelCommand); + cancelButton.addActionListener(cancelListener); + + JButton okButton = new JButton(); + okButton.setEnabled(false); + okButton.setFont(okButton.getFont()); + okButton.setText(messages.getString(BUTTON_OK)); + okButton.setActionCommand(okCommand); + okButton.addActionListener(okListener); + + JLabel cardPinLabel = new JLabel(); + cardPinLabel.setFont(cardPinLabel.getFont().deriveFont(cardPinLabel.getFont().getStyle() | java.awt.Font.BOLD)); + String pinLabel = messages.getString(LABEL_PIN); + cardPinLabel.setText(MessageFormat.format(pinLabel, new Object[] {pinSpec.getLocalizedName()})); + +// JPasswordField cardPINField = new JPasswordField(); + pinField = new JPasswordField(); + pinField.setText(""); + pinField.setDocument(new PINDocument(pinSpec, okButton)); + pinField.setActionCommand(okCommand); + pinField.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + if (pinField.getPassword().length >= pinSpec.getMinLength()) { + okListener.actionPerformed(e); + } + } + }); + + JLabel infoLabel = new JLabel(); + if (numRetries < 0) { + infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + String pinsizePattern = messages.getString(LABEL_PINSIZE); + String pinSize = String.valueOf(pinSpec.getMinLength()); + if (pinSpec.getMinLength() != pinSpec.getMaxLength()) { + pinSize += "-" + pinSpec.getMaxLength(); + } + infoLabel.setText(MessageFormat.format(pinsizePattern, new Object[] {pinSize})); + } else { + infoLabel.setText(MessageFormat.format(messages.getString(MESSAGE_RETRIES), new Object[] {String.valueOf(numRetries)})); + infoLabel.setForeground(ERROR_COLOR); + } + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + +// GroupLayout.ParallelGroup mainGroup = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING); +// mainGroup.addComponent(pinSizeLabel) //, GroupLayout.DEFAULT_SIZE, PREF_SIZE_PINFIELD, Short.MAX_VALUE) +// .addComponent(pinField, GroupLayout.DEFAULT_SIZE, PREF_SIZE_PINFIELD, Short.MAX_VALUE); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(mainPanelLayout.createSequentialGroup() // .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + // .addComponent(hashDataLabel) + // .addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() + .addComponent(cardPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) //RELATED) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) //TRAILING) + .addComponent(infoLabel) //, GroupLayout.DEFAULT_SIZE, PREF_SIZE_PINFIELD, Short.MAX_VALUE) + .addComponent(pinField, GroupLayout.DEFAULT_SIZE, PREF_SIZE_PINFIELD, Short.MAX_VALUE)) //)) + .addContainerGap())); + + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(mainPanelLayout.createSequentialGroup() + .addContainerGap() // .addComponent(hashDataLabel).addGap(14, 14, 14) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) //, false) + .addComponent(cardPinLabel) //, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE) + .addComponent(pinField)) //, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(infoLabel).addGap(cardPinLabel.getFont().getSize()))); //10, 10, 10))); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, buttonPanelLayout.createSequentialGroup() + .addContainerGap(15, Short.MAX_VALUE) + .addComponent(okButton) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cancelButton).addContainerGap())); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(okButton).addComponent(cancelButton))); + + pinField.requestFocusInWindow(); + contentPanel.validate(); + + } + }); + } + + @Override + public void showCardPINDialog(PINSpec pinSpec, ActionListener okListener, String okCommand, ActionListener cancelListener, String cancelCommand) { + showCardPINDialog(pinSpec, -1, okListener, okCommand, cancelListener, cancelCommand); + } + + @Override + public void showCardPINRetryDialog(PINSpec pinSpec, int numRetries, ActionListener okListener, String okCommand, ActionListener cancelListener, String cancelCommand) { + showCardPINDialog(pinSpec, numRetries, okListener, okCommand, cancelListener, cancelCommand); + } + + @Override + public void showSignaturePINDialog(PINSpec pinSpec, ActionListener signListener, String signCommand, ActionListener cancelListener, String cancelCommand, ActionListener hashdataListener, String hashdataCommand) { + showSignaturePINDialog(pinSpec, -1, signListener, signCommand, cancelListener, cancelCommand, hashdataListener, hashdataCommand); + } + + @Override + public void showSignaturePINRetryDialog(PINSpec pinSpec, int numRetries, ActionListener okListener, String okCommand, ActionListener cancelListener, String cancelCommand, ActionListener hashdataListener, String hashdataCommand) { + showSignaturePINDialog(pinSpec, numRetries, okListener, okCommand, cancelListener, cancelCommand, hashdataListener, hashdataCommand); + } + + + + private void showSignaturePINDialog(final PINSpec pinSpec, final int numRetries, final ActionListener signListener, final String signCommand, final ActionListener cancelListener, final String cancelCommand, final ActionListener hashdataListener, final String hashdataCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + if (numRetries < 0) { + titleLabel.setText(messages.getString(TITLE_SIGN)); + } else { + titleLabel.setText(messages.getString(TITLE_RETRY)); + } + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont()); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.setActionCommand(cancelCommand); + cancelButton.addActionListener(cancelListener); + + JButton signButton = new JButton(); + signButton.setEnabled(false); + signButton.setFont(signButton.getFont()); + signButton.setText(messages.getString(BUTTON_SIGN)); + signButton.setActionCommand(signCommand); + signButton.addActionListener(signListener); + + JLabel signPinLabel = new JLabel(); + signPinLabel.setFont(signPinLabel.getFont().deriveFont(signPinLabel.getFont().getStyle() | java.awt.Font.BOLD)); + String pinLabel = messages.getString(LABEL_PIN); + signPinLabel.setText(MessageFormat.format(pinLabel, new Object[] {pinSpec.getLocalizedName()})); + + pinField = new JPasswordField(); + pinField.setText(""); + pinField.setDocument(new PINDocument(pinSpec, signButton)); + pinField.setActionCommand(signCommand); + pinField.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + if (pinField.getPassword().length >= pinSpec.getMinLength()) { + signListener.actionPerformed(e); + } + } + }); + + //pinsize or error label + JLabel infoLabel = new JLabel(); + infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + if (numRetries < 0) { + String pinsizePattern = messages.getString(LABEL_PINSIZE); + String pinSize = String.valueOf(pinSpec.getMinLength()); + if (pinSpec.getMinLength() != pinSpec.getMaxLength()) { + pinSize += "-" + pinSpec.getMaxLength(); + } + infoLabel.setText(MessageFormat.format(pinsizePattern, new Object[] {pinSize})); + } else { + infoLabel.setText(MessageFormat.format(messages.getString(MESSAGE_RETRIES), new Object[] {String.valueOf(numRetries)})); + infoLabel.setForeground(ERROR_COLOR); + } + + JLabel hashDataLabel = new JLabel(); + hashDataLabel.setFont(hashDataLabel.getFont().deriveFont(hashDataLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + hashDataLabel.setText(messages.getString(MESSAGE_HASHDATALINK)); + hashDataLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + hashDataLabel.setForeground(HYPERLINK_COLOR); + hashDataLabel.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent me) { + ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, hashdataCommand); + hashdataListener.actionPerformed(e); + } + }); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(mainPanelLayout.createSequentialGroup().addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(hashDataLabel).addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup().addComponent(signPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(infoLabel) //, GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE) + .addComponent(pinField, GroupLayout.DEFAULT_SIZE, PREF_SIZE_PINFIELD, Short.MAX_VALUE)))).addContainerGap())); + + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(mainPanelLayout.createSequentialGroup().addComponent(hashDataLabel).addGap(hashDataLabel.getFont().getSize()) //14, 14, 14) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE, false).addComponent(signPinLabel) //, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE) + .addComponent(pinField)) //, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(infoLabel).addGap(signPinLabel.getFont().getSize()))); //10, 10, 10))); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, buttonPanelLayout.createSequentialGroup().addContainerGap(15, Short.MAX_VALUE).addComponent(signButton).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(cancelButton).addContainerGap())); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(signButton).addComponent(cancelButton))); + + pinField.requestFocusInWindow(); + contentPanel.validate(); + + } + +// private ParallelGroup createMainGroup(GroupLayout mainPanelLayout, JLabel hashDataLabel, JLabel signPinLabel, JLabel pinSizeLabel, JLabel errorLabel) { +// ParallelGroup mainGroup = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING); +// mainGroup.addComponent(hashDataLabel); +// if (errorLabel != null) { +// mainGroup.addComponent(errorLabel); +// } +// mainGroup.addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() +// .addComponent(signPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) +// .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) +// .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) +// .addComponent(pinSizeLabel) +// .addComponent(pinField, GroupLayout.DEFAULT_SIZE, PREF_SIZE_PINFIELD, Short.MAX_VALUE))); +// return mainGroup; +// } + +// private GroupLayout.SequentialGroup createVerticalMainGroup(GroupLayout mainPanelLayout, JLabel hashDataLabel, JLabel signPinLabel, JLabel pinSizeLabel, JLabel errorLabel) { +// GroupLayout.SequentialGroup mainGroup = mainPanelLayout.createSequentialGroup(); +// mainGroup.addComponent(hashDataLabel) +// .addGap(hashDataLabel.getFont().getSize()); //14, 14, 14) +// +// if (errorLabel != null) { +// mainGroup.addComponent(errorLabel) +// .addGap(errorLabel.getFont().getSize()); +// } +// mainGroup.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE, false) +// .addComponent(signPinLabel) //, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE) +// .addComponent(pinField)) //, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)) +// .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) +// .addComponent(pinSizeLabel) +// .addGap(signPinLabel.getFont().getSize()); +// +// return mainGroup; +//// mainPanelLayout.createSequentialGroup() +//// .addComponent(hashDataLabel) +//// .addGap(hashDataLabel.getFont().getSize()) //14, 14, 14) +//// .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE, false) +//// .addComponent(signPinLabel) //, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE) +//// .addComponent(pinField)) //, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)) +//// .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) +//// .addComponent(pinSizeLabel) +//// .addGap(signPinLabel.getFont().getSize()) +//// +//// +// } + }); + } + + @Override + public void showErrorDialog(final String errorMsg, final ActionListener okListener, final String okCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_ERROR)); +// titleLabel.setForeground(defaultForground); + + JLabel errorMsgLabel = new JLabel(); + errorMsgLabel.setFont(errorMsgLabel.getFont().deriveFont(errorMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + errorMsgLabel.setText("" + errorMsg + ""); + errorMsgLabel.setForeground(ERROR_COLOR); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel)); + + JButton okButton = new JButton(); + okButton.setFont(okButton.getFont()); + okButton.setText(messages.getString(BUTTON_OK)); + okButton.setActionCommand(okCommand); + okButton.addActionListener(okListener); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(okButton) + .addContainerGap())); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(okButton)); + + contentPanel.validate(); + } + }); + } + + @Override + public void showErrorDialog(final String errorMsg) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_ERROR)); +// titleLabel.setForeground(defaultForground); + + JLabel errorMsgLabel = new JLabel(); + errorMsgLabel.setFont(errorMsgLabel.getFont().deriveFont(errorMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + errorMsgLabel.setText("" + errorMsg + ""); + errorMsgLabel.setForeground(ERROR_COLOR); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel)); + + contentPanel.validate(); + } + }); + } + + @Override + public void showHashDataInputDialog(final List signedReferences, final ActionListener okListener, final String okCommand) { + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + + if (signedReferences != null && signedReferences.size() == 1) { + FileOutputStream fos = null; + try { + HashDataInput signedRef = signedReferences.get(0); + final String mimeType = signedRef.getMimeType(); + String dir = System.getProperty("user.home"); + JFileChooser fileDialog = new JFileChooser(dir); + fileDialog.setFileSelectionMode(JFileChooser.FILES_ONLY); + fileDialog.setMultiSelectionEnabled(false); + fileDialog.setDialogTitle(messages.getString(WINDOWTITLE_SAVE)); + fileDialog.setDialogType(JFileChooser.SAVE_DIALOG); + fileDialog.setFileHidingEnabled(true); + MimeFilter mimeFilter = new MimeFilter(mimeType); + fileDialog.setFileFilter(mimeFilter); + String filename = messages.getString(SAVE_HASHDATAINPUT_PREFIX) + mimeFilter.getExtension(); + fileDialog.setSelectedFile(new File(dir, filename)); + switch (fileDialog.showSaveDialog(contentPane)) { + case JFileChooser.APPROVE_OPTION: + File f = fileDialog.getSelectedFile(); +// if (f.exists()) { +// //TODO +// } + + fos = new FileOutputStream(f); + BufferedOutputStream bos = new BufferedOutputStream(fos); + InputStream hdi = signedRef.getHashDataInput(); + int b; + while ((b = hdi.read()) != -1) { + bos.write(b); + } + bos.flush(); + bos.close(); + } + } catch (IOException ex) { + showErrorDialog("Failed to write signed reference to file: " + ex.getMessage(), null, null); + ex.printStackTrace(); + } finally { + try { + fos.close(); + } catch (IOException ex) {} + } + } else { + mainPanel.removeAll(); + buttonPanel.removeAll(); + + titleLabel.setText(messages.getString(TITLE_ERROR)); + // titleLabel.setForeground(defaultForground); + + JLabel errorMsgLabel = new JLabel(); + errorMsgLabel.setFont(errorMsgLabel.getFont().deriveFont(errorMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + errorMsgLabel.setText("HashDataInputDialog not supported yet."); + errorMsgLabel.setForeground(ERROR_COLOR); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(errorMsgLabel)); + + JButton okButton = new JButton(); + okButton.setFont(okButton.getFont()); + okButton.setText(messages.getString(BUTTON_OK)); + okButton.setActionCommand(okCommand); + okButton.addActionListener(okListener); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(okButton) + .addContainerGap())); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(okButton)); + + contentPanel.validate(); + } + } + }); + } + + @Override + public char[] getPin() { + if (pinField != null) + return pinField.getPassword(); + return null; + } + + class PINDocument extends PlainDocument { + + private PINSpec pinSpec; + private Pattern pinPattern; + private JButton enterButton; + + public PINDocument(PINSpec pinSpec, JButton enterButton) { + this.pinSpec = pinSpec; + if (pinSpec.getRexepPattern() != null) { + pinPattern = Pattern.compile(pinSpec.getRexepPattern()); + } else { + pinPattern = Pattern.compile("."); + } + this.enterButton = enterButton; + } + + @Override + public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { + if (pinSpec.getMaxLength() >= (getLength() + str.length())) { + boolean matches = true; + for (int i = 0; i < str.length(); i++) { + Matcher m = pinPattern.matcher(str.substring(i, i+1)); + if (!m.matches()) { + matches = false; + } + } + if (matches) { + super.insertString(offs, str, a); + } + } + enterButton.setEnabled(getLength() >= pinSpec.getMinLength()); + } + + @Override + public void remove(int offs, int len) throws BadLocationException { + super.remove(offs, len); + enterButton.setEnabled(getLength() >= pinSpec.getMinLength()); + } + } + + class MimeFilter extends FileFilter { + + protected String mimeType; + + public MimeFilter(String mimeType) { + this.mimeType = mimeType; + } + + @Override + public boolean accept(File f) { + + if (f.isDirectory()) { + return true; + } else if ("text/xml".equals(mimeType)) { + return "xml".equals(getExtension(f)); + } else if ("text/plain".equals(mimeType)) { + return "txt".equals(getExtension(f)); + } else if ("application/pdf".equals(mimeType)) { + return "pdf".equals(getExtension(f)); + } else { + return "bin".equals(getExtension(f)); + } + } + + private String getExtension(File f) { + String ext = null; + String s = f.getName(); + int i = s.lastIndexOf('.'); + + if (i > 0 && i < s.length() - 1) { + ext = s.substring(i+1).toLowerCase(); + } + return ext; + } + + @Override + public String getDescription() { + if ("text/xml".equals(mimeType)) { + return messages.getString(MIMETYPE_DESC_XML); + } else if ("text/plain".equals(mimeType)) { + return messages.getString(MIMETYPE_DESC_TXT); + } else if ("application/pdf".equals(mimeType)) { + return messages.getString(MIMETYPE_DESC_PDF); + } else { + return messages.getString(MIMETYPE_DESC_BIN); + } + } + + public String getExtension() { + if ("text/xml".equals(mimeType)) { + return ".xml"; + } else if ("text/plain".equals(mimeType)) { + return ".txt"; + } else if ("application/pdf".equals(mimeType)) { + return ".pdf"; + } else { + return ".bin"; + } + } + } +} diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java new file mode 100644 index 00000000..3766e905 --- /dev/null +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java @@ -0,0 +1,66 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.bku.gui; + +//import at.gv.egiz.smcc.PINSpec; +import at.gv.egiz.smcc.PINSpec; +import java.awt.Container; +import java.awt.event.ActionListener; +import java.util.List; +import javax.swing.JPasswordField; + +/** + * + * @author clemens + */ +public interface BKUGUIFacade { + + public void init(Container contentPane, String localeString); + + public void showWelcomeDialog(); + + /** + * MOA-ID only + * @param loginListener + */ + public void showLoginDialog(ActionListener loginListener, String actionCommand); + + public void showInsertCardDialog(ActionListener cancelListener, String actionCommand); + + public void showCardNotSupportedDialog(ActionListener cancelListener, String actionCommand); + + public void showCardPINDialog(PINSpec pinSpec, ActionListener okListener, String okCommand, ActionListener cancelListener, String cancelCommand); + + public void showCardPINRetryDialog(PINSpec pinSpec, int numRetries, ActionListener okListener, String okCommand, ActionListener cancelListener, String cancelCommand); + + public void showSignaturePINDialog(PINSpec pinSpec, ActionListener signListener, String signCommand, ActionListener cancelListener, String cancelCommand, ActionListener hashdataListener, String hashdataCommand); + + public void showSignaturePINRetryDialog(PINSpec pinSpec, int numRetries, ActionListener okListener, String okCommand, ActionListener cancelListener, String cancelCommand, ActionListener hashdataListener, String hashdataCommand); + + public char[] getPin(); + + public void showHashDataInputDialog(List signedReferences, ActionListener okListener, String actionCommand); + + public void showErrorDialog(String errorMsg, ActionListener okListener, String actionCommand); + + public void showErrorDialog(String errorMsg); + +} diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFactory.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFactory.java new file mode 100644 index 00000000..478b949b --- /dev/null +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFactory.java @@ -0,0 +1,32 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.gui; + +public class BKUGUIFactory { + private static BKUGUIFactory instance = new BKUGUIFactory(); + + private BKUGUIFactory() { + } + + protected BKUGUIFacade createNewGUI() { + return new BKUGUI(); + } + + public static BKUGUIFacade createGUI() { + return instance.createNewGUI(); + } +} diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataInput.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataInput.java new file mode 100644 index 00000000..d916e81c --- /dev/null +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataInput.java @@ -0,0 +1,36 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.gui; + +import java.io.InputStream; + +/** + * + * @author clemens + */ +public interface HashDataInput { + + public InputStream getHashDataInput(); + + public String getMimeType(); + +} diff --git a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties new file mode 100644 index 00000000..62c5a670 --- /dev/null +++ b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties @@ -0,0 +1,39 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. +title.welcome=Willkommen +title.insertcard=Bitte B\u00FCrgerkarte in den Kartenleser stecken +title.cardnotsupported=Die Karte wird nicht unterst\u00FCtzt +title.cardpin={0} eingeben +title.sign=Signatur erstellen +title.error=Ein Fehler trat auf +title.retry=Falscher PIN +windowtitle.save=Signaturdaten speichern +message.wait=Bitte warten... +message.insertcard=Bitte B\u00FCrgerkarte in den Kartenleser stecken. +message.hashdatalink=Signaturdaten anzeigen... +message.retries=Noch {0} Versuche +label.pin={0}: +label.pinsize=({0} stellig) +button.ok=OK +button.cancel=Abbrechen +button.sign=Signieren +mimetype.desc.xml=XML-Dateien (*.xml) +mimetype.desc.txt=Textdateien (*.txt) +mimetype.desc.pdf=Adobe PDF-Dateien (*.pdf) +mimetype.desc.bin=Bin\u00E4rdateien (*.bin) +save.hashdatainput.prefix=Signaturdaten diff --git a/BKUCommonGUI/src/main/resources/images/logo.png b/BKUCommonGUI/src/main/resources/images/logo.png new file mode 100644 index 00000000..eee4be4f Binary files /dev/null and b/BKUCommonGUI/src/main/resources/images/logo.png differ diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java new file mode 100644 index 00000000..4dc1f8b3 --- /dev/null +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.gui; + +import javax.swing.JFrame; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * + * @author clemens + */ +public class BKUGUITest { + + @Ignore + public void testBKUGUI() { + JFrame testFrame = new JFrame("BKUGUITest"); + BKUGUI gui = new BKUGUI(); + gui.init(testFrame.getContentPane(), null); + BKUGUIWorker worker = new BKUGUIWorker(); + worker.init(gui); + testFrame.pack(); + testFrame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + testFrame.setVisible(true); + new Thread(worker).start(); + + while(true) ; + } + + @Test + public void dummyTest() { + } +} diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java new file mode 100644 index 00000000..50771216 --- /dev/null +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -0,0 +1,136 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.bku.gui; + +import at.gv.egiz.smcc.PINSpec; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Collections; + +/** + * + * @author clemens + */ +public class BKUGUIWorker implements Runnable { + + BKUGUIFacade gui; + + public void init(BKUGUIFacade gui) { + this.gui = gui; + } + + @Override + public void run() { + try { + + final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); + + + final ActionListener cancelListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("CANCEL EVENT OCCURED: " + e); + } + }; + ActionListener okListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + System.out.println("OK EVENT OCCURED: " + e); + } + }; + final ActionListener signListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("SIGN EVENT OCCURED: " + e); + } + }; + ActionListener hashdataListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("HASHDATA EVENT OCCURED: " + e); + ActionListener returnListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); + } + }; + HashDataInput signedRef = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_002".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + }; + gui.showHashDataInputDialog(Collections.singletonList(signedRef), returnListener, "return"); + } + }; + + + +// gui.showWelcomeDialog(); +// +// Thread.sleep(2000); + + gui.showInsertCardDialog(cancelListener, "cancel"); + + Thread.sleep(2000); + + gui.showCardNotSupportedDialog(cancelListener, "cancel"); + + Thread.sleep(2000); + +// PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); +// +// gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); +// +// Thread.sleep(2000); +// + +// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(2000); +// +// gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(2000); +//// +// gui.showErrorDialog("Testfehler occured", null, null); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog("Testfehler occured"); + + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } +} diff --git a/BKULocal/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/BKULocal/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch new file mode 100644 index 00000000..8ad2c6e2 --- /dev/null +++ b/BKULocal/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch @@ -0,0 +1,7 @@ + + + + + + + diff --git a/BKULocal/pom.xml b/BKULocal/pom.xml new file mode 100644 index 00000000..3f77752a --- /dev/null +++ b/BKULocal/pom.xml @@ -0,0 +1,79 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + BKULocal + war + BKU Local + 1.0-SNAPSHOT + + + + at.gv.egiz + STAL + 1.0-SNAPSHOT + + + at.gv.egiz + bkucommon + 1.0-SNAPSHOT + + + at.gv.egiz + smcc + 1.0-SNAPSHOT + + + at.gv.egiz + smccSTAL + 1.0-SNAPSHOT + + + org.springframework + spring-core + 2.5.5 + + + javax.servlet + servlet-api + 2.5 + provided + + + org.springframework + spring-web + 2.5.5 + + + commons-configuration + commons-configuration + 1.5 + + + commons-logging + commons-logging + + + org.springframework + spring-support + 2.0.8 + + + opensymphony + quartz + 1.5.0 + + + org.springframework + spring-tx + 2.5.5 + + + \ No newline at end of file diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/conf/ConfigurationUpdater.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/conf/ConfigurationUpdater.java new file mode 100644 index 00000000..3214f4bc --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/conf/ConfigurationUpdater.java @@ -0,0 +1,44 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.conf; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.scheduling.quartz.QuartzJobBean; + +public class ConfigurationUpdater extends QuartzJobBean { + private static Log log = LogFactory.getLog(ConfigurationUpdater.class); + private Configurator config; + + @Override + protected void executeInternal(JobExecutionContext arg0) + throws JobExecutionException { + log.trace("Checking config update"); + config.checkUpdate(); + } + + public Configurator getConfig() { + return config; + } + + public void setConfig(Configurator config) { + this.config = config; + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/conf/Configurator.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/conf/Configurator.java new file mode 100644 index 00000000..e9510101 --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/conf/Configurator.java @@ -0,0 +1,274 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.conf; + +import iaik.security.ecc.provider.ECCProvider; +import iaik.xml.crypto.XSecProvider; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.security.KeyStore; +import java.security.Provider; +import java.security.Security; +import java.security.cert.CertStore; +import java.security.cert.CertificateFactory; +import java.security.cert.CollectionCertStoreParameters; +import java.security.cert.PKIXBuilderParameters; +import java.security.cert.X509CertSelector; +import java.security.cert.X509Certificate; +import java.util.Enumeration; +import java.util.LinkedList; +import java.util.List; + +import javax.net.ssl.CertPathTrustManagerParameters; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.ManagerFactoryParameters; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; + +import org.apache.commons.configuration.ConfigurationException; +import org.apache.commons.configuration.XMLConfiguration; +import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider; +import at.gv.egiz.smcc.SWCard; +import at.gv.egiz.smcc.util.SMCCHelper; + +public class Configurator { + private Log log = LogFactory.getLog(Configurator.class); + private XMLConfiguration baseConfig; + private XMLConfiguration specialConfig; + private boolean autoSave = false; + + public Configurator() { + super(); + init(); + configure(); + } + + private void init() { + log.debug("Initializing configuration"); + + baseConfig = new XMLConfiguration(); + try { + baseConfig.load(getClass().getClassLoader().getResourceAsStream( + "./at/gv/egiz/bku/local/baseconfig.xml")); + log.debug("Successfully loaded base configuration"); + } catch (ConfigurationException e) { + log.error("Cannot load base configuration", e); + } + autoSave = baseConfig.getBoolean("OverrideConfigurationFile[@autosave]"); + try { + specialConfig = new XMLConfiguration(); + specialConfig.setFileName(baseConfig + .getString("OverrideConfigurationFile")); + specialConfig.load(); + } catch (Exception e) { + log.debug("Cannot get special configuration at: " + + baseConfig.getString("OverrideConfigurationFile") + ": " + e); + log.debug("Creating new special configuration"); + try { + specialConfig = new XMLConfiguration(baseConfig); + specialConfig.setFileName(baseConfig + .getString("OverrideConfigurationFile")); + specialConfig.save(); + } catch (ConfigurationException e1) { + log.error("Cannot load defaults " + e1); + } + } + specialConfig.setReloadingStrategy(new FileChangedReloadingStrategy()); + specialConfig.setAutoSave(autoSave); + } + + protected void configUrlConnections() { + HttpsURLConnection.setFollowRedirects(false); + HttpURLConnection.setFollowRedirects(false); + } + + protected KeyStore loadKeyStore(String fileName, String type, String password) { + KeyStore ks = null; + try { + ks = KeyStore.getInstance(type); + InputStream is = new FileInputStream(fileName); + if (is == null) { + log.warn("Cannot load keystore from: " + fileName); + } + ks.load(is, password.toCharArray()); + for (Enumeration alias = ks.aliases(); alias.hasMoreElements();) { + log.debug("Found keystore alias: " + alias.nextElement()); + } + } catch (Exception e) { + log.error("Cannot config keystore", e); + return null; + } + return ks; + } + + protected void configSSL() { + String trustStoreName = specialConfig.getString("SSL.trustStoreFile"); + String trustStoreType = specialConfig.getString("SSL.trustStoreType"); + String trustStorePass = specialConfig.getString("SSL.trustStorePass"); + String certStoreDirectory = specialConfig + .getString("SSL.certStoreDirectory"); + String keyStoreName = specialConfig.getString("SSL.keyStoreFile"); + String keyStoreType = specialConfig.getString("SSL.keyStoreType"); + String keyStorePass = specialConfig.getString("SSL.keyStorePass"); + + String caIncludeDir = specialConfig.getString("SSL.caIncludeDirectory"); + + KeyStore trustStore = loadKeyStore(trustStoreName, trustStoreType, + trustStorePass); + KeyStore keyStore = null; + if (keyStoreName != null) { + keyStore = loadKeyStore(keyStoreName, keyStoreType, keyStorePass); + } + + try { + PKIXBuilderParameters pkixParams = new PKIXBuilderParameters(trustStore, + new X509CertSelector()); + + if (certStoreDirectory != null) { + File dir = new File(certStoreDirectory); + if (dir.isDirectory()) { + List certCollection = new LinkedList(); + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + for (File f : dir.listFiles()) { + log.debug("adding " + f.getName()); + certCollection.add((X509Certificate) cf + .generateCertificate(new FileInputStream(f))); + } + CollectionCertStoreParameters csp = new CollectionCertStoreParameters( + certCollection); + CertStore cs = CertStore.getInstance("Collection", csp); + pkixParams.addCertStore(cs); + log.debug("Added collection certstore"); + } else { + log.error("CertstoreDirectory " + certStoreDirectory + + " is not a directory"); + } + } + + if (caIncludeDir != null) { + File dir = new File(caIncludeDir); + if (dir.exists() && dir.isDirectory()) { + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + try { + for (File f : dir.listFiles()) { + FileInputStream fis = new FileInputStream(f); + X509Certificate cert = (X509Certificate) cf + .generateCertificate(fis); + fis.close(); + log.debug("Adding trusted cert " + cert.getSubjectDN()); + trustStore.setCertificateEntry(cert.getSubjectDN().getName(), + cert); + f.delete(); + } + } finally { + trustStore.store(new FileOutputStream(trustStoreName), + trustStorePass.toCharArray()); + } + } + } + + pkixParams.setRevocationEnabled(specialConfig + .getBoolean("SSL.revocation")); + if (specialConfig.getBoolean("SSL.revocation")) { + System.setProperty("com.sun.security.enableCRLDP ", "true"); + Security.setProperty("ocsp.enable", "true"); + } + System.setProperty("com.sun.security.enableAIAcaIssuers", "true"); + log.debug("Setting revocation check to: " + + pkixParams.isRevocationEnabled()); + ManagerFactoryParameters trustParams = new CertPathTrustManagerParameters( + pkixParams); + TrustManagerFactory trustFab = TrustManagerFactory.getInstance("PKIX"); + trustFab.init(trustParams); + + KeyManager[] km = null; + SSLContext sslCtx = SSLContext.getInstance(specialConfig + .getString("SSL.sslProtocol")); + if (keyStore != null) { + KeyManagerFactory keyFab = KeyManagerFactory.getInstance("SunX509"); + keyFab.init(keyStore, keyStorePass.toCharArray()); + km = keyFab.getKeyManagers(); + } + sslCtx.init(km, trustFab.getTrustManagers(), null); + HttpsURLConnection.setDefaultSSLSocketFactory(sslCtx.getSocketFactory()); + log.info("Successfully configured ssl"); + } catch (Exception e) { + log.debug("Cannot init ssl", e); + } + } + + protected void configureProviders() { + log.debug("Registering security providers"); + ECCProvider.addAsProvider(false); + Security.addProvider(new STALProvider()); + XSecProvider.addAsProvider(false); + StringBuffer sb = new StringBuffer(); + sb.append("Following providers are now registered: "); + int i = 1; + for (Provider prov : Security.getProviders()) { + sb.append((i++) + ". : " + prov); + } + log.debug("Configured provider" + sb.toString()); + } + + protected void configureBKU() { + if (specialConfig.containsKey("BKU.useSWCard")) { + boolean useSWCard = specialConfig.getBoolean("BKU.useSWCard"); + log.info("Setting SW Card to: "+useSWCard); + SMCCHelper.setUseSWCard(useSWCard); + } + if (specialConfig.containsKey("BKU.SWCardDirectory")) { + //SWCard. + } + } + + public void configure() { + configureProviders(); + configSSL(); + configUrlConnections(); + configureBKU(); + + } + + public void checkUpdate() { + if (specialConfig.getReloadingStrategy().reloadingRequired()) { + log.info("Reloading configuration: " + specialConfig.getFileName()); + specialConfig.setAutoSave(false); + specialConfig.clear(); + try { + specialConfig.load(); + } catch (ConfigurationException e) { + log.fatal(e); + } + specialConfig.setAutoSave(specialConfig + .getBoolean("OverrideConfigurationFile[@autosave]")); + configure(); + specialConfig.getReloadingStrategy().reloadingPerformed(); + } + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/PINDialog.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/PINDialog.java new file mode 100644 index 00000000..5bc6bab5 --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/PINDialog.java @@ -0,0 +1,214 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.swing.JButton; +import javax.swing.JPasswordField; +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.PlainDocument; + +import at.gv.egiz.smcc.PINSpec; + +public class PINDialog extends javax.swing.JDialog implements ActionListener { + + // Variables declaration - do not modify + private javax.swing.JButton okButton; + private javax.swing.JButton cancelButton; + private javax.swing.JLabel label; + private javax.swing.JPasswordField password; + // End of variables declaration + + private PINSpec pinSpec; + private String pinString; + private boolean finished = false; + + class PinDocument extends PlainDocument { + private Pattern pattern; + + public PinDocument() { + pattern = Pattern.compile(pinSpec.getRexepPattern()); + } + + public void insertString(int offs, String str, AttributeSet a) + throws BadLocationException { + if (pinSpec.getMaxLength() >= (getLength() + str.length())) { + Matcher matcher = pattern.matcher(str); + if (matcher.matches()) { + super.insertString(offs, str, a); + } + } + okButton.setEnabled(getLength() >= pinSpec.getMinLength()); + } + + @Override + public void remove(int offs, int len) throws BadLocationException { + super.remove(offs, len); + okButton.setEnabled(getLength() >= pinSpec.getMinLength()); + } + } + + public PINDialog() { + } + + private synchronized void finished(boolean ok) { + if (ok) { + pinString = password.getText(); + } else { + pinString = null; + } + finished = true; + notifyAll(); + } + + public synchronized void waitFinished() { + while (!finished) { + try { + wait(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public String getPIN() { + return pinString; + } + + /** Creates new form NewJDialog */ + public PINDialog(java.awt.Frame parent, boolean modal, PINSpec pinSpec, + int retries) { + super(parent, modal); + this.pinSpec = pinSpec; + initComponents(); + } + + private void initComponents() { + okButton = new javax.swing.JButton(); + cancelButton = new javax.swing.JButton(); + password = new javax.swing.JPasswordField(); + label = new javax.swing.JLabel(); + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + + setTitle("PIN Dialog"); // NOI18N + setName("Form"); // NOI18N + + okButton.setText("OK"); // NOI18N + okButton.setName("okButton"); // NOI18N + okButton.setEnabled(false); + okButton.addActionListener(this); + + cancelButton.setText("Cancel"); // NOI18N + cancelButton.setName("cancelButton"); // NOI18N + cancelButton.addActionListener(this); + + password.setText(""); // NOI18N + password.setName("password"); // NOI18N + password.addActionListener(this); + password.setDocument(new PinDocument()); + + label.setText("PIN: "); // NOI18N + label.setName("jLabel1"); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout( + getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup(layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + layout.createSequentialGroup().addContainerGap().addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + layout.createSequentialGroup().addComponent(label, + javax.swing.GroupLayout.PREFERRED_SIZE, 61, + javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.RELATED, + javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(password, + javax.swing.GroupLayout.PREFERRED_SIZE, 127, + javax.swing.GroupLayout.PREFERRED_SIZE)).addGroup( + javax.swing.GroupLayout.Alignment.TRAILING, + layout.createSequentialGroup().addComponent(cancelButton) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(okButton))).addContainerGap())); + layout.setVerticalGroup(layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + layout.createSequentialGroup().addContainerGap().addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.BASELINE).addComponent(label, + javax.swing.GroupLayout.PREFERRED_SIZE, 33, + javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(password, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, + Short.MAX_VALUE).addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.BASELINE).addComponent( + okButton).addComponent(cancelButton)).addContainerGap())); + + pack(); + } + + /** + * @param args + * the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + PINDialog dialog = new PINDialog(new javax.swing.JFrame(), true, + new PINSpec(1, 5, "[0-9]*", "Hansi"), 10); + dialog.setResizable(false); + dialog.addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent e) { + System.exit(0); + } + }); + dialog.setVisible(true); + } + }); + } + + @Override + public void actionPerformed(ActionEvent e) { + if (e.getSource() instanceof JButton) { + JButton pressed = (JButton) e.getSource(); + if (pressed.getName().equals("okButton")) { + finished(true); + } else if (pressed.getName().equals("cancelButton")) { + finished(false); + } + } else if (e.getSource() instanceof JPasswordField) { + JPasswordField pwf = (JPasswordField) e.getSource(); + if (pwf.getName().equals("password")) { + if (password.getPassword().length >= pinSpec.getMinLength()) { + finished(true); + } + } + } + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/QuitRequestHandler.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/QuitRequestHandler.java new file mode 100644 index 00000000..5596b7bb --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/QuitRequestHandler.java @@ -0,0 +1,41 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import at.gv.egiz.bku.smccstal.AbstractRequestHandler; +import at.gv.egiz.bku.smccstal.SMCCSTALRequestHandler; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; + +public class QuitRequestHandler extends AbstractRequestHandler { + + @Override + public STALResponse handleRequest(STALRequest request) { + return null; + } + + @Override + public boolean requireCard() { + return false; + } + + @Override + public SMCCSTALRequestHandler newInstance() { + return this; + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java new file mode 100644 index 00000000..26ec2aa8 --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java @@ -0,0 +1,95 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Locale; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.gui.BKUGUIFacade; +import at.gv.egiz.bku.local.ui.TrayIconDialog; +import at.gv.egiz.bku.smccstal.AbstractRequestHandler; +import at.gv.egiz.bku.smccstal.AbstractSMCCSTAL; +import at.gv.egiz.bku.smccstal.STALMessageConsumer; +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.util.SMCCHelper; +import at.gv.egiz.stal.QuitRequest; + +public class SMCCSTAL extends AbstractSMCCSTAL implements STALMessageConsumer { + private static Log log = LogFactory.getLog(SMCCSTAL.class); + + protected PINProvider pinProvider = new SwingPINProvider(); + protected SwingInsertCardDialog insertCard = new SwingInsertCardDialog(); + private boolean canceled = false; + + static { + addRequestHandler(QuitRequest.class, new QuitRequestHandler()); + } + + public SMCCSTAL() { + AbstractRequestHandler.setMessageConsumer(this); + } + + /** + * + * @return if the user canceled + */ + protected boolean waitForCard() { + canceled = false; + while ((smccHelper.getResultCode() != SMCCHelper.CARD_FOUND) && (!canceled)) { + insertCard.setVisible(true); + insertCard.setAlwaysOnTop(true); + insertCard.addCanceledListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + canceled = true; + } + }); + try { + smccHelper.update(1000); + } catch (Exception ex) { + log.info(ex); + } + } + insertCard.setVisible(false); + signatureCard = smccHelper.getSignatureCard(locale); + return canceled; + } + + @Override + public void setLocale(Locale locale) { + super.setLocale(locale); + if (pinProvider instanceof SwingPINProvider) { + ((SwingPINProvider) pinProvider).setLocale(locale); + } + } + + @Override + public void consumeNewSTALMessage(String captionId, String messageId) { + TrayIconDialog.getInstance().displayInfo(captionId, messageId); + } + + @Override + protected BKUGUIFacade getGUI() { + // TODO Auto-generated method stub + //FIXME + return null; + } +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java new file mode 100644 index 00000000..014d884a --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java @@ -0,0 +1,27 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALFactory; + +public class SMCCSTALFactory implements STALFactory { + @Override + public STAL createSTAL() { + return new SMCCSTAL(); + } +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingInsertCardDialog.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingInsertCardDialog.java new file mode 100644 index 00000000..eb76f2f2 --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingInsertCardDialog.java @@ -0,0 +1,147 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Locale; +import java.util.ResourceBundle; + +import javax.swing.ImageIcon; +import javax.swing.JDialog; + +import at.gv.egiz.bku.utils.StreamUtil; + +public class SwingInsertCardDialog extends JDialog { + + private javax.swing.JButton cancelButton; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private Locale locale = Locale.getDefault(); + + public SwingInsertCardDialog() { + super((java.awt.Frame) null, false); + initComponents(); + } + + public void setLocale(Locale locale) { + this.locale = locale; + } + + private void initComponents() { + ResourceBundle rb = ResourceBundle.getBundle( + "at/gv/egiz/bku/local/Userdialog", locale); + setTitle(rb.getString("Insert.Header")); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + cancelButton = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); + setName("Form"); // NOI18N + setUndecorated(true); + + jLabel1.setFont(new Font("Tahoma", Font.BOLD, 14)); + jLabel1.setText(rb.getString("Insert.Text")); // NOI18N + jLabel1.setName("text"); // NOI18N + + ByteArrayOutputStream os = new ByteArrayOutputStream(); + InputStream is = getClass().getClassLoader().getResourceAsStream( + "at/gv/egiz/bku/local/logo.png"); + try { + StreamUtil.copyStream(is, os); + jLabel2.setIcon(new ImageIcon(os.toByteArray())); // NOI18N + } catch (IOException e) { + jLabel2.setText("Chipperling image missing"); // NOI18N + } + jLabel2.setName("jLabel2"); // NOI18N + cancelButton.setText(rb.getString("Insert.Button.Cancel")); // NOI18N + cancelButton.setName("jButton1"); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout( + getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup(layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + layout.createSequentialGroup().addContainerGap().addComponent(jLabel2) + .addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.TRAILING).addGroup( + layout.createSequentialGroup().addGap(35, 35, 35) + .addComponent(jLabel1, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE)).addGroup( + layout.createSequentialGroup().addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cancelButton))).addGap(29, 29, 29))); + layout.setVerticalGroup(layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + javax.swing.GroupLayout.Alignment.TRAILING, + layout.createSequentialGroup().addContainerGap().addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.TRAILING).addComponent( + jLabel2).addGroup( + layout.createSequentialGroup().addComponent(jLabel1, + javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE) + .addGap(35, 35, 35).addComponent(cancelButton).addGap(9, 9, + 9))).addContainerGap())); + + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Dimension frameSize = getSize(); + if (frameSize.height > screenSize.height) { + frameSize.height = screenSize.height; + } + if (frameSize.width > screenSize.width) { + frameSize.width = screenSize.width; + } + setLocation((screenSize.width - frameSize.width) / 2, + (screenSize.height - frameSize.height) / 2); + setUndecorated(false); + pack(); + } + + public void addCanceledListener(ActionListener al) { + cancelButton.addActionListener(al); + } + + /** + * @param args + * the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + SwingInsertCardDialog dialog = new SwingInsertCardDialog(); + dialog.addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent e) { + System.exit(0); + } + }); + // + } + }); + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPINProvider.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPINProvider.java new file mode 100644 index 00000000..7d36e68e --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPINProvider.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import java.util.Locale; + +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.PINSpec; + +public class SwingPINProvider implements PINProvider { + + private Locale locale = Locale.getDefault(); + SwingPinDialog dialog; + + public SwingPINProvider() { + this.locale = Locale.getDefault(); + + } + + public Locale getLocale() { + return locale; + } + + public void setLocale(Locale locale) { + this.locale = locale; + } + + @Override + public String providePIN(PINSpec pinSpec, int retries) { + dialog = new SwingPinDialog(null, false); + dialog.setResizable(false); + dialog.setRetries(retries); + dialog.setPinSpec(pinSpec); + dialog.initComponents(); + dialog.setVisible(true); + dialog.requestFocus(); + dialog.setAlwaysOnTop(true); + dialog.waitFinished(); + dialog.dispose(); + return dialog.getPIN(); + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPinDialog.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPinDialog.java new file mode 100644 index 00000000..3e91972c --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SwingPinDialog.java @@ -0,0 +1,265 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.text.MessageFormat; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JPasswordField; +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.PlainDocument; + +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.smcc.PINSpec; + +public class SwingPinDialog extends javax.swing.JDialog implements + ActionListener { + + private javax.swing.JButton okButton; + private javax.swing.JButton cancelButton; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JPasswordField password; + + private PINSpec pinSpec; + private String pinString; + private boolean finished = false; + private int retries = -1; + private Locale locale = Locale.getDefault(); + private boolean setUp = false; + + class PinDocument extends PlainDocument { + private Pattern pattern; + + public PinDocument() { + if ((pinSpec != null) && (pinSpec.getRexepPattern() != null)) { + pattern = Pattern.compile(pinSpec.getRexepPattern()); + } else { + pattern = Pattern.compile("."); + } + } + + public void insertString(int offs, String str, AttributeSet a) + throws BadLocationException { + if (pinSpec.getMaxLength() >= (getLength() + str.length())) { + Matcher matcher = pattern.matcher(str); + if (matcher.matches()) { + super.insertString(offs, str, a); + } + } + okButton.setEnabled(getLength() >= pinSpec.getMinLength()); + } + + @Override + public void remove(int offs, int len) throws BadLocationException { + super.remove(offs, len); + okButton.setEnabled(getLength() >= pinSpec.getMinLength()); + } + } + + /** + * Make sure to call initComponents + * + * @param parent + * @param modal + */ + public SwingPinDialog(java.awt.Frame parent, boolean modal) { + super(parent, modal); + } + + public void setLocale(Locale locale) { + this.locale = locale; + } + + public void setPinSpec(PINSpec pinSpec) { + this.pinSpec = pinSpec; + } + + public void setRetries(int retries) { + this.retries = retries; + } + + public void initComponents() { + ResourceBundle rb = ResourceBundle.getBundle( + "at/gv/egiz/bku/local/Userdialog", locale); + okButton = new javax.swing.JButton(); + cancelButton = new javax.swing.JButton(); + password = new javax.swing.JPasswordField(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + + setTitle(rb.getString("Pin.Header")); + setName("Form"); + setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); + + okButton.setText(rb.getString("Pin.Button.OK")); + okButton.setName("okButton"); + okButton.setEnabled(false); + okButton.addActionListener(this); + + cancelButton.setText(rb.getString("Pin.Button.Cancel")); + cancelButton.setName("cancelButton"); + cancelButton.addActionListener(this); + + password.setText(""); + password.setDocument(new PinDocument()); + password.setName("password"); + password.addActionListener(this); + password.setDocument(new PinDocument()); + password.setRequestFocusEnabled(true); + password.requestFocus(); + + jLabel1.setFont(new Font("Tahoma", Font.BOLD, 14)); + String text = null; + Object[] args; + if (retries > 0) { + text = rb.getString("Pin.Text.Retries"); + args = new Object[2]; + args[0] = pinSpec.getLocalizedName(); + args[1] = new Integer(retries); + } else { + text = rb.getString("Pin.Text.NoRetries"); + args = new Object[1]; + args[0] = pinSpec.getLocalizedName(); + } + text = MessageFormat.format(text, args); + jLabel1.setText(text); // NOI18N + jLabel1.setName("jLabel1"); // NOI18N + + ByteArrayOutputStream os = new ByteArrayOutputStream(); + InputStream is = getClass().getClassLoader().getResourceAsStream( + "at/gv/egiz/bku/local/logo.png"); + try { + StreamUtil.copyStream(is, os); + jLabel2.setIcon(new ImageIcon(os.toByteArray())); // NOI18N + } catch (Exception e) { + jLabel2.setText("Chipperling image missing"); // NOI18N + } + jLabel2.setName("jLabel2"); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout( + getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup(layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + layout.createSequentialGroup().addContainerGap().addComponent(jLabel2) + .addGap(73, 73, 73).addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addComponent( + jLabel1).addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(password, + javax.swing.GroupLayout.Alignment.LEADING) + .addGroup( + javax.swing.GroupLayout.Alignment.LEADING, + layout.createSequentialGroup().addComponent( + cancelButton).addGap(18, 18, 18).addComponent( + okButton)))).addContainerGap(31, + Short.MAX_VALUE))); + layout.setVerticalGroup(layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING).addGroup( + layout.createSequentialGroup().addContainerGap().addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2).addGroup( + layout.createSequentialGroup().addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel1, + javax.swing.GroupLayout.PREFERRED_SIZE, 33, + javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, + 18, 18).addComponent(password, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE).addGap(20, + 20, 20).addGroup( + layout.createParallelGroup( + javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(cancelButton).addComponent( + okButton)))).addGap(36, 36, 36))); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Dimension frameSize = getSize(); + if (frameSize.height > screenSize.height) { + frameSize.height = screenSize.height; + } + if (frameSize.width > screenSize.width) { + frameSize.width = screenSize.width; + } + setLocation((screenSize.width - frameSize.width) / 2, + (screenSize.height - frameSize.height) / 2); + setUndecorated(false); + pack(); + } + + public String getPIN() { + return pinString; + } + + private synchronized void finished(boolean ok) { + if (ok) { + pinString = password.getText(); + } else { + pinString = null; + } + finished = true; + notifyAll(); + } + + public synchronized void waitFinished() { + while (!finished) { + try { + wait(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + @Override + public void actionPerformed(ActionEvent e) { + if (e.getSource() instanceof JButton) { + JButton pressed = (JButton) e.getSource(); + if (pressed.getName().equals("okButton")) { + finished(true); + } else if (pressed.getName().equals("cancelButton")) { + finished(false); + } + } else if (e.getSource() instanceof JPasswordField) { + JPasswordField pwf = (JPasswordField) e.getSource(); + if (pwf.getName().equals("password")) { + if (password.getPassword().length >= pinSpec.getMinLength()) { + finished(true); + } + } + } + } + +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java new file mode 100644 index 00000000..8529949d --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java @@ -0,0 +1,100 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.webapp; + +import java.io.IOException; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.web.HttpRequestHandler; + +import at.gv.egiz.bku.binding.BindingProcessorManager; +import at.gv.egiz.bku.binding.HTTPBindingProcessor; +import at.gv.egiz.bku.binding.HttpUtil; +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.org.apache.tomcat.util.http.AcceptLanguage; + +public abstract class BKURequestHandler extends HttpServlet { + + public final static String ENCODING = "UTF-8"; + + protected Log log = LogFactory.getLog(BKURequestHandler.class); + + protected abstract BindingProcessorManager getBindingProcessorManager(); + + protected void doPost(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, java.io.IOException { + log.debug("Got new request"); + String lang = req.getHeader("Accept-Language"); + Locale locale = AcceptLanguage.getLocale(lang); + log.debug("Using locale: "+locale); + HTTPBindingProcessor bindingProcessor; + if (req.isSecure()) { + bindingProcessor = (HTTPBindingProcessor) getBindingProcessorManager() + .createBindingProcessor("https", null, locale); + } else { + bindingProcessor = (HTTPBindingProcessor) getBindingProcessorManager() + .createBindingProcessor("http", null, locale); + } + Map headerMap = new HashMap(); + for (Enumeration headerName = req.getHeaderNames(); headerName + .hasMoreElements();) { + String header = headerName.nextElement(); + if (header != null) { + headerMap.put(header, req.getHeader(header)); + } + } + headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, req.getContentType()+";"+req.getCharacterEncoding()); + bindingProcessor.setHTTPHeaders(headerMap); + bindingProcessor.consumeRequestStream(req.getInputStream()); + + // fixxme just for testing + bindingProcessor.run(); + if (bindingProcessor.getRedirectURL() != null) { + resp.sendRedirect(bindingProcessor.getRedirectURL()); + return; + } + resp.setStatus(bindingProcessor.getResponseCode()); + for (Iterator it = bindingProcessor.getResponseHeaders().keySet() + .iterator(); it.hasNext();) { + String header = it.next(); + resp.setHeader(header, bindingProcessor.getResponseHeaders().get(header)); + } + resp.setContentType(bindingProcessor.getResultContentType()); + resp.setCharacterEncoding(ENCODING); + bindingProcessor.writeResultTo(resp.getOutputStream(), ENCODING); + req.getInputStream().close(); + resp.getOutputStream().flush(); + resp.getOutputStream().close(); + log.debug("Finished Request"); + } + + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, java.io.IOException { + doPost(req, resp); + } +} diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/SpringBKUServlet.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/SpringBKUServlet.java new file mode 100644 index 00000000..c573e52f --- /dev/null +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/SpringBKUServlet.java @@ -0,0 +1,30 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.webapp; + +import at.gv.egiz.bku.binding.BindingProcessorManager; + +public class SpringBKUServlet extends BKURequestHandler { + + public final static String BEAN_NAME="bindingProcessorManager"; + + @Override + protected BindingProcessorManager getBindingProcessorManager() { + return (BindingProcessorManager) getServletContext().getAttribute(BEAN_NAME); + } + +} diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/Userdialog.properties b/BKULocal/src/main/resources/at/gv/egiz/bku/local/Userdialog.properties new file mode 100644 index 00000000..9db6f100 --- /dev/null +++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/Userdialog.properties @@ -0,0 +1,27 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#------- Insert Card Dialog -------# +Insert.Header = Citizen Card Required +Insert.Button.Cancel = Cancel +Insert.Text = Please insert your Citizen Card! + + +#------- PIN Dialog -------# +Pin.Header = Please Enter PIN +Pin.Button.OK = OK +Pin.Button.Cancel = Cancel +Pin.Text.Retries = Please enter {0}.

{1} retries left. +Pin.Text.NoRetries = Please enter {0}. \ No newline at end of file diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/baseconfig.xml b/BKULocal/src/main/resources/at/gv/egiz/bku/local/baseconfig.xml new file mode 100644 index 00000000..792bbccc --- /dev/null +++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/baseconfig.xml @@ -0,0 +1,38 @@ + + + + + + ${sys:user.home}/.bku/conf/bkuconfig.xml + + + true + TLS + + + + \ No newline at end of file diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/logo.png b/BKULocal/src/main/resources/at/gv/egiz/bku/local/logo.png new file mode 100644 index 00000000..eee4be4f Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/local/logo.png differ diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/truststore.jks b/BKULocal/src/main/resources/at/gv/egiz/bku/local/truststore.jks new file mode 100644 index 00000000..c773f037 Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/local/truststore.jks differ diff --git a/BKULocal/src/main/resources/log4j.properties b/BKULocal/src/main/resources/log4j.properties new file mode 100644 index 00000000..49d763f8 --- /dev/null +++ b/BKULocal/src/main/resources/log4j.properties @@ -0,0 +1,31 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# loglever DEBUG, appender STDOUT +log4j.rootLogger=TRACE, STDOUT, file + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p |%d | %t | %c %x- %m%n + +### FILE appender +log4j.appender.file=org.apache.log4j.DailyRollingFileAppender +log4j.appender.file.datePattern='.'yyyy-MM-dd +log4j.appender.file.File=${user.home}/.bku/logs/bku.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/BKULocal/src/main/webapp/META-INF/MANIFEST.MF b/BKULocal/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/BKULocal/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml new file mode 100644 index 00000000..c0ffc927 --- /dev/null +++ b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + \ No newline at end of file diff --git a/BKULocal/src/main/webapp/WEB-INF/web.xml b/BKULocal/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..64f9a581 --- /dev/null +++ b/BKULocal/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,57 @@ + + + + + http-security-layer-request + + + + contextConfigLocation + /WEB-INF/applicationContext.xml + + + + org.springframework.web.context.ContextLoaderListener + + + + + + + BKUServlet + at.gv.egiz.bku.local.webapp.SpringBKUServlet + + + BKUServlet + /http-security-layer-request + + + BKUServlet + /https-security-layer-request + + + + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + \ No newline at end of file diff --git a/BKULocal/src/test/java/ConfigTest.java b/BKULocal/src/test/java/ConfigTest.java new file mode 100644 index 00000000..558d1c47 --- /dev/null +++ b/BKULocal/src/test/java/ConfigTest.java @@ -0,0 +1,49 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +import java.net.URL; + +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.ConfigurationException; +import org.apache.commons.configuration.ConfigurationFactory; +import org.junit.Ignore; + +@Ignore +public class ConfigTest { + + + private void testConfig() throws ConfigurationException { + ConfigurationFactory factory = new ConfigurationFactory(); + URL configURL = getClass().getResource("/config.xml"); + factory.setConfigurationURL(configURL); + Configuration config = factory.getConfiguration(); + System.out.println("-------->: "+config.getInt("hans")); + } + + /** + * @param args + */ + public static void main(String[] args) { + ConfigTest ct = new ConfigTest(); + try { + ct.testConfig(); + } catch (ConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + +} diff --git a/BKULocal/src/test/java/JustASandbox.java b/BKULocal/src/test/java/JustASandbox.java new file mode 100644 index 00000000..b151df92 --- /dev/null +++ b/BKULocal/src/test/java/JustASandbox.java @@ -0,0 +1,78 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; + +import javax.net.ssl.HttpsURLConnection; + +import org.junit.Ignore; + +import at.gv.egiz.bku.local.conf.Configurator; +import at.gv.egiz.bku.local.stal.SMCCSTALFactory; +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.SignRequest; +import at.gv.egiz.stal.SignResponse; + +@Ignore +public class JustASandbox { + + /** + * @param args + * @throws IOException + */ + public static void main(String[] args) throws IOException { + + Configurator cfg = new Configurator(); + URL url = new URL("https://demo.egiz.gv.at"); + HttpsURLConnection uc = (HttpsURLConnection) url.openConnection(); + uc.connect(); + System.exit(-1); + + InfoboxReadRequest req = new InfoboxReadRequest(); + req.setInfoboxIdentifier("SecureSignatureKeypair"); + + ByteArrayOutputStream os = new ByteArrayOutputStream(); + InputStream is = JustASandbox.class.getClassLoader().getResourceAsStream("at/gv/egiz/bku/local/stal/sigInfo.xml"); + StreamUtil.copyStream(is, os); + SignRequest sr = new SignRequest(); + sr.setSignedInfo(os.toByteArray()); + sr.setKeyIdentifier("SecureSignatureKeypair"); //os.toByteArray(), "SecureSignatureKeypair", null); + STAL stal = (new SMCCSTALFactory()).createSTAL(); + + List reqList = new ArrayList(2); + reqList.add(req); + reqList.add(sr); + + List resp = stal.handleRequest(reqList); + System.out.println(resp.get(0)); + System.out.println(resp.get(1)); + FileOutputStream fos = new FileOutputStream("c:/tmp/seq_now.der"); + SignResponse sir = (SignResponse) resp.get(1); + fos.write(sir.getSignatureValue()); + fos.close(); + } + +} diff --git a/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java b/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java new file mode 100644 index 00000000..51e7ff7d --- /dev/null +++ b/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java @@ -0,0 +1,55 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.stal; + +import java.io.ByteArrayOutputStream; +import java.util.ArrayList; +import java.util.List; + +import org.junit.Ignore; + +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.SignRequest; + +@Ignore +public class TestSignRequest { + + public void test() throws Exception { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + StreamUtil.copyStream(getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/local/stal/sigInfo.xml"), os); + byte[] signedInfo = os.toByteArray(); + SignRequest sr = new SignRequest(); + sr.setSignedInfo(signedInfo); + sr.setKeyIdentifier(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR.getKeyboxName()); + List reqList = new ArrayList(1); + reqList.add(sr); + System.out.println((new SMCCSTALFactory()).createSTAL().handleRequest(reqList)); + } + + public static void main(String[] args) { + TestSignRequest tsr = new TestSignRequest(); + try { + tsr.test(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + +} diff --git a/BKULocal/src/test/resources/at/gv/egiz/bku/local/stal/sigInfo.xml b/BKULocal/src/test/resources/at/gv/egiz/bku/local/stal/sigInfo.xml new file mode 100644 index 00000000..623a78bc --- /dev/null +++ b/BKULocal/src/test/resources/at/gv/egiz/bku/local/stal/sigInfo.xml @@ -0,0 +1,79 @@ + + + + + + + <xsl:value-of select="/xa:Antrag/xa:Titel"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+

Absender/in
Vorname + +
Familienname + + +
Geburtsdatum + +
Geburtsort + +
E-Mail zur Kontaktaufnahme + +
Dieser Antrag ergeht an:
Adressat + +
Hauptwohnsitz des Antragsstellers (laut ZMR):
Strasse + +
Hausnummer + + + / + + / +
Postleitzahl + +
Ort + +
Staat + +
GPYZB80vaYfGObhjlfu4lLLpAHs=
8DWtjO0ki1U/lxn+Y34We6GsfxU=
\ No newline at end of file diff --git a/BKUOnline/catalog.xml b/BKUOnline/catalog.xml new file mode 100644 index 00000000..38c98894 --- /dev/null +++ b/BKUOnline/catalog.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/BKUOnline/nb-configuration.xml b/BKUOnline/nb-configuration.xml new file mode 100644 index 00000000..4bfb3c58 --- /dev/null +++ b/BKUOnline/nb-configuration.xml @@ -0,0 +1,15 @@ + + +This file contains additional configuration written by modules in the NetBeans IDE. +The configuration is intended to be shared among all the users of project and +therefore it is assumed to be part of version control checkout. +Without this configuration present, some functionality in the IDE may be limited or fail altogether. + + + + + src/main/webapp/WEB-INF/applicationContext.xml + + + + diff --git a/BKUOnline/pom.xml b/BKUOnline/pom.xml new file mode 100644 index 00000000..dacdbaf5 --- /dev/null +++ b/BKUOnline/pom.xml @@ -0,0 +1,120 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + BKUOnline + war + BKU Online + 1.0-SNAPSHOT + + + at.gv.egiz + bkucommon + 1.0-SNAPSHOT + + + commons-logging + commons-logging + + + org.springframework + spring-core + 2.5.5 + + + javax.servlet + servlet-api + 2.5 + provided + + + org.springframework + spring-web + 2.5.5 + + + at.gv.egiz + STALService + 1.0-SNAPSHOT + compile + + + + com.sun.xml.ws + + jaxws-rt + 2.1.4 + + + + + Tomcat60 + + + + + maven-dependency-plugin + + + copyapplet + + copy + + + + + at.gv.egiz + BKUApplet + 1.0-SNAPSHOT + + + commons-logging + commons-logging + + + ${project.build.directory}/${project.build.finalName}/applet + + + + + + + + diff --git a/BKUOnline/private/cache/retriever/catalog.xml b/BKUOnline/private/cache/retriever/catalog.xml new file mode 100644 index 00000000..c40b0d50 --- /dev/null +++ b/BKUOnline/private/cache/retriever/catalog.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd b/BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd new file mode 100644 index 00000000..f9a884c0 --- /dev/null +++ b/BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd @@ -0,0 +1,362 @@ + + + + Schema for JAXB 2.0 binding declarations. + + + +Model group that represents a binding declaration. Each new binding +declaration added to the jaxb namespace that is not restricted to +globalBindings should be added as a child element to this model group. + + + + + + + + + + + + + + + + + +Used to specify the version of the binding schema on the schema element for +inline annotations or jaxb:bindings for external binding. + + + + +Attributes used for property customization. The attribute group can be +referenced either from the globalBindings declaration or from the +property declaration. The following defaults are defined by the JAXB +specification in global scope only. Thus they apply when the +propertyAttributes group is referenced from the globalBindings declaration +but not when referenced from the property declaration. + collectionType a class that implements java.util.List. + fixedAttributeAsConstantProperty false + enableFailFastCheck false + generateIsSetMethod false + optionalProperty wrapper + generateElementProperty false + attachmentRef default + + + + + + + + + + + + + + + + + + + + + + + + + + + Customize XMLNames to Java id mapping + + + + + + + + + + Customization values defined in global scope. + + + + + + allows extension binding declarations to be specified. + + + + + + + + + + + + + + + + + + + + + + + Customization values with schema scope + + + + + + + + + Customize interface and implementation class. + + + + + + Java class name without package prefix. + + + Implementation class name including package prefix. + + + Default value derived from [jaxb:globalBindings]@generateValueClass. + + + + + Customize property. + + + + + + + + + + + Data type conversions; overriding builtins + + + name of the java type to which xml type is to be bound. + + + xml type to which java datatype has to be bound.Must be present when javaType is scoped to globalBindings + + + + + +If true, the parsMethod and printMethod must reference a method +signtature that has a second parameter of type NamespaceContext. + + + + + + Bind to a type safe enumeration class. + + + + + + + + + + + Enumeration member name in a type safe enumeration class. + + + + + + + + + + + + + + + + + +The name attribute for [baseType] enables more precise control over the actual base type for a JAXB property. This customization enables specifying a more general base type than the property's default base type. The name attribute value must be a fully qualified Java class name. Additionally, this Java class must be a super interface/class of the default Java base type for the property. When the default base type is a primitive type, consider the default Java base type to be the Java wrapper class of that primitive type.This customization is useful to enable simple type substitution for a JAXB property representing with too restrictive of a default base type. + + + + + + + + + + + + + + Treate underscore in XML Name to Java identifier mapping. + + + + + + + +XML types or types derived from them which have enumeration facet(s) which are be mapped to typesafeEnumClass by default. The following types cannot be specified in this list: "xsd:QName", "xsd:base64Binary", "xsd:hexBinary", "xsd:date", "xsd:time", "xsd:dateTime", "xsd:duration","xsd:gDay", "xsd:gMonth", "xsd:Year", "xsd:gMonthDay", "xsd:YearMonth", "xsd:ID", "xsd:IDREF", "xsd:NOTATION" + + + + + Used to customize how to handle name collisions. + + + + + + + + Placeholder type to indicate Legal Java identifier. + + + + Rule to transform an Xml name into another Xml name + + prepend the string to QName. + + + Append the string to QName. + + + + Allows transforming an xml name into another xml name. Use case UDDI 2.0 schema. + + + Mapping rule for type definitions. + + + Mapping rule for elements + + + Mapping rule for model group + + + Mapping rule for class names generated for an anonymous type. + + + + + +A binding compiler only processes this attribute when it occurs on an +an instance of xs:schema element. The value of this attribute is a +whitespace-separated list of namespace prefixes. The namespace bound +to each of the prefixes is designated as a customization declaration +namespace. + + + + + + +Binding declaration(s) for a remote schema. +If attribute node is set, the binding declaraions +are associated with part of the remote schema +designated by schemaLocation attribute. The node +attribute identifies the node in the remote schema +to associate the binding declaration(s) with. + + + + + + + + + + + +Location of the remote schema to associate binding declarations with. + + + + +The value of the string is an XPATH 1.0 compliant string that +resolves to a node in a remote schema to associate +binding declarations with. The remote schema is specified +by the schemaLocation attribute occuring in the current +element or in a parent of this element. + + + + +Used to indicate the version of binding declarations. Only valid on root level bindings element. Either this or "jaxb:version" attribute but not both may be specified. + + + + +Used to indicate the version of binding declarations. Only valid on root level bindings element. Either this attribute or "version" attribute but not both may be specified. + + + + + + + + + + + + + + + + + + + Specify DOM API to bind to JAXB property to. + + + + + Disable MTOM/XOP encoding for this binary data. Annotation can be placed on a type defintion that derives from a W3C XSD binary data type or on an element that has a type that is or derives from a W3C XSD binary data type. + + + + + + + + + diff --git a/BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd b/BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd new file mode 100644 index 00000000..2e9a2729 --- /dev/null +++ b/BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd @@ -0,0 +1,2534 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]> + + + + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + + + + + + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part + + + + + The simpleType element and all of its members are defined + towards the end of this schema document + + + + + + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + + + + + + + + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + + + + + + + + + + + + + This type is extended by all types which allow annotation + other than <schema> itself + + + + + + + + + + + + + + + + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension. + + + + + + + + + + + + + This group is for the + elements which can self-redefine (see <redefine> below). + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction} + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction, list, union} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for maxOccurs + + + + + + + + + + + + for all particles + + + + + + + for element, group and attributeGroup, + which both define and reference + + + + + + + + 'complexType' uses this + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This branch is short for + <complexContent> + <restriction base="xs:anyType"> + ... + </restriction> + </complexContent> + + + + + + + + + + + + + + + Will be restricted to required or forbidden + + + + + + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overrides any setting on complexType parent. + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + No typeDefParticle group reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {substitution, extension, + restriction} + + + + + + + + + + + + + + + + + + + + + + + + + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for explicit groups, named top-level groups and + group references + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for the three kinds of group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint + + + + + + + + + + restricted max/min + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only elements allowed inside + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute' + + + + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in selectors + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in fields + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + + + + + + + + + + + + + + + + + + + + + + + + + + + The three kinds of identity constraints, all with + type of or derived from 'keybase'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + A public identifier, per ISO 8879 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + notations for use within XML Schema schemas + + + + + + + + + Not the real urType, but as close an approximation as we can + get in the XML representation + + + + + + + + + + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + + + + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + + + + + + + + + + Now the derived primitive types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 7 from the XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 5 from the XML spec + + + + + + + + + + + + + + + pattern matches production 4 from the Namespaces in XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + #all or (possibly empty) subset of {restriction, union, list} + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Can be restricted to required or forbidden + + + + + + + + + + + + + + + + + + Required at the top level + + + + + + + + + + + + + + + + + + + Forbidden when nested + + + + + + + + + + + + + + + + + + + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + base attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + + + memberTypes attribute must be non-empty or there must be + at least one simpleType child + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BKUOnline/src/main/custom-binding/stalservice-custom.xml b/BKUOnline/src/main/custom-binding/stalservice-custom.xml new file mode 100644 index 00000000..384b04f7 --- /dev/null +++ b/BKUOnline/src/main/custom-binding/stalservice-custom.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + true + false + + + + + + + Fetch the next request. + + + + + + + true + false + + + + + + Fetch the signed references corresponding to the previous SignatureRequest. + + + + + + + true + false + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BKUOnline/src/main/custom-binding/staltypes-custom.xml b/BKUOnline/src/main/custom-binding/staltypes-custom.xml new file mode 100644 index 00000000..2ea42082 --- /dev/null +++ b/BKUOnline/src/main/custom-binding/staltypes-custom.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java new file mode 100644 index 00000000..0cb717c4 --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java @@ -0,0 +1,69 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.conf; + +import iaik.security.ecc.provider.ECCProvider; +import iaik.xml.crypto.XSecProvider; + +import java.net.HttpURLConnection; +import java.security.Provider; +import java.security.Security; + +import javax.net.ssl.HttpsURLConnection; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider; + +/** + * + * TODO currently only the code to get started. + */ +public class Configurator { + private Log log = LogFactory.getLog(Configurator.class); + + public Configurator() { + configure(); + } + + protected void configUrlConnections() { + HttpsURLConnection.setFollowRedirects(false); + HttpURLConnection.setFollowRedirects(false); + } + + protected void configureProviders() { + log.debug("Registering security providers"); + Security.addProvider(new STALProvider()); + XSecProvider.addAsProvider(false); + Security.insertProviderAt(new ECCProvider(false), 1); + StringBuffer sb = new StringBuffer(); + sb.append("Following providers are now registered: "); + int i = 1; + for (Provider prov : Security.getProviders()) { + sb.append((i++) + ". : " + prov); + } + log.debug("Configured provider" + sb.toString()); + } + + public void configure() { + configureProviders(); + configUrlConnections(); + + } + +} 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 new file mode 100644 index 00000000..53a7c164 --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java @@ -0,0 +1,91 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.webapp; + +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.binding.HTTPBindingProcessor; +import at.gv.egiz.bku.binding.HttpUtil; +import at.gv.egiz.org.apache.tomcat.util.http.AcceptLanguage; + +/** + * Handles SL requests and instantiates BindingProcessors + * + */ +public class BKURequestHandler extends SpringBKUServlet { + + public final static String REDIRECT_URL ="appletPage.jsp"; + + protected Log log = LogFactory.getLog(BKURequestHandler.class); + + protected void doPost(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, java.io.IOException { + log.debug("Got new request"); + String lang = req.getHeader("Accept-Language"); + Locale locale = AcceptLanguage.getLocale(lang); + log.debug("Using locale: "+locale); + HttpSession session = req.getSession(); + if (session != null) { + session.invalidate(); + } + String id = req.getSession(true).getId(); + log.debug("Using session id: "+id); + HTTPBindingProcessor bindingProcessor; + if (req.isSecure()) { + bindingProcessor = (HTTPBindingProcessor) getBindingProcessorManager() + .createBindingProcessor("https", id, locale); + } else { + bindingProcessor = (HTTPBindingProcessor) getBindingProcessorManager() + .createBindingProcessor("http", id, locale); + } + Map headerMap = new HashMap(); + for (Enumeration headerName = req.getHeaderNames(); headerName + .hasMoreElements();) { + String header = headerName.nextElement(); + if (header != null) { + headerMap.put(header, req.getHeader(header)); + } + } + String charset = req.getCharacterEncoding(); + String contentType = req.getContentType(); + if (charset != null) { + contentType += ";"+charset; + } + headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, contentType); + bindingProcessor.setHTTPHeaders(headerMap); + bindingProcessor.consumeRequestStream(req.getInputStream()); + req.getInputStream().close(); + getBindingProcessorManager().process(bindingProcessor); + resp.sendRedirect(REDIRECT_URL); + } + + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, java.io.IOException { + doPost(req, resp); + } +} diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java new file mode 100644 index 00000000..6c1a4c3a --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java @@ -0,0 +1,120 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.webapp; + +import java.io.IOException; +import java.util.Iterator; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.binding.HTTPBindingProcessor; +import at.gv.egiz.bku.binding.IdFactory; + +/** + * Delivers the result to the browser + * + */ +public class ResultServlet extends SpringBKUServlet { + + private final static Log log = LogFactory.getLog(ResultServlet.class); + + private String encoding = "UTF-8"; + private String expiredPage = "./expiredError.jsp"; + + public ResultServlet() { + } + + private void myInit() { + String enc = getServletContext().getInitParameter("responseEncoding"); + if (enc != null) { + log.debug("Init default encoding to: "+enc); + encoding = enc; + } + String expP = getServletConfig().getInitParameter("expiredPage"); + if (expP != null) { + log.debug("Init expired page to: "+expP); + expiredPage = expP; + } + } + + @Override + public void init() throws ServletException { + super.init(); + myInit(); + } + + @Override + public void init(ServletConfig config) throws ServletException { + super.init(config); + myInit(); + } + + + + protected void doPost(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + doGet(req, resp); + } + + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, java.io.IOException { + + HttpSession session = req.getSession(false); + if (session == null) { + resp.sendRedirect(expiredPage); + return; + } + String sessionId = session.getId(); + if (sessionId == null) { + resp.sendRedirect(expiredPage); + return; + } + log.debug("Got a result request for session: " + sessionId); + HTTPBindingProcessor bp = (HTTPBindingProcessor) getBindingProcessorManager().getBindingProcessor( + IdFactory.getInstance().createId(sessionId)); + if (bp == null) { + session.invalidate(); + resp.sendRedirect(expiredPage); + return; + } + + if (bp.getRedirectURL() != null) { + resp.sendRedirect(bp.getRedirectURL()); + return; + } + resp.setStatus(bp.getResponseCode()); + resp.setHeader("Cache-Control","no-store"); //HTTP 1.1 + resp.setHeader("Pragma","no-cache"); //HTTP 1.0 + resp.setDateHeader ("Expires", 0); + for (Iterator it = bp.getResponseHeaders().keySet() + .iterator(); it.hasNext();) { + String header = it.next(); + resp.setHeader(header, bp.getResponseHeaders().get(header)); + } + resp.setContentType(bp.getResultContentType()); + resp.setCharacterEncoding(encoding); + bp.writeResultTo(resp.getOutputStream(), encoding); + session.invalidate(); + } +} diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java new file mode 100644 index 00000000..2b56166c --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java @@ -0,0 +1,49 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.webapp; + +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.binding.BindingProcessorManager; +import at.gv.egiz.bku.binding.IdFactory; + +/** + * Session listener to trigger the removal of the BindingProcessor + * + */ +public class SessionTimeout implements HttpSessionListener { + + private static Log log = LogFactory.getLog(SessionTimeout.class); + + @Override + public void sessionCreated(HttpSessionEvent arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void sessionDestroyed(HttpSessionEvent event) { + BindingProcessorManager manager = (BindingProcessorManager) event.getSession().getServletContext().getAttribute(SpringBKUServlet.BEAN_NAME); + log.info("Removing session: "+event.getSession().getId()); + manager.removeBindingProcessor(IdFactory.getInstance().createId(event.getSession().getId())); + } + +} diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java new file mode 100644 index 00000000..6ee537b1 --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java @@ -0,0 +1,31 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.online.webapp; + +import javax.servlet.http.HttpServlet; + +import at.gv.egiz.bku.binding.BindingProcessorManager; + +public abstract class SpringBKUServlet extends HttpServlet { + + public final static String BEAN_NAME="bindingProcessorManager"; + + protected BindingProcessorManager getBindingProcessorManager() { + return (BindingProcessorManager) getServletContext().getAttribute(BEAN_NAME); + } + +} diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java new file mode 100644 index 00000000..38c568ab --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java @@ -0,0 +1,38 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.stal.service.impl; + +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALFactory; + +/** + * + * @author clemens + */ +public class RequestBrokerSTALFactory implements STALFactory { + + @Override + public STAL createSTAL() { + return new STALRequestBrokerImpl(); + } + +} diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java new file mode 100644 index 00000000..aad9b874 --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java @@ -0,0 +1,43 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.stal.service.impl; + +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.HashDataInputCallback; +import java.util.List; +import java.util.concurrent.TimeoutException; + +/** + * + * @author clemens + */ +public interface STALRequestBroker extends STAL { + + public static final int ERR_6000 = 6000; + public static final long TIMEOUT_MS = 1000*60*5; //300000; + + public List nextRequest(List response); +// public void setResponse(List response) throws TimeoutException; +// public void interruptRequestHandling(ErrorResponseType error); + public HashDataInputCallback getHashDataInput(); +} 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 new file mode 100644 index 00000000..19548247 --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java @@ -0,0 +1,554 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.stal.service.impl; + +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.QuitRequest; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.HashDataInputCallback; +import at.gv.egiz.stal.SignRequest; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * An instance of STALRequestBroker is shared between a producer threads (SLCommand) + * and multiple consumer threads (STALService). + * This implementation assures that handleRequest is executed only once the previous invocation returned. + * The BindingProcessor assures that a new SLCommand calls handleRequest() only once + * the bindingProcessor called handleRequest(QUIT) after the previous SLCommand's handleRequest() returned. + * + * Multiple STALService threads might call nextRequest()/getSignedReferences() in any order. + * + * @author clemens + */ +public class STALRequestBrokerImpl implements STALRequestBroker { + + private static final Log log = LogFactory.getLog(STALRequestBrokerImpl.class); +// protected RequestResponseBroker broker; + protected List requests = null; + protected List responses = null; + protected HashDataInputCallback currentHashDataInputCallback; + private boolean isHandlingRequest = false; + private boolean expectingResponse = false; +// private Object handleRequestCondition = new Object(); +// private Object gotResponsesCondition = new Object(); +// public STALRequestBrokerImpl() { +// broker = new RequestResponseBroker(); +// new Thread(handler).start(); +// } + +// @Override +// public HashDataInputCallback getCurrentHashDataInputCallback() { +// return broker.getCurrentHashDataInputCallback(); +// } + /** + * Produce requests (and HashDataInputCallback) and wait for responses. + * The next thread may enter once we consumed the responses. + * + * @param requests + * @return + * + * @pre requests either single SignRequest, QuitRequest or multiple ReadInfoboxRequests + */ + @Override + public synchronized List handleRequest(List requests) { + while (isHandlingRequest) { + log.trace("waiting to produce request"); + try { + long beforeWait = System.currentTimeMillis(); + wait(TIMEOUT_MS); + if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { + log.warn("timeout while waiting to produce request"); + return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); + } + } catch (InterruptedException ex) { + log.warn("interrupt while waiting to produce request: " + ex.getMessage()); + } + } + log.trace("produce request"); + isHandlingRequest = true; + + this.requests = requests; + currentHashDataInputCallback = null; + for (STALRequest request : requests) { + if (request instanceof SignRequest) { + log.trace("Received SignRequest, keep HashDataInput callback."); + currentHashDataInputCallback = ((SignRequest) request).getHashDataInput(); + break; + } else if (request instanceof QuitRequest) { + //alternative1: + //for QUIT requests, do not wait for responses, but for request consumation + // (i.e. set isHandlingReq to false once QUIT is consumed) + log.trace("Received QuitRequest, do not wait for responses."); + log.trace("notifying request consumers"); + notify(); + //alternative2: + //wait for QUIT to be consumed + // (i.e. notify me noce QUIT is consumed) +// while (this.requests != null) { +// try { +// long beforeWait = System.currentTimeMillis(); +// wait(TIMEOUT_MS); +// if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { +// log.warn("timeout while waiting for QUIT to be consumed"); +// this.requests = null; +// isHandlingRequest = false; +// return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); +// } +// } catch (InterruptedException ex) { +// log.warn("interrupt while waiting for QUIT to be consumed: " + ex.getMessage()); +// } +// } +// isHandlingRequest = false; + return new ArrayList(); + } else if (log.isTraceEnabled()) { + log.trace("Received STAL request: " + request.getClass().getName()); + } + } + log.trace("notifying request consumers"); + notify(); + + while (this.responses == null) { + log.trace("waiting to consume response"); + try { + long beforeWait = System.currentTimeMillis(); + wait(TIMEOUT_MS); + if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { + log.warn("timeout while waiting to consume response"); + this.requests = null; + currentHashDataInputCallback = null; + isHandlingRequest = false; + return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); + } + } catch (InterruptedException ex) { + log.warn("interrupt while waiting to consume response: " + ex.getMessage()); + } + } + log.trace("consuming responses"); + List resps = responses; + responses = null; + log.trace("notifying response producers"); + notify(); + + isHandlingRequest = false; + log.trace("notifying request producers"); + notify(); + + return resps; + } + + /** + * + * @param responses + * @return QUIT if expected responses are not provided + */ + @Override + public synchronized List nextRequest(List responses) { + if (responses != null && responses.size() > 0) { + if (!expectingResponse) { + log.warn("Received unexpected response in nextRequest()"); + return Collections.singletonList((STALRequest) new QuitRequest()); + } + while (this.responses != null) { + log.trace("waiting to produce response"); + try { + long beforeWait = System.currentTimeMillis(); + wait(TIMEOUT_MS); + if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { + log.warn("timeout while waiting to produce response"); + return Collections.singletonList((STALRequest) new QuitRequest()); + } + } catch (InterruptedException ex) { + log.warn("interrupt while waiting to produce response: " + ex.getMessage()); + } + } + log.trace("produce response"); + this.responses = responses; + //reset HashDataInputCallback + if (log.isTraceEnabled()) { + for (STALResponse response : responses) { + log.trace("Received STAL response: " + response.getClass().getName()); + } + } + log.trace("notifying response consumers"); + notify(); + } else { + if (expectingResponse) { + // while (expectingResponse) wait(); + log.warn("No expected response received in nextRequest()"); + return Collections.singletonList((STALRequest) new QuitRequest()); + } + log.trace("expecting non-null response in next nextRequest(response)"); + expectingResponse = true; + } + while (this.requests == null) { + log.trace("waiting to consume request"); + try { + long beforeWait = System.currentTimeMillis(); + wait(TIMEOUT_MS); + if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { + log.warn("timeout while waiting to consume request"); + return Collections.singletonList((STALRequest) new QuitRequest()); + } + } catch (InterruptedException ex) { + log.warn("interrupt while waiting to consume request: " + ex.getMessage()); + } + } + log.trace("consume request"); + List reqs = requests; + //TODO check if QUIT and set isHandlingReq to false here? + // (rename isHandlingReq -> produce) + // handleReq(QUIT) doesn't wait() and returns immediately + // cf. handleReq(QUIT) + requests = null; + //no need to notify; request producer is waiting for isHandlingRequest + //(alt2: the QUIT producer returned immediately and didn't notify) + //(alt1: the QUIT producer is waiting for notification on QUIT consumption) + if (reqs.size() > 0 && reqs.get(0) instanceof QuitRequest) { + isHandlingRequest = false; + log.trace("consumed QUIT, notifying request producers"); + notify(); + log.trace("expecting no response in next nextRequest()"); + expectingResponse = false; + //notify no-response request consumers + } + return reqs; + } + + @Override + public synchronized HashDataInputCallback getHashDataInput() { + log.trace("return current HashDataInput callback"); + return currentHashDataInputCallback; + } +// /** +// * Causes the calling thread to sleep until response is passed via nextRequest() +// * (except for QUIT request, which returns immediately). +// * The requestList may contain at most one signRequest. +// * The signRequest's signedRefCallback is stored until a response to the signRequest is provided (2nd nextRequest() call), +// * i.e. until handleRequest() returns. +// * +// * @param aRequestList +// * @return +// * @pre requestList contains at most one signRequest +// */ +// @Override +// public List handleRequest(List requestList) { +// try { +// if (log.isTraceEnabled()) { +// log.trace("HandleRequest (" + requestList.size() + " requests)"); +// } +// +// broker.produceRequests(requestList); +// +// // QUIT returns immediately +// if (requestList.size() == 1 && requestList.get(0) instanceof QuitRequest) { +// log.trace("Received QUIT request, do not wait for responses."); +// return new ArrayList(); +// } +// return broker.consumeResponses(); +// } catch (InterruptedException ex) { +// log.error("Interrupted while handling STAL request list: " + ex.getMessage()); +// return Collections.singletonList((STALResponse) new ErrorResponse()); +// } catch (TimeoutException ex) { +// log.error("Timeout during handle request: " + ex.getMessage()); +// ErrorResponse err = new ErrorResponse(); +// err.setErrorCode(ERR_6000); +// return Collections.singletonList((STALResponse) err); +// } +// } +// +// @Override +// public void setResponse(List responses) { +// try { +//// if (responses != null && responses.size() > 0) { +//// List stalResponses = translateResponses(responses); +// broker.produceResponses(responses); +//// } else { +//// log.trace("Received emtpy responses list, do not add."); +//// } +// } catch (InterruptedException ex) { +// log.error("Interrupted while setting STAL response: " + ex.getMessage()); +//// broker.interrupt(new ErrorResponse()); +// } catch (TimeoutException ex) { +// log.error("Timeout during setResponse: " + ex.getMessage()); +// } +// } +// +// /** +// * TODO split in nextRequest(void) and setResponses(responses) +// *
+// * Translate (possibly empty) STAL-WS response list to STAL responses and +// * wait until request(s) are available and translate to STAL-WS requests. +// * @param prevResponse if null or zero-length, they are not passed to the handler +// * @return +// */ +// @Override +// public List nextRequest() { //List responses) { +// try { +//// if (responses != null && responses.size() > 0) { +//// List stalResponses = translateResponses(responses); +//// broker.produceResponses(stalResponses); +//// } else { +//// log.trace("Received emtpy responses list, do not add."); +//// } +// +//// List stalRequests = broker.consumeRequests(); +//// List requests = translateRequests(stalRequests); +// return broker.consumeRequests(); +//// } catch (InterruptedException ex) { +//// log.error("Interrupted while requesting next STAL request: " + ex.getMessage()); +//// return Collections.singletonList((STALResponse) new ErrorResponse()); +// } catch (InterruptedException ex) { +// log.error("Interrupted while requesting next STAL request: " + ex.getMessage()); +//// broker.interrupt(new ErrorResponse()); +// return new ArrayList(); +// } catch (TimeoutException ex) { +// log.error("Timeout during nextRequest: " + ex.getMessage()); +// return new ArrayList(); +// } +// } +// +//// @Override +//// public void interruptRequestHandling(ErrorResponseType error) { +//// if (log.isTraceEnabled()) { +//// log.trace("Received Error: " + error.getErrorMessage()); +//// } +//// broker.interrupt(new ErrorResponse(error.getErrorCode())); +//// } +// +// //TODO +//// private List translateRequests(List stalRequests) { +//// List requests = new ArrayList(stalRequests.size()); +//// for (STALRequest stalRequest : stalRequests) { +//// if (stalRequest instanceof InfoboxReadRequest) { +//// InfoboxReadRequestType req = new InfoboxReadRequestType(); +//// req.setInfoboxIdentifier(((InfoboxReadRequest) stalRequest).getInfoboxIdentifier()); +//// log.warn("TODO consider domain identifier for infobox " + req.getInfoboxIdentifier()); +//// req.setDomainIdentifier("TODO"); +//// requests.add(req); +//// } else if (stalRequest instanceof SignRequest) { +//// //TODO +//// //remember current sign request for getSignedReferences() +//// throw new UnsupportedOperationException("SignRequest unsupported"); +//// } else if (stalRequest instanceof QuitRequest) { +//// requests.add(new QuitRequestType()); +//// } else { +//// log.error("Unknown STAL request: " + stalRequest.getClass().getName()); +//// } +//// } +//// return requests; +//// } +// +//// private List translateResponses(List responses) { +//// List stalResponses = new ArrayList(responses.size()); +//// for (ResponseType response : responses) { +//// if (response instanceof InfoboxReadResponseType) { +//// byte[] infoboxValue = ((InfoboxReadResponseType) response).getInfoboxValue(); +//// stalResponses.add(new InfoboxReadResponse(infoboxValue)); +//// } else if (response instanceof SignResponseType) { +//// byte[] signatureValue = ((SignResponseType) response).getSignatureValue(); +//// stalResponses.add(new SignResponse(signatureValue)); +//// } else if (response instanceof ErrorResponseType) { +//// int errorCode = ((ErrorResponseType) response).getErrorCode(); +//// log.warn("TODO consider error msg: " + ((ErrorResponseType) response).getErrorMessage()); +//// stalResponses.add(new ErrorResponse(errorCode)); +//// } else { +//// log.error("Unknown STAL service response " + response.getId() + ": " + response.getClass().getName()); +//// } +//// } +//// return stalResponses; +//// } +// /** +// * synchronize on this, not on request/response lists since they are nulled +// */ +// // protected since outer handler field is protected +// protected class RequestResponseBroker { //implements Runnable { +// +// protected List requests = null; +// protected List responses = null; +// protected HashDataInputCallback currentHashDataInputCallback; +// +//// @Override +//// public void run() { +//// while (true) { +//// ; +//// } +//// //TODO handler lifecycle in run()? +//// } +// /** +// * wait until requests are consumed, +// * produce requests, remember sigRefCallback and notify consumer +// * (no need for synchronized?) +// * @param requests +// */ +// public synchronized void produceRequests(List requests) throws InterruptedException, TimeoutException { +//// synchronized (requests) { +// +// // requests is null, since there's only one producer thread calling handleRequests() +// // and handleRequest() returns only if nextRequest() was called +// while (this.requests != null) { +//// requests.wait(); +// long before = System.currentTimeMillis(); +// log.trace("waiting to produce requests ..."); +// wait(); //TIMEOUT_MS); +// if (System.currentTimeMillis() - before >= TIMEOUT_MS) { +// log.error("Timeout while waiting to produce requests."); +// throw new TimeoutException(); +// } +// } +// log.trace("producing requests"); +// this.requests = requests; +// // getSignedReferences does not produce responses, +// // so the command thread will not continue (and no further signRequest can possibly be produced) +// // once the ws-client sends nextRequest with responses to the signRequest, the callback is invalidated +// +// // reset callback if for some reason produceResponse() wasn't called +// currentHashDataInputCallback = null; +// for (STALRequest request : requests) { +// if (request instanceof SignRequest) { +// log.trace("keep hashdatainput callback"); +// currentHashDataInputCallback = ((SignRequest) request).getHashDataInput(); +// break; +// } +// } +// +//// requests.notify(); +// log.trace("notifying request consumers (TODO not only consumers)"); +// notify(); +//// } +// } +// +// /** +// * wait until requests are produced and consume them +// * @return +// */ +// public synchronized List consumeRequests() throws InterruptedException, TimeoutException { +// List retVal = null; +//// synchronized (requests) { +// while (requests == null) { +//// requests.wait(); +// long before = System.currentTimeMillis(); +// log.trace("waiting to consumer requests ..."); +// wait(); //TIMEOUT_MS); +// if (System.currentTimeMillis() - before >= TIMEOUT_MS) { +// log.error("Timeout while waiting to consume requests."); +// throw new TimeoutException(); +// } +// } +// log.trace("consuming requests"); +// retVal = requests; +// requests = null; +//// } +// log.trace("???notify request producers???"); +// return retVal; +// } +// +// /** +// * wait until previous responses are consumed, +// * produce responses and notify consumer +// * @param responses +// */ +// public synchronized void produceResponses(List responses) throws InterruptedException, TimeoutException { +//// synchronized (responses) { +// while (this.responses != null) { +//// responses.wait(); +// long before = System.currentTimeMillis(); +// log.trace("waiting to produce responses ..."); +// wait(); //TIMEOUT_MS); +// if (System.currentTimeMillis() - before >= TIMEOUT_MS) { +// log.error("Timeout while waiting to produce responses."); +// throw new TimeoutException(); +// } +// } +// log.trace("producing responses"); +// this.responses = responses; +// //invalidate sigrefcallback (from now on handleRequest() may be called, producing new requests) +// //make sure the provided responses are for the corresponding signrequest +// if (this.requests == null) {//requests already consumed=>responses correspond to these +// log.trace("resetting current hashdatainput"); +// currentHashDataInputCallback = null; +// } +//// responses.notify(); +// log.trace("notify response consumers (TODO only consumers?)"); +// notify(); +//// } +// } +// +// /** +// * wait until responses are available, consume them +// * @return +// * @throws java.lang.Exception +// */ +// public synchronized List consumeResponses() throws InterruptedException, TimeoutException { +// List retVal = null; +//// synchronized (responses) { +// while (responses == null) { +//// responses.wait(); +// long before = System.currentTimeMillis(); +// log.trace("waiting to consume responses ..."); +// wait(); //TIMEOUT_MS); +// if (System.currentTimeMillis() - before >= TIMEOUT_MS) { +// log.error("Timeout while waiting to consume responses."); +// throw new TimeoutException(); +// } +// } +// log.trace("consuming responses"); +// retVal = responses; +// responses = null; +//// } +// log.trace("???notify response producers???"); +// return retVal; +// } +// +// /** +// * get the signrefcallback until handleRequest() is called the next time. +// * @return null if last request was not a signRequest +// */ +// public synchronized HashDataInputCallback getCurrentHashDataInputCallback() { +// log.trace("obtain current hashdatainput"); +// return currentHashDataInputCallback; +// } +// /** +// * add the error to responses and notify (response-) consumers +// * @param error +// */ +//// public synchronized void interrupt(ErrorResponse error) { +////// synchronized (responses) { +//// if (responses == null) { +//// responses = Collections.singletonList((STALResponse) error); +//// } else { +//// responses.add(error); +//// } +////// responses.notify(); +//// notify(); +////// } +//// } +// } + @Override + public void setLocale(Locale locale) { + // TODO Auto-generated method stub + } +} 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 new file mode 100644 index 00000000..3e8ad6f3 --- /dev/null +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java @@ -0,0 +1,220 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.stal.service.impl; + +import at.gv.egiz.bku.binding.BindingProcessor; +import at.gv.egiz.bku.binding.BindingProcessorManager; +import at.gv.egiz.stal.service.*; +import at.gv.egiz.bku.binding.Id; +import at.gv.egiz.bku.binding.IdFactory; +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.HashDataInputCallback; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.QuitRequest; +import at.gv.egiz.stal.SignRequest; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; +import javax.annotation.Resource; +import javax.jws.WebService; +import javax.servlet.ServletContext; +import javax.xml.ws.WebServiceContext; +import javax.xml.ws.handler.MessageContext; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * + * @author clemens + */ +@WebService(endpointInterface = "at.gv.egiz.stal.service.STALPortType") +public class STALServiceImpl implements STALPortType { + + public static final String BINDING_PROCESSOR_MANAGER = "bindingProcessorManager"; + public static final String TEST_SESSION_ID = "TestSession"; + protected static final Log log = LogFactory.getLog(STALServiceImpl.class); + @Resource + WebServiceContext wsContext; + protected IdFactory idF = IdFactory.getInstance(); + + @Override + public GetNextRequestResponseType getNextRequest(GetNextRequestType request) { + + // HttpSession session = ((HttpServletRequest) + // mCtx.get(MessageContext.SERVLET_REQUEST)).getSession(); + String sessId = request.getSessionId(); + List responses = request.getResponse(); + if (log.isDebugEnabled()) { + log.debug("Received GetNextRequest for session " + sessId + + " containing " + responses.size() + " responses"); + } + + GetNextRequestResponseType response = new GetNextRequestResponseType(); + response.setSessionId(sessId); + + if (TEST_SESSION_ID.equals(sessId)) { + if (responses.size() > 0 && responses.get(0) instanceof ErrorResponse) { + log + .info("Received TestSession GetNextRequest(ErrorResponse), returning QuitRequest"); + response.getRequest().add(new QuitRequest()); + } else { + log + .info("Received TestSession GetNextRequest, returning InfoboxReadRequest "); + SignRequest sig = new SignRequest(); + sig.setKeyIdentifier("SecureSignatureKeypair"); + sig.setSignedInfo(" id('signed-data-object-0-1214921968-27971781-13578')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM=yV6Q+I60buqR4mMaxA7fi+CV35A=".getBytes()); + response.getRequest().add(sig); + InfoboxReadRequest req = new InfoboxReadRequest(); + req.setInfoboxIdentifier("IdentityLink"); + req.setDomainIdentifier("hansiwurzel"); + response.getRequest().add(req); + req = new InfoboxReadRequest(); + req.setInfoboxIdentifier("CertifiedKeypair"); + response.getRequest().add(req); + req = new InfoboxReadRequest(); + req.setInfoboxIdentifier("SecureSignatureKeypair"); + response.getRequest().add(req); + } + return response; + } + + // get Session Id + Id sessionId = idF.createId(sessId); + STALRequestBroker stal = getStal(sessionId); + + if (stal == null) { + log.error("Failed to get STAL for session " + sessId + + ", returning QuitRequest"); + response.getRequest().add(new QuitRequest()); + } else { + List responsesIn = request.getResponse(); + for (STALResponse resp : responsesIn) { + log.debug(resp); + } + List requestsOut = ((STALRequestBroker) stal) + .nextRequest(responsesIn); + response.getRequest().addAll(requestsOut); + if (log.isDebugEnabled()) { + log.debug("Returning GetNextRequestResponse for session " + sessId + + " containing " + requestsOut.size() + " requests"); + } + } + return response; + } + + @Override + public GetHashDataInputResponseType getHashDataInput( + GetHashDataInputType request) throws GetHashDataInputFault { + + String sessId = request.getSessionId(); + if (log.isDebugEnabled()) { + log.debug("Received GetHashDataInputRequest for session " + sessId + + " containing " + request.getReference().size() + " referencese"); + } + + // get Session Id + Id sessionId = idF.createId(sessId); + STALRequestBroker stal = getStal(sessionId); + + if (stal == null) { + String msg = "Failed to get STAL for session " + sessId; + log.error(msg); + GetHashDataInputFaultType faultInfo = new GetHashDataInputFaultType(); + faultInfo.setErrorCode(1); + faultInfo.setErrorMessage(msg); + throw new GetHashDataInputFault(msg, faultInfo); + } else { + GetHashDataInputResponseType response = new GetHashDataInputResponseType(); + response.setSessionId(sessId); + + HashDataInputCallback hashDataInput = stal.getHashDataInput(); + if (TEST_SESSION_ID.equals(sessId)) { + log + .debug("Received TestSession GetHashDataInput, setting dummy HashDataInputCallback"); + hashDataInput = new HashDataInputCallback() { + + @Override + public InputStream getHashDataInput(String referenceId) { + byte[] hd = ("dummyhashdatainput_" + referenceId).getBytes(); + return new ByteArrayInputStream(hd); + } + }; + } + if (hashDataInput != null) { + List references = request + .getReference(); + for (GetHashDataInputType.Reference reference : references) { + String refId = reference.getID(); + if (log.isDebugEnabled()) { + log.debug("Resolving HashDataInput for reference " + refId); + } + ByteArrayOutputStream baos = null; + try { + InputStream hdi = hashDataInput.getHashDataInput(refId); + baos = new ByteArrayOutputStream(hdi.available()); + int c; + while ((c = hdi.read()) != -1) { + baos.write(c); + } + GetHashDataInputResponseType.Reference ref = new GetHashDataInputResponseType.Reference(); + ref.setID(refId); + ref.setValue(baos.toByteArray()); + response.getReference().add(ref); + } catch (IOException ex) { + String msg = "Failed to get HashDataInput for reference " + refId; + log.error(msg, ex); + GetHashDataInputFaultType faultInfo = new GetHashDataInputFaultType(); + faultInfo.setErrorCode(1); + faultInfo.setErrorMessage(msg); + throw new GetHashDataInputFault(msg, faultInfo, ex); + } finally { + try { + baos.close(); + } catch (IOException ex) { + } + } + } + } else { + log.warn("Could not resolve any HashDataInputs for session " + sessId + + ", no callback provided."); + } + return response; + } + } + + private STALRequestBroker getStal(Id sessionId) { + // log.warn("RETURNING DUMMY STAL REQUEST BROKER"); + // return new STALRequestBrokerImpl(); + + MessageContext mCtx = wsContext.getMessageContext(); + ServletContext sCtx = (ServletContext) mCtx + .get(MessageContext.SERVLET_CONTEXT); + BindingProcessorManager bpMgr = (BindingProcessorManager) sCtx + .getAttribute(BINDING_PROCESSOR_MANAGER); + BindingProcessor bp = bpMgr.getBindingProcessor(sessionId); + return (bp == null) ? null : (STALRequestBroker) bp.getSTAL(); + } +} diff --git a/BKUOnline/src/main/resources/commons-logging.properties b/BKUOnline/src/main/resources/commons-logging.properties new file mode 100644 index 00000000..0d497b1b --- /dev/null +++ b/BKUOnline/src/main/resources/commons-logging.properties @@ -0,0 +1,16 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/BKUOnline/src/main/resources/log4j.properties b/BKUOnline/src/main/resources/log4j.properties new file mode 100644 index 00000000..ed14b424 --- /dev/null +++ b/BKUOnline/src/main/resources/log4j.properties @@ -0,0 +1,34 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# loglever DEBUG, appender STDOUT +log4j.rootLogger=TRACE, STDOUT +#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p | %t | %c %x - %m%n + +### FILE appender +#log4j.appender.file=org.apache.log4j.RollingFileAppender +#log4j.appender.file.maxFileSize=100KB +#log4j.appender.file.maxBackupIndex=9 +#log4j.appender.file.File=egovbus_ca.log +#log4j.appender.file.threshold=info +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/BKUOnline/src/main/webapp/HTTP-ohne.html b/BKUOnline/src/main/webapp/HTTP-ohne.html new file mode 100644 index 00000000..9cdd67ab --- /dev/null +++ b/BKUOnline/src/main/webapp/HTTP-ohne.html @@ -0,0 +1,85 @@ + + + + +Infobox Requests + + + +

Securitykapsel - HTTP-Bindung

+ + +

+

+
Enter XML Request +

+
+
+
+ + + diff --git a/BKUOnline/src/main/webapp/META-INF/MANIFEST.MF b/BKUOnline/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/BKUOnline/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/BKUOnline/src/main/webapp/META-INF/context.xml b/BKUOnline/src/main/webapp/META-INF/context.xml new file mode 100644 index 00000000..3568c9ec --- /dev/null +++ b/BKUOnline/src/main/webapp/META-INF/context.xml @@ -0,0 +1,18 @@ + + + diff --git a/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml b/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml new file mode 100644 index 00000000..7a2f12b8 --- /dev/null +++ b/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml b/BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml new file mode 100644 index 00000000..6e8f8b69 --- /dev/null +++ b/BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml @@ -0,0 +1,36 @@ + + + + + + + + + + diff --git a/BKUOnline/src/main/webapp/WEB-INF/web.xml b/BKUOnline/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..417dabb8 --- /dev/null +++ b/BKUOnline/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,97 @@ + + + + http-security-layer-request + + + + contextConfigLocation + /WEB-INF/applicationContext.xml + + + + org.springframework.web.context.ContextLoaderListener + + + + + + + at.gv.egiz.bku.online.webapp.SessionTimeout + + + BKUServlet + at.gv.egiz.bku.online.webapp.BKURequestHandler + + + ResultServlet + at.gv.egiz.bku.online.webapp.ResultServlet + + responseEncoding + UTF-8 + + + expiredPage + + expired.html + + + + BKUServlet + /http-security-layer-request + + + BKUServlet + /https-security-layer-request + + + ResultServlet + /bkuResult + + + + + + + + com.sun.xml.ws.transport.http.servlet.WSServletContextListener + + + STALPort + com.sun.xml.ws.transport.http.servlet.WSServlet + 1 + + + STALPort + /stal + + + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + 3 + + \ No newline at end of file diff --git a/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl new file mode 100644 index 00000000..a9f16a12 --- /dev/null +++ b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd new file mode 100644 index 00000000..6627db00 --- /dev/null +++ b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BKUOnline/src/main/webapp/appletPage.jsp b/BKUOnline/src/main/webapp/appletPage.jsp new file mode 100644 index 00000000..684a8dca --- /dev/null +++ b/BKUOnline/src/main/webapp/appletPage.jsp @@ -0,0 +1,65 @@ + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Applet BKU Test + + + + +
+ + + diff --git a/BKUOnline/src/main/webapp/expired.html b/BKUOnline/src/main/webapp/expired.html new file mode 100644 index 00000000..67ca94bc --- /dev/null +++ b/BKUOnline/src/main/webapp/expired.html @@ -0,0 +1,28 @@ + + + + + +Session Expired + + +

+ Ihre Sitzung ist abgelaufen. Ein neuer BKU request kann im Requestformular erstellt werden. +

+ + \ No newline at end of file diff --git a/BKUOnline/src/main/webapp/index.html b/BKUOnline/src/main/webapp/index.html new file mode 100644 index 00000000..8f1a338e --- /dev/null +++ b/BKUOnline/src/main/webapp/index.html @@ -0,0 +1,59 @@ + + + + +BKU Online + + + + +
+

+

TestRequest

+Security Layer Request +

STAL Service

+STAL Service Endpoint Information +

+
+ + + + diff --git a/BKUOnline/src/main/webapp/js/deployJava.js b/BKUOnline/src/main/webapp/js/deployJava.js new file mode 100644 index 00000000..4d8a0ca3 --- /dev/null +++ b/BKUOnline/src/main/webapp/js/deployJava.js @@ -0,0 +1,886 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Sun Microsystems nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * deployJava.js + * + * This file is part of the Deployment Toolkit. It provides functions for web + * pages to detect the presence of a JRE, install the latest JRE, and easily run + * applets or Web Start programs. Usage guide may be found at http:///. + * + * The "live" copy of this file may be found at + * http://java.com/js/deployJava.js. + * You are encouraged to link directly to the live copy of the file. + * + * @version @(#)deployJava.js 1.11 08/07/11 + */ + +var deployJava = { + debug: null, + + myInterval: null, + preInstallJREList: null, + returnPage: null, + brand: null, + locale: null, + installType: null, + + EAInstallEnabled: false, + EarlyAccessURL: null, + + // GetJava page + getJavaURL: 'http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com', + + // Apple redirect page + appleRedirectPage: 'http://www.apple.com/support/downloads/', + + // mime-type of the DeployToolkit plugin object + mimeType: 'application/npruntime-scriptable-plugin;DeploymentToolkit', + + // location of the Java Web Start launch button graphic + launchButtonPNG: 'http://java.sun.com/products/jfc/tsc/articles/swing2d/webstart.png', + + + /** + * Returns an array of currently-installed JRE version strings. + * Version strings are of the form #.#[.#[_#]], with the function returning + * as much version information as it can determine, from just family + * versions ("1.4.2", "1.5") through the full version ("1.5.0_06"). + * + * Detection is done on a best-effort basis. Under some circumstances + * only the highest installed JRE version will be detected, and + * JREs older than 1.4.2 will not always be detected. + */ + getJREs: function() { + var list = new Array(); + if (deployJava.isPluginInstalled()) { + var plugin = deployJava.getPlugin(); + for (var i = 0; i < plugin.jvms.getLength(); i++) { + list[i] = plugin.jvms.get(i).version; + } + } else { + var browser = deployJava.getBrowser(); + + if (browser == 'MSIE') { + if (deployJava.testUsingActiveX('1.8.0')) { + list[0] = '1.8.0'; + } else if (deployJava.testUsingActiveX('1.7.0')) { + list[0] = '1.7.0'; + } else if (deployJava.testUsingActiveX('1.6.0')) { + list[0] = '1.6.0'; + } else if (deployJava.testUsingActiveX('1.5.0')) { + list[0] = '1.5.0'; + } else if (deployJava.testUsingActiveX('1.4.2')) { + list[0] = '1.4.2'; + } else if (deployJava.testForMSVM()) { + list[0] = '1.1'; + } + } + else if (browser == 'Netscape Family') { + if (deployJava.testUsingMimeTypes('1.8')) { + list[0] = '1.8.0'; + } else if (deployJava.testUsingMimeTypes('1.7')) { + list[0] = '1.7.0'; + } else if (deployJava.testUsingMimeTypes('1.6')) { + list[0] = '1.6.0'; + } else if (deployJava.testUsingMimeTypes('1.5')) { + list[0] = '1.5.0'; + } else if (deployJava.testUsingMimeTypes('1.4.2')) { + list[0] = '1.4.2'; + } + } else if (browser == 'Safari') { + if (deployJava.testUsingPluginsArray('1.8.0')) { + list[0] = '1.8.0'; + } else if (deployJava.testUsingPluginsArray('1.7.0')) { + list[0] = '1.7.0'; + } else if (deployJava.testUsingPluginsArray('1.6.0')) { + list[0] = '1.6.0'; + } else if (deployJava.testUsingPluginsArray('1.5.0')) { + list[0] = '1.5.0'; + } else if (deployJava.testUsingPluginsArray('1.4.2')) { + list[0] = '1.4.2'; + } + } + } + + if (deployJava.debug) { + for (var i = 0; i < list.length; ++i) { + alert('We claim to have detected Java SE ' + list[i]); + } + } + + return list; + }, + + /** + * Triggers a JRE installation. The exact effect of triggering an + * installation varies based on platform, browser, and if the + * Deployment Toolkit plugin is installed. + * + * The requestVersion string is of the form #[.#[.#[_#]]][+|*], + * which includes strings such as "1.4", "1.5.0*", and "1.6.0_02+". + * A star (*) means "any version starting within this family" and + * a plus (+) means "any version greater or equal to this". + * "1.5.0*" * matches 1.5.0_06 but not 1.6.0_01, whereas + * "1.5.0+" matches both. + * + * If the Deployment Toolkit plugin is not present, this will just call + * deployJava.installLatestJRE(). + */ + installJRE: function(requestVersion) { + var ret = false; + if (deployJava.isPluginInstalled()) { + if (deployJava.getPlugin().installJRE(requestVersion)) { + deployJava.refresh(); + if (deployJava.returnPage != null) { + document.location = deployJava.returnPage; + } + return true; + } else { + return false; + } + } else { + return deployJava.installLatestJRE(); + } + }, + + + /** + * Triggers a JRE installation. The exact effect of triggering an + * installation varies based on platform, browser, and if the + * Deployment Toolkit plugin is installed. + * + * In the simplest case, the browser window will be redirected to the + * java.com JRE installation page, and (if possible) a redirect back to + * the current URL upon successful installation. The return redirect is + * not always possible, as the JRE installation may require the browser to + * be restarted. + * + * In the best case (when the Deployment Toolkit plugin is present), this + * function will immediately cause a progress dialog to be displayed + * as the JRE is downloaded and installed. + */ + installLatestJRE: function() { + if (deployJava.isPluginInstalled()) { + if (deployJava.getPlugin().installLatestJRE()) { + deployJava.refresh(); + if (deployJava.returnPage != null) { + document.location = deployJava.returnPage; + } + return true; + } else { + return false; + } + } else { + var browser = deployJava.getBrowser(); + var platform = navigator.platform.toLowerCase(); + if ((deployJava.EAInstallEnabled == 'true') && + (platform.indexOf('win') != -1) && + (deployJava.EarlyAccessURL != null)) { + + deployJava.preInstallJREList = deployJava.getJREs(); + if (deployJava.returnPage != null) { + deployJava.myInterval = + setInterval("deployJava.poll()", 3000); + } + + location.href = deployJava.EarlyAccessURL; + + // we have to return false although there may be an install + // in progress now, when complete it may go to return page + return false; + } else { + if (browser == 'MSIE') { + return deployJava.IEInstall(); + } else if ((browser == 'Netscape Family') && + (platform.indexOf('win32') != -1)) { + return deployJava.FFInstall(); + } else { + location.href = deployJava.getJavaURL + + ((deployJava.returnPage != null) ? + ('&returnPage=' + deployJava.returnPage) : '') + + ((deployJava.locale != null) ? + ('&locale=' + deployJava.locale) : '') + + ((deployJava.brand != null) ? + ('&brand=' + deployJava.brand) : ''); + } + // we have to return false although there may be an install + // in progress now, when complete it may go to return page + return false; + } + } + }, + + + /** + * Ensures that an appropriate JRE is installed and then runs an applet. + * minimumVersion is of the form #[.#[.#[_#]]], and is the minimum + * JRE version necessary to run this applet. minimumVersion is optional, + * defaulting to the value "1.1" (which matches any JRE). + * If an equal or greater JRE is detected, runApplet() will call + * writeAppletTag(attributes, parameters) to output the applet tag, + * otherwise it will call installJRE(minimumVersion + '+'). + * + * After installJRE() is called, the script will attempt to detect that the + * JRE installation has completed and begin running the applet, but there + * are circumstances (such as when the JRE installation requires a browser + * restart) when this cannot be fulfilled. + * + * As with writeAppletTag(), this function should only be called prior to + * the web page being completely rendered. Note that version wildcards + * (star (*) and plus (+)) are not supported, and including them in the + * minimumVersion will result in an error message. + */ + runApplet: function(attributes, parameters, minimumVersion) { + if (minimumVersion == 'undefined' || minimumVersion == null) { + minimumVersion = '1.1'; + } + + var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$"; + + var matchData = minimumVersion.match(regex); + + if (deployJava.returnPage == null) { + // if there is an install, come back here and run the applet + deployJava.returnPage = document.location; + } + + if (matchData != null) { + var browser = deployJava.getBrowser(); + if ((browser != '?') && (browser != 'Safari')) { + if (deployJava.versionCheck(minimumVersion + '+')) { + deployJava.writeAppletTag(attributes, parameters); + } else if (deployJava.installJRE(minimumVersion + '+')) { + // after successfull install we need to refresh page to pick + // pick up new plugin + deployJava.refresh(); + location.href = document.location; + deployJava.writeAppletTag(attributes, parameters); + } + } else { + // for unknown or Safari - just try to show applet + deployJava.writeAppletTag(attributes, parameters); + } + } else { + if (deployJava.debug) { + alert('Invalid minimumVersion argument to runApplet():' + + minimumVersion); + } + } + }, + + + /** + * Outputs an applet tag with the specified attributes and parameters, where + * both attributes and parameters are associative arrays. Each key/value + * pair in attributes becomes an attribute of the applet tag itself, while + * key/value pairs in parameters become tags. No version checking + * or other special behaviors are performed; the tag is simply written to + * the page using document.writeln(). + * + * As document.writeln() is generally only safe to use while the page is + * being rendered, you should never call this function after the page + * has been completed. + */ + writeAppletTag: function(attributes, parameters) { + var s = '<' + 'applet '; + for (var attribute in attributes) { + s += (' ' + attribute + '="' + attributes[attribute] + '"'); + } + s += '>'; + document.write(s); + + if (parameters != 'undefined' && parameters != null) { + for (var parameter in parameters) { + s = ''; + document.write(s); + } + } + document.write('<' + '/' + 'applet' + '>'); + }, + + + /** + * Returns true if there is a matching JRE version currently installed + * (among those detected by getJREs()). The versionPattern string is + * of the form #[.#[.#[_#]]][+|*], which includes strings such as "1.4", + * "1.5.0*", and "1.6.0_02+". + * A star (*) means "any version within this family" and a plus (+) means + * "any version greater or equal to the specified version". "1.5.0*" + * matches 1.5.0_06 but not 1.6.0_01, whereas "1.5.0+" matches both. + * + * If the versionPattern does not include all four version components + * but does not end with a star or plus, it will be treated as if it + * ended with a star. "1.5" is exactly equivalent to "1.5*", and will + * match any version number beginning with "1.5". + * + * If getJREs() is unable to detect the precise version number, a match + * could be ambiguous. For example if getJREs() detects "1.5", there is + * no way to know whether the JRE matches "1.5.0_06+". versionCheck() + * compares only as much of the version information as could be detected, + * so versionCheck("1.5.0_06+") would return true in in this case. + * + * Invalid versionPattern will result in a JavaScript error alert. + * versionPatterns which are valid but do not match any existing JRE + * release (e.g. "32.65+") will always return false. + */ + versionCheck: function(versionPattern) + { + var index = 0; + var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$"; + + var matchData = versionPattern.match(regex); + + if (matchData != null) { + var familyMatch = true; + + var patternArray = new Array(); + + for (var i = 1; i < matchData.length; ++i) { + // browser dependency here. + // Fx sets 'undefined', IE sets '' string for unmatched groups + if ((typeof matchData[i] == 'string') && (matchData[i] != '')) { + patternArray[index] = matchData[i]; + index++; + } + } + + if (patternArray[patternArray.length-1] == '+') { + familyMatch = false; + patternArray.length--; + } else { + if (patternArray[patternArray.length-1] == '*') { + patternArray.length--; + } + } + + var list = deployJava.getJREs(); + for (var i = 0; i < list.length; ++i) { + if (deployJava.compareVersionToPattern(list[i], patternArray, + familyMatch)) { + return true; + } + } + + return false; + } else { + alert('Invalid versionPattern passed to versionCheck: ' + + versionPattern); + return false; + } + }, + + + /** + * Returns true if an installation of Java Web Start of the specified + * minimumVersion can be detected. minimumVersion is optional, and + * if not specified, '1.4.2' will be used. + * (Versions earlier than 1.4.2 may not be detected.) + */ + isWebStartInstalled: function(minimumVersion) { + + var browser = deployJava.getBrowser(); + if ((browser == '?') || (browser == 'Safari')) { + // we really don't know - better to try to use it than reinstall + return true; + } + + if (minimumVersion == 'undefined' || minimumVersion == null) { + minimumVersion = '1.4.2'; + } + + var retval = false; + var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$"; + var matchData = minimumVersion.match(regex); + + if (matchData != null) { + retval = deployJava.versionCheck(minimumVersion + '+'); + } else { + if (deployJava.debug) { + alert('Invalid minimumVersion argument to isWebStartInstalled(): ' + minimumVersion); + } + retval = deployJava.versionCheck('1.4.2+'); + } + return retval; + }, + + + /** + * Outputs a launch button for the specified JNLP URL. When clicked, the + * button will ensure that an appropriate JRE is installed and then launch + * the JNLP application. minimumVersion is of the form #[.#[.#[_#]]], and + * is the minimum JRE version necessary to run this JNLP application. + * minimumVersion is optional, and if it is not specified, '1.4.2' + * will be used. + * If an appropriate JRE or Web Start installation is detected, + * the JNLP application will be launched, otherwise installLatestJRE() + * will be called. + * + * After installLatestJRE() is called, the script will attempt to detect + * that the JRE installation has completed and launch the JNLP application, + * but there are circumstances (such as when the JRE installation + * requires a browser restart) when this cannot be fulfilled. + */ + createWebStartLaunchButton: function(jnlp, minimumVersion) { + + if (deployJava.returnPage == null) { + // if there is an install, come back and run the jnlp file + deployJava.returnPage = jnlp; + } + + var url = 'javascript:' + + 'if (!deployJava.isWebStartInstalled("' + + minimumVersion + '")) {' + + 'if (deployJava.installLatestJRE()) {' + + 'if (deployJava.launch("' + jnlp + '")) {}' + + '}' + + '} else {' + + 'if (deployJava.launch("' + jnlp + '")) {}' + + '}'; + + document.write('<' + 'a href="' + url + + '" onMouseOver="window.status=\'\'; ' + + 'return true;"><' + 'img ' + + 'src="' + deployJava.launchButtonPNG + '" ' + + 'border="0" /><' + '/' + 'a' + '>'); + }, + + + /** + * Launch a JNLP application, (using the plugin if available) + */ + launch: function(jnlp) { + if (deployJava.isPluginInstalled()) { + return deployJava.getPlugin().launch(jnlp); + } else { + document.location=jnlp; + return true; + } + }, + + + /* + * returns true if the ActiveX or XPI plugin is installed + */ + isPluginInstalled: function() { + var plugin = deployJava.getPlugin(); + if (plugin && plugin.jvms) { + return true; + } else { + return false; + } + }, + + /* + * returns true if the plugin is installed and AutoUpdate is enabled + */ + isAutoUpdateEnabled: function() { + if (deployJava.isPluginInstalled()) { + return deployJava.getPlugin().isAutoUpdateEnabled(); + } + return false; + }, + + /* + * sets AutoUpdate on if plugin is installed + */ + setAutoUpdateEnabled: function() { + if (deployJava.isPluginInstalled()) { + return deployJava.getPlugin().setAutoUpdateEnabled(); + } + return false; + }, + + /* + * sets the preferred install type : null, online, kernel + */ + setInstallerType: function(type) { + deployJava.installType = type; + if (deployJava.isPluginInstalled()) { + return deployJava.getPlugin().setInstallerType(type); + } + return false; + }, + + /* + * sets additional package list - to be used by kernel installer + */ + setAdditionalPackages: function(packageList) { + if (deployJava.isPluginInstalled()) { + return deployJava.getPlugin().setAdditionalPackages( + packageList); + } + return false; + }, + + /* + * sets preference to install Early Access versions if available + */ + setEarlyAccess: function(enabled) { + deployJava.EAInstallEnabled = enabled; + }, + + /* + * Determines if the next generation plugin (Plugin II) is default + */ + isPlugin2: function() { + if (deployJava.isPluginInstalled()) { + try { + return deployJava.getPlugin().isPlugin2(); + } catch (err) { + // older plugin w/o isPlugin2() function - just fall through + } + } + return false; + }, + + + getPlugin: function() { + deployJava.refresh(); + var ret = document.getElementById('deployJavaPlugin'); + return ret; + }, + + compareVersionToPattern: function(version, patternArray, familyMatch) { + var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$"; + var matchData = version.match(regex); + + if (matchData != null) { + var index = 0; + var result = new Array(); + + for (var i = 1; i < matchData.length; ++i) { + if ((typeof matchData[i] == 'string') && (matchData[i] != '')) + { + result[index] = matchData[i]; + index++; + } + } + + var l = Math.min(result.length, patternArray.length); + + if (familyMatch) { + for (var i = 0; i < l; ++i) { + if (result[i] != patternArray[i]) return false; + } + + return true; + } else { + for (var i = 0; i < l; ++i) { + if (result[i] < patternArray[i]) { + return false; + } else if (result[i] > patternArray[i]) { + return true; + } + } + + return true; + } + } else { + return false; + } + }, + + + getBrowser: function() { + var browser = navigator.userAgent.toLowerCase(); + + if (deployJava.debug) { + alert('userAgent -> ' + browser); + } + + if ((navigator.vendor) && + (navigator.vendor.toLowerCase().indexOf('apple') != -1) && + (browser.indexOf('safari') != -1)) { + if (deployJava.debug) { + alert('We claim to have detected "Safari".'); + } + return 'Safari'; + } else if (browser.indexOf('msie') != -1) { + if (deployJava.debug) { + alert('We claim to have detected "IE".'); + } + return 'MSIE'; + } else if ((browser.indexOf('mozilla') != -1) || + (browser.indexOf('firefox') != -1)) { + if (deployJava.debug) { + alert('We claim to have detected a Netscape family browser.'); + } + return 'Netscape Family'; + } else { + if (deployJava.debug) { + alert('We claim to have failed to detect a browser.'); + } + return '?'; + } + }, + + + testUsingActiveX: function(version) { + var objectName = 'JavaWebStart.isInstalled.' + version + '.0'; + + if (!ActiveXObject) { + if (deployJava.debug) { + alert ('Browser claims to be IE, but no ActiveXObject object?'); + } + return false; + } + + try { + return (new ActiveXObject(objectName) != null); + } catch (exception) { + return false; + } + }, + + + testForMSVM: function() { + var clsid = '{08B0E5C0-4FCB-11CF-AAA5-00401C608500}'; + + if (typeof oClientCaps != 'undefined') { + var v = oClientCaps.getComponentVersion(clsid, "ComponentID"); + if ((v == '') || (v == '5,0,5000,0')) { + return false; + } else { + return true; + } + } else { + return false; + } + }, + + + testUsingMimeTypes: function(version) { + if (!navigator.mimeTypes) { + if (deployJava.debug) { + alert ('Browser claims to be Netscape family, but no mimeTypes[] array?'); + } + return false; + } + + for (var i = 0; i < navigator.mimeTypes.length; ++i) { + s = navigator.mimeTypes[i].type; + var m = s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/); + if (m != null) { + if (deployJava.compareVersions(m[1], version)) { + return true; + } + } + } + return false; + }, + + + testUsingPluginsArray: function(version) { + if ((!navigator.plugins) || (!navigator.plugins.length)) { + if (deployJava.debug) { + alert ('Browser claims to be Safari, but no plugins[] array?'); + } + return false; + } + + for (var i = 0; i < navigator.plugins.length; ++i) { + s = navigator.plugins[i].description; + + if (s.search(/^Java Switchable Plug-in/) != -1) { + return true; + } + + m = s.match(/^Java (1\.4\.2|1\.5|1\.6|1\.7).* Plug-in/); + if (m != null) { + if (deployJava.compareVersions(m[1], version)) return true; + } + } + return false; + }, + + IEInstall: function() { + + location.href = deployJava.getJavaURL + + ((deployJava.returnPage != null) ? + ('&returnPage=' + deployJava.returnPage) : '') + + ((deployJava.locale != null) ? + ('&locale=' + deployJava.locale) : '') + + ((deployJava.brand != null) ? ('&brand=' + deployJava.brand) : '') + + ((deployJava.installType != null) ? + ('&type=' + deployJava.installType) : ''); + + // should not actually get here + return false; + }, + + done: function (name, result) { + }, + + FFInstall: function() { + + location.href = deployJava.getJavaURL + + ((deployJava.returnPage != null) ? + ('&returnPage=' + deployJava.returnPage) : '') + + ((deployJava.locale != null) ? + ('&locale=' + deployJava.locale) : '') + + ((deployJava.brand != null) ? ('&brand=' + deployJava.brand) : '') + + ((deployJava.installType != null) ? + ('&type=' + deployJava.installType) : ''); + + // should not actually get here + return false; + }, + + // return true if 'installed' (considered as a JRE version string) is + // greater than or equal to 'required' (again, a JRE version string). + compareVersions: function(installed, required) { + + var a = installed.split('.'); + var b = required.split('.'); + + for (var i = 0; i < a.length; ++i) { + a[i] = Number(a[i]); + } + for (var i = 0; i < b.length; ++i) { + b[i] = Number(b[i]); + } + if (a.length == 2) { + a[2] = 0; + } + + if (a[0] > b[0]) return true; + if (a[0] < b[0]) return false; + + if (a[1] > b[1]) return true; + if (a[1] < b[1]) return false; + + if (a[2] > b[2]) return true; + if (a[2] < b[2]) return false; + + return true; + }, + + + enableAlerts: function() { + deployJava.debug = true; + }, + + poll: function() { + + deployJava.refresh(); + var postInstallJREList = deployJava.getJREs(); + + if ((deployJava.preInstallJREList.length == 0) && + (postInstallJREList.length != 0)) { + clearInterval(deployJava.myInterval); + if (deployJava.returnPage != null) { + location.href = deployJava.returnPage; + }; + } + + if ((deployJava.preInstallJREList.length != 0) && + (postInstallJREList.length != 0) && + (deployJava.preInstallJREList[0] != postInstallJREList[0])) { + clearInterval(deployJava.myInterval); + if (deployJava.returnPage != null) { + location.href = deployJava.returnPage; + } + } + + }, + + writePluginTag: function() { + var browser = deployJava.getBrowser(); + if (browser == 'MSIE') { + document.write('<' + + 'object classid="clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA" ' + + 'id="deployJavaPlugin" width="0" height="0">' + + '<' + '/' + 'object' + '>'); + } else if (browser == 'Netscape Family') { + if (navigator.mimeTypes != null) for (var i=0; + i < navigator.mimeTypes.length; i++) { + if (navigator.mimeTypes[i].type == deployJava.mimeType) { + if (navigator.mimeTypes[i].enabledPlugin) { + document.write('<' + + 'embed id="deployJavaPlugin" type="' + + deployJava.mimeType + '" hidden="true" />'); + } + } + } + } + }, + + refresh: function() { + navigator.plugins.refresh(false); + + var browser = deployJava.getBrowser(); + if (browser == 'Netscape Family') { + var plugin = document.getElementById('deployJavaPlugin'); + // only do this again if no plugin + if (plugin == null) { + if (navigator.mimeTypes != null) for (var i=0; + i < navigator.mimeTypes.length; i++) { + if (navigator.mimeTypes[i].type == deployJava.mimeType) { + if (navigator.mimeTypes[i].enabledPlugin) { + document.write('<' + + 'embed id="deployJavaPlugin" type="' + + deployJava.mimeType + '" hidden="true" />'); + } + } + } + } + } + }, + + do_initialize: function() { + deployJava.writePluginTag(); + if (deployJava.locale == null) { + var loc = null; + + if (loc == null) try { + loc = navigator.userLanguage; + } catch (err) { } + + if (loc == null) try { + loc = navigator.systemLanguage; + } catch (err) { } + + if (loc == null) try { + loc = navigator.language; + } catch (err) { } + + if (loc != null) { + loc.replace("-","_") + deployJava.locale = loc; + } + } + } + +}; +deployJava.do_initialize(); + diff --git a/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java b/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java new file mode 100644 index 00000000..cd321c71 --- /dev/null +++ b/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java @@ -0,0 +1,362 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.stal.service; + +import at.gv.egiz.stal.service.impl.STALRequestBrokerImpl; +import at.gv.egiz.stal.service.impl.RequestBrokerSTALFactory; +import at.gv.egiz.stal.service.impl.STALRequestBroker; +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.HashDataInputCallback; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.InfoboxReadResponse; +import at.gv.egiz.stal.QuitRequest; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.SignResponse; +import at.gv.egiz.stal.SignRequest; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * + * @author clemens + */ +public class STALRequestBrokerTest { + + private static final Log log = LogFactory.getLog(STALRequestBrokerTest.class); + protected static STALRequestBroker stal; + + @BeforeClass + public static void setUp() { + RequestBrokerSTALFactory fac = new RequestBrokerSTALFactory(); + stal = (STALRequestBrokerImpl) fac.createSTAL(); + log.debug("Created STAL " + stal.getClass().getName()); + } + + @Ignore + public void testInfoboxRead() { +// try { + + log.debug("*************** test ReadInfoboxRequest for two infoboxes"); + List requests = new ArrayList(); + InfoboxReadRequest r1 = new InfoboxReadRequest(); + r1.setInfoboxIdentifier("infobox1"); + requests.add(r1); + InfoboxReadRequest r2 = new InfoboxReadRequest(); + r2.setInfoboxIdentifier("infobox2"); + requests.add(r2); + + BindingProcessorSimulator bp = new BindingProcessorSimulator(); + bp.setRequests(Collections.singletonList(requests)); + + new Thread(bp, "BindingProcessor").start(); + new Thread(new ServiceSimulator(), "STALService").start(); + + try { + Thread.sleep(1000); + } catch (InterruptedException ex) { + log.error("interrupted: " + ex.getMessage()); + } + } + + @Ignore + public void testSign() { + log.debug("**************** test SignRequest"); + List requests = new ArrayList(); + SignRequest r1 = new SignRequest(); + r1.setKeyIdentifier("keybox1"); + r1.setSignedInfo("1234".getBytes()); + r1.setHashDataInput(new HashDataInputCallback() { + + @Override + public InputStream getHashDataInput(String referenceId) { + return new ByteArrayInputStream("hashdatainput1234".getBytes()); + } + }); + requests.add(r1); + + BindingProcessorSimulator bp = new BindingProcessorSimulator(); + bp.setRequests(Collections.singletonList(requests)); + + new Thread(bp, "BindingProcessor").start(); +// new Thread(bp2, "BindingProcessor2").start(); + new Thread(new ServiceSimulator(), "STALService").start(); + + try { + Thread.sleep(1000); + } catch (InterruptedException ex) { + log.error("interrupted: " + ex.getMessage()); + } + } + + @Ignore + public void testResponseTimeout() { + log.debug("**************** test SignRequest with responses timeout"); + List requests = new ArrayList(); + SignRequest r1 = new SignRequest(); + r1.setKeyIdentifier("keybox1"); + r1.setSignedInfo("1234".getBytes()); + r1.setHashDataInput(new HashDataInputCallback() { + + @Override + public InputStream getHashDataInput(String referenceId) { + return new ByteArrayInputStream("hashdatainput1234".getBytes()); + } + }); + requests.add(r1); + + BindingProcessorSimulator bp = new BindingProcessorSimulator(); + bp.setRequests(Collections.singletonList(requests)); + + new Thread(bp, "BindingProcessor").start(); + new Thread(new TimeoutServiceSimulator(), "STALService").start(); + + try { + Thread.sleep(STALRequestBroker.TIMEOUT_MS + 1); + } catch (InterruptedException ex) { + log.error("interrupted: " + ex.getMessage()); + } + } + + @Ignore + public void testRequestTimeout() { + log.debug("**************** test requests timeout"); + TimeoutBindingProcessorSimulator bp = new TimeoutBindingProcessorSimulator(); + + new Thread(bp, "BindingProcessor").start(); + new Thread(new ServiceSimulator(), "STALService").start(); + + try { + Thread.sleep(STALRequestBroker.TIMEOUT_MS + 1); + } catch (InterruptedException ex) { + log.error("interrupted: " + ex.getMessage()); + } + } + + @Test + public void testMultipleServices() { + log.debug("**************** test multiple SignRequests"); + List requests = new ArrayList(); + SignRequest r1 = new SignRequest(); + r1.setKeyIdentifier("keybox1"); + r1.setSignedInfo("1234".getBytes()); + r1.setHashDataInput(new HashDataInputCallback() { + + @Override + public InputStream getHashDataInput(String referenceId) { + return new ByteArrayInputStream("hashdatainput1234".getBytes()); + } + }); + requests.add(r1); + + List requests2 = new ArrayList(); + SignRequest r2 = new SignRequest(); + r2.setKeyIdentifier("keybox2"); + r2.setSignedInfo("6789".getBytes()); + r2.setHashDataInput(new HashDataInputCallback() { + + @Override + public InputStream getHashDataInput(String referenceId) { + return new ByteArrayInputStream("hashdatainput6789".getBytes()); + } + }); + requests2.add(r2); + + BindingProcessorSimulator bp = new BindingProcessorSimulator(); + List> requestList = new ArrayList>(); + requestList.add(requests); + requestList.add(requests2); + bp.setRequests(requestList); + + new Thread(bp, "BindingProcessor").start(); +// new Thread(bp2, "BindingProcessor2").start(); + new Thread(new ServiceSimulator(), "STALService1").start(); + new Thread(new ServiceSimulator(), "STALService2").start(); + + try { + Thread.sleep(1000); + } catch (InterruptedException ex) { + log.error("interrupted: " + ex.getMessage()); + } + } + + class ServiceSimulator implements Runnable { + + @Override + public void run() { + try { + // first call w/ empty response list + log.debug("calling stal.nextRequest"); + List requests = stal.nextRequest(null); //new ArrayList()); + log.debug("got " + requests.size() + " requests. processing..."); + Thread.sleep(1); + List responses = new ArrayList(); + for (STALRequest request : requests) { + if (request instanceof InfoboxReadRequest) { + InfoboxReadResponse r = new InfoboxReadResponse(); + r.setInfoboxValue("dummyInfobox".getBytes()); + responses.add(r); + } else if (request instanceof SignRequest) { + + log.debug("calling stal.getCurrentHashDataInputCallback"); + HashDataInputCallback cb = stal.getHashDataInput(); + assertNotNull(cb); + InputStream hd = cb.getHashDataInput("1234"); + byte[] data = new byte[hd.available()]; + hd.read(data); + log.debug("got HashDataInput " + new String(data)); + + + SignResponse r = new SignResponse(); + r.setSignatureValue("dummySignature".getBytes()); + responses.add(r); + } else if (request instanceof QuitRequest) { + log.debug("received UNEXPECTED QUIT request"); + return; + } + } + +// if (requests.size() > 0) { +// log.debug("calling stal.setResponse with " + requests.size() + " responses"); +// stal.setResponse(responses); +// } + log.debug("calling stal.nextRequest with " + responses.size() + " responses"); + requests = stal.nextRequest(responses); + for (STALRequest request : requests) { + if (request instanceof QuitRequest) { + log.debug("got QUIT request"); + } else { + log.debug("expected QUIT request, got " + request.getClass().getName()); + } + } + } catch (IOException ex) { + log.error(ex.getMessage()); + } catch (InterruptedException ex) { + log.error(ex.getMessage()); + } + } + } + + class TimeoutServiceSimulator implements Runnable { + + @Override + public void run() { + try { + // first call w/ empty response list + log.debug("calling stal.nextRequest"); + List requests = stal.nextRequest(null); //new ArrayList()); + log.debug("got " + requests.size() + " requests. processing..."); + Thread.sleep(1); + for (STALRequest request : requests) { +// if (request instanceof InfoboxReadRequest) { + if (request instanceof SignRequest) { + log.debug("calling stal.getCurrentHashDataInputCallback"); + HashDataInputCallback cb = stal.getHashDataInput(); + assertNotNull(cb); + InputStream hd = cb.getHashDataInput("1234"); + byte[] data = new byte[hd.available()]; + hd.read(data); + log.debug("got HashDataInput " + new String(data)); + } else if (request instanceof QuitRequest) { + log.debug("received UNEXPECTED QUIT requests"); + return; + } + } + log.debug("simulating timeout ..."); + } catch (IOException ex) { + log.error(ex.getMessage()); + } catch (InterruptedException ex) { + log.error(ex.getMessage()); + } + } + } + + class BindingProcessorSimulator implements Runnable { + + List> requestsLists; + + public void setRequests(List> requests) { + this.requestsLists = requests; + } + + @Override + public void run() { + + //simulate SLCommand execution + for (List requests : requestsLists) { + execSLCommand(requests); + + log.debug("SLCommand finished, calling stal.handleReqeusts(QUIT)"); + stal.handleRequest(Collections.singletonList((STALRequest) new QuitRequest())); + log.debug("QUIT returned (waiting for applet reload)"); + } + + } + + public void execSLCommand(List requests) { + int numReq = requests.size(); + log.debug("SLCommand calling stal.handleRequests " + numReq + " requests"); + List responses = stal.handleRequest(requests); + assertEquals(numReq, responses.size()); + for (int i = 0; i < numReq; i++) { + STALRequest request = requests.get(i); + STALResponse response = responses.get(i); + + if (response instanceof ErrorResponse) { + log.warn("SLCommand received unexpected error response from STAL: " + ((ErrorResponse) response).getErrorCode()); + } else if (request instanceof InfoboxReadRequest) { + assertTrue(response instanceof InfoboxReadResponse); + String infobox = new String(((InfoboxReadResponse) response).getInfoboxValue()); + log.debug("SLCommand received expected InfoboxReadResponse from STAL: " + infobox); + } else if (request instanceof SignRequest) { + assertTrue(response instanceof SignResponse); + String signVal = new String(((SignResponse) response).getSignatureValue()); + log.debug("SLCommand received expected SignResponse from STAL: " + signVal); + } else { + log.error("***** RequestType: " + request.getClass() + " TODO"); + } + //TODO + } + + } + } + + class TimeoutBindingProcessorSimulator implements Runnable { + + @Override + public void run() { + + //simulate SLCommand execution + log.debug("simulating timeout ..."); + } + } +} diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE.txt b/NOTICE.txt new file mode 100644 index 00000000..2f25af7d --- /dev/null +++ b/NOTICE.txt @@ -0,0 +1,17 @@ +MOCCA Project +Copyright 2008 Federal Chancellery Austria and Graz University of Technology + +This product includes software developed at +E-Government Innovation Center (www.egiz.gv.at). + +E-Government Innovation Center is a joint initiative of +Federal Chancellery Austria and Graz University of Technology. + + +This product includes software developed by third parties +and provided under an open source license (www.opensource.org). + + +This product includes software provided by +Stiftung Secure Information and Communication Technologies SIC +(www.sic.st). diff --git a/STAL/catalog.xml b/STAL/catalog.xml new file mode 100644 index 00000000..38c98894 --- /dev/null +++ b/STAL/catalog.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/STAL/pom.xml b/STAL/pom.xml new file mode 100644 index 00000000..6b49ed47 --- /dev/null +++ b/STAL/pom.xml @@ -0,0 +1,48 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + STAL + STAL + 1.0-SNAPSHOT + + + commons-logging + commons-logging + + + + \ No newline at end of file diff --git a/STAL/private/cache/retriever/catalog.xml b/STAL/private/cache/retriever/catalog.xml new file mode 100644 index 00000000..c40b0d50 --- /dev/null +++ b/STAL/private/cache/retriever/catalog.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/STAL/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd b/STAL/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd new file mode 100644 index 00000000..f9a884c0 --- /dev/null +++ b/STAL/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd @@ -0,0 +1,362 @@ + + + + Schema for JAXB 2.0 binding declarations. + + + +Model group that represents a binding declaration. Each new binding +declaration added to the jaxb namespace that is not restricted to +globalBindings should be added as a child element to this model group. + + + + + + + + + + + + + + + + + +Used to specify the version of the binding schema on the schema element for +inline annotations or jaxb:bindings for external binding. + + + + +Attributes used for property customization. The attribute group can be +referenced either from the globalBindings declaration or from the +property declaration. The following defaults are defined by the JAXB +specification in global scope only. Thus they apply when the +propertyAttributes group is referenced from the globalBindings declaration +but not when referenced from the property declaration. + collectionType a class that implements java.util.List. + fixedAttributeAsConstantProperty false + enableFailFastCheck false + generateIsSetMethod false + optionalProperty wrapper + generateElementProperty false + attachmentRef default + + + + + + + + + + + + + + + + + + + + + + + + + + + Customize XMLNames to Java id mapping + + + + + + + + + + Customization values defined in global scope. + + + + + + allows extension binding declarations to be specified. + + + + + + + + + + + + + + + + + + + + + + + Customization values with schema scope + + + + + + + + + Customize interface and implementation class. + + + + + + Java class name without package prefix. + + + Implementation class name including package prefix. + + + Default value derived from [jaxb:globalBindings]@generateValueClass. + + + + + Customize property. + + + + + + + + + + + Data type conversions; overriding builtins + + + name of the java type to which xml type is to be bound. + + + xml type to which java datatype has to be bound.Must be present when javaType is scoped to globalBindings + + + + + +If true, the parsMethod and printMethod must reference a method +signtature that has a second parameter of type NamespaceContext. + + + + + + Bind to a type safe enumeration class. + + + + + + + + + + + Enumeration member name in a type safe enumeration class. + + + + + + + + + + + + + + + + + +The name attribute for [baseType] enables more precise control over the actual base type for a JAXB property. This customization enables specifying a more general base type than the property's default base type. The name attribute value must be a fully qualified Java class name. Additionally, this Java class must be a super interface/class of the default Java base type for the property. When the default base type is a primitive type, consider the default Java base type to be the Java wrapper class of that primitive type.This customization is useful to enable simple type substitution for a JAXB property representing with too restrictive of a default base type. + + + + + + + + + + + + + + Treate underscore in XML Name to Java identifier mapping. + + + + + + + +XML types or types derived from them which have enumeration facet(s) which are be mapped to typesafeEnumClass by default. The following types cannot be specified in this list: "xsd:QName", "xsd:base64Binary", "xsd:hexBinary", "xsd:date", "xsd:time", "xsd:dateTime", "xsd:duration","xsd:gDay", "xsd:gMonth", "xsd:Year", "xsd:gMonthDay", "xsd:YearMonth", "xsd:ID", "xsd:IDREF", "xsd:NOTATION" + + + + + Used to customize how to handle name collisions. + + + + + + + + Placeholder type to indicate Legal Java identifier. + + + + Rule to transform an Xml name into another Xml name + + prepend the string to QName. + + + Append the string to QName. + + + + Allows transforming an xml name into another xml name. Use case UDDI 2.0 schema. + + + Mapping rule for type definitions. + + + Mapping rule for elements + + + Mapping rule for model group + + + Mapping rule for class names generated for an anonymous type. + + + + + +A binding compiler only processes this attribute when it occurs on an +an instance of xs:schema element. The value of this attribute is a +whitespace-separated list of namespace prefixes. The namespace bound +to each of the prefixes is designated as a customization declaration +namespace. + + + + + + +Binding declaration(s) for a remote schema. +If attribute node is set, the binding declaraions +are associated with part of the remote schema +designated by schemaLocation attribute. The node +attribute identifies the node in the remote schema +to associate the binding declaration(s) with. + + + + + + + + + + + +Location of the remote schema to associate binding declarations with. + + + + +The value of the string is an XPATH 1.0 compliant string that +resolves to a node in a remote schema to associate +binding declarations with. The remote schema is specified +by the schemaLocation attribute occuring in the current +element or in a parent of this element. + + + + +Used to indicate the version of binding declarations. Only valid on root level bindings element. Either this or "jaxb:version" attribute but not both may be specified. + + + + +Used to indicate the version of binding declarations. Only valid on root level bindings element. Either this attribute or "version" attribute but not both may be specified. + + + + + + + + + + + + + + + + + + + Specify DOM API to bind to JAXB property to. + + + + + Disable MTOM/XOP encoding for this binary data. Annotation can be placed on a type defintion that derives from a W3C XSD binary data type or on an element that has a type that is or derives from a W3C XSD binary data type. + + + + + + + + + diff --git a/STAL/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd b/STAL/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd new file mode 100644 index 00000000..2e9a2729 --- /dev/null +++ b/STAL/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd @@ -0,0 +1,2534 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]> + + + + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + + + + + + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part + + + + + The simpleType element and all of its members are defined + towards the end of this schema document + + + + + + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + + + + + + + + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + + + + + + + + + + + + + This type is extended by all types which allow annotation + other than <schema> itself + + + + + + + + + + + + + + + + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension. + + + + + + + + + + + + + This group is for the + elements which can self-redefine (see <redefine> below). + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction} + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction, list, union} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for maxOccurs + + + + + + + + + + + + for all particles + + + + + + + for element, group and attributeGroup, + which both define and reference + + + + + + + + 'complexType' uses this + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This branch is short for + <complexContent> + <restriction base="xs:anyType"> + ... + </restriction> + </complexContent> + + + + + + + + + + + + + + + Will be restricted to required or forbidden + + + + + + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overrides any setting on complexType parent. + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + No typeDefParticle group reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {substitution, extension, + restriction} + + + + + + + + + + + + + + + + + + + + + + + + + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for explicit groups, named top-level groups and + group references + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for the three kinds of group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint + + + + + + + + + + restricted max/min + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only elements allowed inside + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute' + + + + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in selectors + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in fields + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + + + + + + + + + + + + + + + + + + + + + + + + + + + The three kinds of identity constraints, all with + type of or derived from 'keybase'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + A public identifier, per ISO 8879 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + notations for use within XML Schema schemas + + + + + + + + + Not the real urType, but as close an approximation as we can + get in the XML representation + + + + + + + + + + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + + + + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + + + + + + + + + + Now the derived primitive types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 7 from the XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 5 from the XML spec + + + + + + + + + + + + + + + pattern matches production 4 from the Namespaces in XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + #all or (possibly empty) subset of {restriction, union, list} + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Can be restricted to required or forbidden + + + + + + + + + + + + + + + + + + Required at the top level + + + + + + + + + + + + + + + + + + + Forbidden when nested + + + + + + + + + + + + + + + + + + + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + base attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + + + memberTypes attribute must be non-empty or there must be + at least one simpleType child + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/STAL/src/main/java/META-INF/MANIFEST.MF b/STAL/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/STAL/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/STAL/src/main/java/at/gv/egiz/stal/ErrorResponse.java b/STAL/src/main/java/at/gv/egiz/stal/ErrorResponse.java new file mode 100644 index 00000000..11d8637a --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/ErrorResponse.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ErrorResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ErrorResponseType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}ResponseType">
+ *       <sequence>
+ *         <element name="ErrorCode" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="ErrorMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ErrorResponseType", propOrder = { + "errorCode", + "errorMessage" +}) +public class ErrorResponse + extends STALResponse +{ + + @XmlTransient + public static final int ERR_4000 = 4000; + + @XmlElement(name = "ErrorCode") + protected int errorCode; + @XmlElement(name = "ErrorMessage", required = true) + protected String errorMessage; + + public ErrorResponse() { + this.errorCode = ERR_4000; + } + + public ErrorResponse(int errorCode) { + this.errorCode = errorCode; + } + + /** + * Gets the value of the errorCode property. + * + */ + public int getErrorCode() { + return errorCode; + } + + /** + * Sets the value of the errorCode property. + * + */ + public void setErrorCode(int value) { + this.errorCode = value; + } + + /** + * Gets the value of the errorMessage property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getErrorMessage() { + return errorMessage; + } + + /** + * Sets the value of the errorMessage property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setErrorMessage(String value) { + this.errorMessage = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/HashDataInputCallback.java b/STAL/src/main/java/at/gv/egiz/stal/HashDataInputCallback.java new file mode 100644 index 00000000..f1ccf937 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/HashDataInputCallback.java @@ -0,0 +1,24 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.stal; + +import java.io.InputStream; + +public interface HashDataInputCallback { + + InputStream getHashDataInput(String referenceId); +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/InfoboxReadRequest.java b/STAL/src/main/java/at/gv/egiz/stal/InfoboxReadRequest.java new file mode 100644 index 00000000..783113ab --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/InfoboxReadRequest.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxReadRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadRequestType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}RequestType">
+ *       <sequence>
+ *         <element name="InfoboxIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="DomainIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadRequestType", propOrder = { + "infoboxIdentifier", + "domainIdentifier" +}) +public class InfoboxReadRequest + extends STALRequest +{ + + @XmlElement(name = "InfoboxIdentifier", required = true) + protected String infoboxIdentifier; + @XmlElement(name = "DomainIdentifier") + protected String domainIdentifier; + + /** + * Gets the value of the infoboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfoboxIdentifier() { + return infoboxIdentifier; + } + + /** + * Sets the value of the infoboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfoboxIdentifier(String value) { + this.infoboxIdentifier = value; + } + + /** + * Gets the value of the domainIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDomainIdentifier() { + return domainIdentifier; + } + + /** + * Sets the value of the domainIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDomainIdentifier(String value) { + this.domainIdentifier = value; + } + + public String toString() { + return "InfoboxReadRequest for: "+infoboxIdentifier; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/InfoboxReadResponse.java b/STAL/src/main/java/at/gv/egiz/stal/InfoboxReadResponse.java new file mode 100644 index 00000000..54476764 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/InfoboxReadResponse.java @@ -0,0 +1,78 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxReadResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadResponseType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}ResponseType">
+ *       <sequence>
+ *         <element name="InfoboxValue" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadResponseType", propOrder = { + "infoboxValue" +}) +public class InfoboxReadResponse + extends STALResponse +{ + + @XmlElement(name = "InfoboxValue", required = true) + protected byte[] infoboxValue; + + /** + * Gets the value of the infoboxValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getInfoboxValue() { + return infoboxValue; + } + + /** + * Sets the value of the infoboxValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setInfoboxValue(byte[] value) { + this.infoboxValue = ((byte[]) value); + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/QuitRequest.java b/STAL/src/main/java/at/gv/egiz/stal/QuitRequest.java new file mode 100644 index 00000000..ed180d58 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/QuitRequest.java @@ -0,0 +1,48 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for QuitRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="QuitRequestType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}RequestType">
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "QuitRequestType") +public class QuitRequest + extends STALRequest +{ + + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/STAL.java b/STAL/src/main/java/at/gv/egiz/stal/STAL.java new file mode 100644 index 00000000..de29de9a --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/STAL.java @@ -0,0 +1,43 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.stal; + +import java.util.List; +import java.util.Locale; + +/** + * Interface for all implementations of the Security Tokean Abstraction Layer. + * This interface is used by the BKU to handle all security token related parts. + * + * + */ +public interface STAL { + + /** + * Handles a list of security token commands. + * @param aRequestList + * @return + */ + public List handleRequest(List aRequestList); + + /** + * Sets the preferred locale for userinteraction (e.g. PIN dialogs). + * If the locale is not set the default locale will be used. + * @param locale must not be null. + */ + public void setLocale(Locale locale); +} \ No newline at end of file diff --git a/STAL/src/main/java/at/gv/egiz/stal/STALFactory.java b/STAL/src/main/java/at/gv/egiz/stal/STALFactory.java new file mode 100644 index 00000000..e7b3edd1 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/STALFactory.java @@ -0,0 +1,22 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.stal; + +public interface STALFactory { + + public STAL createSTAL(); +} \ No newline at end of file diff --git a/STAL/src/main/java/at/gv/egiz/stal/STALRequest.java b/STAL/src/main/java/at/gv/egiz/stal/STALRequest.java new file mode 100644 index 00000000..0c3f88c2 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/STALRequest.java @@ -0,0 +1,54 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

TODO update java doc: not only for RequestType complex type.

+ * + *

Java class for RequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RequestType") +@XmlSeeAlso({ + SignRequest.class, + InfoboxReadRequest.class, + QuitRequest.class +}) +public abstract class STALRequest { + + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/STALResponse.java b/STAL/src/main/java/at/gv/egiz/stal/STALResponse.java new file mode 100644 index 00000000..91ef3c24 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/STALResponse.java @@ -0,0 +1,89 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

TODO update java doc: not only for ResponseType complex type.

+ * + *

Java class for ResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ResponseType") +@XmlSeeAlso({ + ErrorResponse.class, + SignResponse.class, + InfoboxReadResponse.class +}) +public abstract class STALResponse { + + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/SignRequest.java b/STAL/src/main/java/at/gv/egiz/stal/SignRequest.java new file mode 100644 index 00000000..8c996d2c --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/SignRequest.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; + +/** + *

Java class for SignRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignRequestType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}RequestType">
+ *       <sequence>
+ *         <element name="KeyIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="SignedInfo" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignRequestType", propOrder = { + "keyIdentifier", + "signedInfo" +}) +public class SignRequest + extends STALRequest { + + @XmlElement(name = "KeyIdentifier", required = true) + protected String keyIdentifier; + @XmlElement(name = "SignedInfo", required = true) + protected byte[] signedInfo; + @XmlTransient + protected HashDataInputCallback hashData; + + /** + * Gets the value of the keyIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKeyIdentifier() { + return keyIdentifier; + } + + /** + * Sets the value of the keyIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKeyIdentifier(String value) { + this.keyIdentifier = value; + } + + /** + * Gets the value of the signedInfo property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getSignedInfo() { + return signedInfo; + } + + /** + * Sets the value of the signedInfo property. + * + * @param value + * allowed object is + * byte[] + */ + public void setSignedInfo(byte[] value) { + this.signedInfo = ((byte[]) value); + } + + public HashDataInputCallback getHashDataInput() { + return hashData; + } + + public void setHashDataInput(HashDataInputCallback hashData) { + this.hashData = hashData; + } +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/SignResponse.java b/STAL/src/main/java/at/gv/egiz/stal/SignResponse.java new file mode 100644 index 00000000..462af30b --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/SignResponse.java @@ -0,0 +1,78 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignResponseType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}ResponseType">
+ *       <sequence>
+ *         <element name="SignatureValue" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignResponseType", propOrder = { + "signatureValue" +}) +public class SignResponse + extends STALResponse +{ + + @XmlElement(name = "SignatureValue", required = true) + protected byte[] signatureValue; + + /** + * Gets the value of the signatureValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getSignatureValue() { + return signatureValue; + } + + /** + * Sets the value of the signatureValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setSignatureValue(byte[] value) { + this.signatureValue = ((byte[]) value); + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/CanonicalizationMethodType.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/CanonicalizationMethodType.java new file mode 100644 index 00000000..35de75fe --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/CanonicalizationMethodType.java @@ -0,0 +1,125 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CanonicalizationMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CanonicalizationMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CanonicalizationMethodType", propOrder = { + "content" +}) +public class CanonicalizationMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/DigestMethodType.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/DigestMethodType.java new file mode 100644 index 00000000..9c6b01f4 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/DigestMethodType.java @@ -0,0 +1,127 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for DigestMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DigestMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DigestMethodType", propOrder = { + "content" +}) +public class DigestMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Element } + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/ObjectFactory.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/ObjectFactory.java new file mode 100644 index 00000000..c5f99f01 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/ObjectFactory.java @@ -0,0 +1,178 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * Do not use this package in jaxb context together with org.w3._2000._09.xmldsig_ + *
+ * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the at.gv.egiz.stal.signedinfo package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod"); + private final static QName _Reference_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Reference"); + private final static QName _SignatureMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureMethod"); + private final static QName _SignedInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignedInfo"); + private final static QName _Transforms_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms"); + private final static QName _DigestMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestMethod"); + private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.egiz.stal.signedinfo + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link ReferenceType } + * + */ + public ReferenceType createReferenceType() { + return new ReferenceType(); + } + + /** + * Create an instance of {@link CanonicalizationMethodType } + * + */ + public CanonicalizationMethodType createCanonicalizationMethodType() { + return new CanonicalizationMethodType(); + } + + /** + * Create an instance of {@link DigestMethodType } + * + */ + public DigestMethodType createDigestMethodType() { + return new DigestMethodType(); + } + + /** + * Create an instance of {@link TransformsType } + * + */ + public TransformsType createTransformsType() { + return new TransformsType(); + } + + /** + * Create an instance of {@link SignatureMethodType } + * + */ + public SignatureMethodType createSignatureMethodType() { + return new SignatureMethodType(); + } + + /** + * Create an instance of {@link SignedInfoType } + * + */ + public SignedInfoType createSignedInfoType() { + return new SignedInfoType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalizationMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "CanonicalizationMethod") + public JAXBElement createCanonicalizationMethod(CanonicalizationMethodType value) { + return new JAXBElement(_CanonicalizationMethod_QNAME, CanonicalizationMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Reference") + public JAXBElement createReference(ReferenceType value) { + return new JAXBElement(_Reference_QNAME, ReferenceType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureMethod") + public JAXBElement createSignatureMethod(SignatureMethodType value) { + return new JAXBElement(_SignatureMethod_QNAME, SignatureMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignedInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignedInfo") + public JAXBElement createSignedInfo(SignedInfoType value) { + return new JAXBElement(_SignedInfo_QNAME, SignedInfoType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TransformsType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transforms") + public JAXBElement createTransforms(TransformsType value) { + return new JAXBElement(_Transforms_QNAME, TransformsType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DigestMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod") + public JAXBElement createDigestMethod(DigestMethodType value) { + return new JAXBElement(_DigestMethod_QNAME, DigestMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestValue") + public JAXBElement createDigestValue(byte[] value) { + return new JAXBElement(_DigestValue_QNAME, byte[].class, null, ((byte[]) value)); + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/ReferenceType.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/ReferenceType.java new file mode 100644 index 00000000..12fbf83f --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/ReferenceType.java @@ -0,0 +1,230 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for ReferenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferenceType", propOrder = { + "transforms", + "digestMethod", + "digestValue" +}) +public class ReferenceType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlElement(name = "DigestMethod", required = true) + protected DigestMethodType digestMethod; + @XmlElement(name = "DigestValue", required = true) + protected byte[] digestValue; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + @XmlAttribute(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the digestMethod property. + * + * @return + * possible object is + * {@link DigestMethodType } + * + */ + public DigestMethodType getDigestMethod() { + return digestMethod; + } + + /** + * Sets the value of the digestMethod property. + * + * @param value + * allowed object is + * {@link DigestMethodType } + * + */ + public void setDigestMethod(DigestMethodType value) { + this.digestMethod = value; + } + + /** + * Gets the value of the digestValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getDigestValue() { + return digestValue; + } + + /** + * Sets the value of the digestValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setDigestValue(byte[] value) { + this.digestValue = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignatureMethodType.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignatureMethodType.java new file mode 100644 index 00000000..cfc1f822 --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignatureMethodType.java @@ -0,0 +1,125 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignatureMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureMethodType", propOrder = { + "content" +}) +public class SignatureMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignedInfoType.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignedInfoType.java new file mode 100644 index 00000000..e93f988c --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/SignedInfoType.java @@ -0,0 +1,183 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignedInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedInfoType", propOrder = { + "canonicalizationMethod", + "signatureMethod", + "reference" +}) +public class SignedInfoType { + + @XmlElement(name = "CanonicalizationMethod", required = true) + protected CanonicalizationMethodType canonicalizationMethod; + @XmlElement(name = "SignatureMethod", required = true) + protected SignatureMethodType signatureMethod; + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the canonicalizationMethod property. + * + * @return + * possible object is + * {@link CanonicalizationMethodType } + * + */ + public CanonicalizationMethodType getCanonicalizationMethod() { + return canonicalizationMethod; + } + + /** + * Sets the value of the canonicalizationMethod property. + * + * @param value + * allowed object is + * {@link CanonicalizationMethodType } + * + */ + public void setCanonicalizationMethod(CanonicalizationMethodType value) { + this.canonicalizationMethod = value; + } + + /** + * Gets the value of the signatureMethod property. + * + * @return + * possible object is + * {@link SignatureMethodType } + * + */ + public SignatureMethodType getSignatureMethod() { + return signatureMethod; + } + + /** + * Sets the value of the signatureMethod property. + * + * @param value + * allowed object is + * {@link SignatureMethodType } + * + */ + public void setSignatureMethod(SignatureMethodType value) { + this.signatureMethod = value; + } + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/TransformsType.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/TransformsType.java new file mode 100644 index 00000000..8f5c1ade --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/TransformsType.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + + +package at.gv.egiz.stal.signedinfo; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for TransformsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformsType", propOrder = { + "any" +}) +public class TransformsType { + + @XmlAnyElement(lax = true) + protected Object any; + + /** + * Gets the value of the any property. + * + * @return + * possible object is + * {@link Element } + * {@link Object } + * + */ + public Object getAny() { + return any; + } + + /** + * Sets the value of the any property. + * + * @param value + * allowed object is + * {@link Element } + * {@link Object } + * + */ + public void setAny(Object value) { + this.any = value; + } + +} diff --git a/STAL/src/main/java/at/gv/egiz/stal/signedinfo/package-info.java b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/package-info.java new file mode 100644 index 00000000..6b323fea --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/signedinfo/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.28 at 08:23:24 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2000/09/xmldsig#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package at.gv.egiz.stal.signedinfo; diff --git a/STAL/src/main/java/at/gv/egiz/stal/util/JCEAlgorithmNames.java b/STAL/src/main/java/at/gv/egiz/stal/util/JCEAlgorithmNames.java new file mode 100644 index 00000000..7e8a767e --- /dev/null +++ b/STAL/src/main/java/at/gv/egiz/stal/util/JCEAlgorithmNames.java @@ -0,0 +1,51 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.stal.util; + +import java.util.HashMap; +import java.util.Map; + +/** + * Maps XML Algorithms to JCE Hash names. + * + */ +public class JCEAlgorithmNames { + + private Map hashNameMap = new HashMap(); + + public static String[] JCE_HASH_NAMES = { "SHA-1" }; + + public static String[] SHA_1_ALGORITMS = { + "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", + "http://www.w3.org/2000/09/xmldsig#sha1" }; + + private static JCEAlgorithmNames instance = new JCEAlgorithmNames(); + + private JCEAlgorithmNames() { + for (String alg : SHA_1_ALGORITMS) { + registerHash(alg, JCE_HASH_NAMES[0]); + } + } + + public static String getJCEHashName(String xmlAlgorithmURI) { + return instance.hashNameMap.get(xmlAlgorithmURI); + } + + public void registerHash(String xmlAlgorithmURI, String jceName) { + hashNameMap.put(xmlAlgorithmURI, jceName); + } +} diff --git a/STALService/pom.xml b/STALService/pom.xml new file mode 100644 index 00000000..93181adb --- /dev/null +++ b/STALService/pom.xml @@ -0,0 +1,22 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + STALService + STAL Service + 1.0-SNAPSHOT + + + + at.gv.egiz + STAL + 1.0-SNAPSHOT + + + \ No newline at end of file diff --git a/STALService/src/main/java/META-INF/MANIFEST.MF b/STALService/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/STALService/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFault.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFault.java new file mode 100644 index 00000000..4db6a91c --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFault.java @@ -0,0 +1,69 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import javax.xml.ws.WebFault; + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.3-b02- + * Generated source version: 2.1 + * + */ +@WebFault(name = "GetHashDataInputFault", targetNamespace = "http://www.egiz.gv.at/stal") +public class GetHashDataInputFault + extends Exception +{ + + /** + * Java type that goes as soapenv:Fault detail element. + * + */ + private GetHashDataInputFaultType faultInfo; + + /** + * + * @param message + * @param faultInfo + */ + public GetHashDataInputFault(String message, GetHashDataInputFaultType faultInfo) { + super(message); + this.faultInfo = faultInfo; + } + + /** + * + * @param message + * @param faultInfo + * @param cause + */ + public GetHashDataInputFault(String message, GetHashDataInputFaultType faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + } + + /** + * + * @return + * returns fault bean: at.gv.egiz.stal.GetHashDataInputFaultType + */ + public GetHashDataInputFaultType getFaultInfo() { + return faultInfo; + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFaultType.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFaultType.java new file mode 100644 index 00000000..5301a3bd --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputFaultType.java @@ -0,0 +1,98 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetHashDataInputFaultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetHashDataInputFaultType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ErrorCode" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="ErrorMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetHashDataInputFaultType", propOrder = { + "errorCode", + "errorMessage" +}) +public class GetHashDataInputFaultType { + + @XmlElement(name = "ErrorCode") + protected int errorCode; + @XmlElement(name = "ErrorMessage", required = true) + protected String errorMessage; + + /** + * Gets the value of the errorCode property. + * + */ + public int getErrorCode() { + return errorCode; + } + + /** + * Sets the value of the errorCode property. + * + */ + public void setErrorCode(int value) { + this.errorCode = value; + } + + /** + * Gets the value of the errorMessage property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getErrorMessage() { + return errorMessage; + } + + /** + * Sets the value of the errorMessage property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setErrorMessage(String value) { + this.errorMessage = value; + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java new file mode 100644 index 00000000..b5f24030 --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java @@ -0,0 +1,206 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for GetHashDataInputResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetHashDataInputResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Reference" maxOccurs="unbounded">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+ *                 <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="sessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetHashDataInputResponseType", propOrder = { + "reference" +}) +public class GetHashDataInputResponseType { + + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute + protected String sessionId; + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GetHashDataInputResponseType.Reference } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the sessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSessionId() { + return sessionId; + } + + /** + * Sets the value of the sessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSessionId(String value) { + this.sessionId = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+     *       <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Reference { + + @XmlValue + protected byte[] value; + @XmlAttribute(name = "ID") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * byte[] + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getID() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setID(String value) { + this.id = value; + } + + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputType.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputType.java new file mode 100644 index 00000000..970b0744 --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputType.java @@ -0,0 +1,172 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetHashDataInputType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetHashDataInputType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Reference" maxOccurs="unbounded">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="sessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetHashDataInputType", propOrder = { + "reference" +}) +public class GetHashDataInputType { + + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute + protected String sessionId; + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GetHashDataInputType.Reference } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the sessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSessionId() { + return sessionId; + } + + /** + * Sets the value of the sessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSessionId(String value) { + this.sessionId = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Reference { + + @XmlAttribute(name = "ID") + protected String id; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getID() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setID(String value) { + this.id = value; + } + + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestResponseType.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestResponseType.java new file mode 100644 index 00000000..7a723431 --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestResponseType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import at.gv.egiz.stal.STALRequest; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetNextRequestResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetNextRequestResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Request" type="{http://www.egiz.gv.at/stal}RequestType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="sessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetNextRequestResponseType", propOrder = { + "request" +}) +public class GetNextRequestResponseType { + + @XmlElement(name = "Request") + protected List request; + @XmlAttribute + protected String sessionId; + + /** + * Gets the value of the request property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the request property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRequest().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link STALRequest } + * + * + */ + public List getRequest() { + if (request == null) { + request = new ArrayList(); + } + return this.request; + } + + /** + * Gets the value of the sessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSessionId() { + return sessionId; + } + + /** + * Sets the value of the sessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSessionId(String value) { + this.sessionId = value; + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestType.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestType.java new file mode 100644 index 00000000..410f1d8d --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetNextRequestType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import at.gv.egiz.stal.STALResponse; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetNextRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetNextRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{http://www.egiz.gv.at/stal}ResponseType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="sessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetNextRequestType", propOrder = { + "response" +}) +public class GetNextRequestType { + + @XmlElement(name = "Response") + protected List response; + @XmlAttribute + protected String sessionId; + + /** + * Gets the value of the response property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the response property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getResponse().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link STALResponse } + * + * + */ + public List getResponse() { + if (response == null) { + response = new ArrayList(); + } + return this.response; + } + + /** + * Gets the value of the sessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSessionId() { + return sessionId; + } + + /** + * Sets the value of the sessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSessionId(String value) { + this.sessionId = value; + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/ObjectFactory.java b/STALService/src/main/java/at/gv/egiz/stal/service/ObjectFactory.java new file mode 100644 index 00000000..11ad1101 --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/ObjectFactory.java @@ -0,0 +1,212 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + + +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.InfoboxReadResponse; +import at.gv.egiz.stal.QuitRequest; +import at.gv.egiz.stal.SignRequest; +import at.gv.egiz.stal.SignResponse; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the at.gv.egiz.stal package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _GetHashDataInputFault_QNAME = new QName("http://www.egiz.gv.at/stal", "GetHashDataInputFault"); + private final static QName _GetHashDataInput_QNAME = new QName("http://www.egiz.gv.at/stal", "GetHashDataInput"); + private final static QName _GetNextRequestResponse_QNAME = new QName("http://www.egiz.gv.at/stal", "GetNextRequestResponse"); + private final static QName _GetHashDataInputResponse_QNAME = new QName("http://www.egiz.gv.at/stal", "GetHashDataInputResponse"); + private final static QName _GetNextRequest_QNAME = new QName("http://www.egiz.gv.at/stal", "GetNextRequest"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.egiz.stal + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link GetNextRequestType } + * + */ + public GetNextRequestType createGetNextRequestType() { + return new GetNextRequestType(); + } + + /** + * Create an instance of {@link SignRequest } + * + */ + public SignRequest createSignRequest() { + return new SignRequest(); + } + + /** + * Create an instance of {@link GetHashDataInputResponseType } + * + */ + public GetHashDataInputResponseType createGetHashDataInputResponseType() { + return new GetHashDataInputResponseType(); + } + + /** + * Create an instance of {@link InfoboxReadResponse } + * + */ + public InfoboxReadResponse createInfoboxReadResponse() { + return new InfoboxReadResponse(); + } + + /** + * Create an instance of {@link ErrorResponse } + * + */ + public ErrorResponse createErrorResponse() { + return new ErrorResponse(); + } + + /** + * Create an instance of {@link GetHashDataInputFaultType } + * + */ + public GetHashDataInputFaultType createGetHashDataInputFaultType() { + return new GetHashDataInputFaultType(); + } + + /** + * Create an instance of {@link GetHashDataInputType.Reference } + * + */ + public GetHashDataInputType.Reference createGetHashDataInputTypeReference() { + return new GetHashDataInputType.Reference(); + } + + /** + * Create an instance of {@link InfoboxReadRequest } + * + */ + public InfoboxReadRequest createInfoboxReadRequest() { + return new InfoboxReadRequest(); + } + + /** + * Create an instance of {@link SignResponse } + * + */ + public SignResponse createSignResponse() { + return new SignResponse(); + } + + /** + * Create an instance of {@link GetNextRequestResponseType } + * + */ + public GetNextRequestResponseType createGetNextRequestResponseType() { + return new GetNextRequestResponseType(); + } + + /** + * Create an instance of {@link GetHashDataInputType } + * + */ + public GetHashDataInputType createGetHashDataInputType() { + return new GetHashDataInputType(); + } + + /** + * Create an instance of {@link QuitRequest } + * + */ + public QuitRequest createQuitRequest() { + return new QuitRequest(); + } + + /** + * Create an instance of {@link GetHashDataInputResponseType.Reference } + * + */ + public GetHashDataInputResponseType.Reference createGetHashDataInputResponseTypeReference() { + return new GetHashDataInputResponseType.Reference(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetHashDataInputFaultType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "GetHashDataInputFault") + public JAXBElement createGetHashDataInputFault(GetHashDataInputFaultType value) { + return new JAXBElement(_GetHashDataInputFault_QNAME, GetHashDataInputFaultType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetHashDataInputType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "GetHashDataInput") + public JAXBElement createGetHashDataInput(GetHashDataInputType value) { + return new JAXBElement(_GetHashDataInput_QNAME, GetHashDataInputType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetNextRequestResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "GetNextRequestResponse") + public JAXBElement createGetNextRequestResponse(GetNextRequestResponseType value) { + return new JAXBElement(_GetNextRequestResponse_QNAME, GetNextRequestResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetHashDataInputResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "GetHashDataInputResponse") + public JAXBElement createGetHashDataInputResponse(GetHashDataInputResponseType value) { + return new JAXBElement(_GetHashDataInputResponse_QNAME, GetHashDataInputResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetNextRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "GetNextRequest") + public JAXBElement createGetNextRequest(GetNextRequestType value) { + return new JAXBElement(_GetNextRequest_QNAME, GetNextRequestType.class, null, value); + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/STALPortType.java b/STALService/src/main/java/at/gv/egiz/stal/service/STALPortType.java new file mode 100644 index 00000000..8d1f9f9c --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/STALPortType.java @@ -0,0 +1,70 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.xml.bind.annotation.XmlSeeAlso; + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.3-b02- + * Generated source version: 2.1 + * + */ +@WebService(name = "STALPortType", targetNamespace = "http://www.egiz.gv.at/wsdl/stal") +@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface STALPortType { + + + /** + * Fetch the next request. + * + * @param request + * @return + * returns at.gv.egiz.stal.GetNextRequestResponseType + */ + @WebMethod(operationName = "nextRequest") + @WebResult(name = "GetNextRequestResponse", targetNamespace = "http://www.egiz.gv.at/stal", partName = "part1") + public GetNextRequestResponseType getNextRequest( + @WebParam(name = "GetNextRequest", targetNamespace = "http://www.egiz.gv.at/stal", partName = "part1") + GetNextRequestType request); + + /** + * Fetch the signed references corresponding to the previous SignatureRequest. + * + * @param request + * @return + * returns at.gv.egiz.stal.GetHashDataInputResponseType + * @throws GetHashDataInputFault + */ + @WebMethod + @WebResult(name = "GetHashDataInputResponse", targetNamespace = "http://www.egiz.gv.at/stal", partName = "part1") + public GetHashDataInputResponseType getHashDataInput( + @WebParam(name = "GetHashDataInput", targetNamespace = "http://www.egiz.gv.at/stal", partName = "part1") + GetHashDataInputType request) + throws GetHashDataInputFault + ; + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/STALService.java b/STALService/src/main/java/at/gv/egiz/stal/service/STALService.java new file mode 100644 index 00000000..7023b02a --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/STALService.java @@ -0,0 +1,69 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package at.gv.egiz.stal.service; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.logging.Logger; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.3-b02- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "STALService", targetNamespace = "http://www.egiz.gv.at/wsdl/stal") +public class STALService + extends Service +{ + + private final static Logger logger = Logger.getLogger(at.gv.egiz.stal.service.STALService.class.getName()); + + public STALService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + /** + * + * @return + * returns STALPortType + */ + @WebEndpoint(name = "STALPort") + public STALPortType getSTALPort() { + return super.getPort(new QName("http://www.egiz.gv.at/wsdl/stal", "STALPort"), STALPortType.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns STALPortType + */ + @WebEndpoint(name = "STALPort") + public STALPortType getSTALPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.egiz.gv.at/wsdl/stal", "STALPort"), STALPortType.class, features); + } + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/package-info.java b/STALService/src/main/java/at/gv/egiz/stal/service/package-info.java new file mode 100644 index 00000000..eb3e29dd --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/package-info.java @@ -0,0 +1,18 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.egiz.gv.at/stal", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package at.gv.egiz.stal.service; diff --git a/addResources/eclipseFormatter.xml b/addResources/eclipseFormatter.xml new file mode 100644 index 00000000..466b87ac --- /dev/null +++ b/addResources/eclipseFormatter.xml @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bkucommon/pom.xml b/bkucommon/pom.xml new file mode 100644 index 00000000..5d105fde --- /dev/null +++ b/bkucommon/pom.xml @@ -0,0 +1,78 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + bkucommon + BKU Common + 1.0-SNAPSHOT + http://maven.apache.org + + + at.gv.egiz + utils + 1.0-SNAPSHOT + + + at.gv.egiz + STAL + 1.0-SNAPSHOT + + + commons-logging + commons-logging + + + iaik + iaik_jce_full_signed + + + commons-fileupload + commons-fileupload + compile + + + commons-httpclient + commons-httpclient + compile + + + xalan + xalan + 2.7.0 + + + iaik + iaik_xsect + + + + + + + + + \ No newline at end of file diff --git a/bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig b/bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig new file mode 100644 index 00000000..931c6d12 --- /dev/null +++ b/bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig @@ -0,0 +1,7 @@ + + +303 See Other + +

See Other

+

The answer to your request is located here.

+ diff --git a/bkucommon/src/main/java/META-INF/MANIFEST.MF b/bkucommon/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/bkucommon/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java new file mode 100644 index 00000000..17ce29ce --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.Date; + +import at.gv.egiz.bku.slcommands.SLCommandInvoker; +import at.gv.egiz.stal.STAL; + +public abstract class AbstractBindingProcessor implements BindingProcessor { + protected Id id; + protected STAL stal; + protected SLCommandInvoker commandInvoker; + protected long lastAccessedTime = System.currentTimeMillis(); + + public AbstractBindingProcessor(String idString) { + this.id = IdFactory.getInstance().createId(idString); + } + + /** + * @see java.lang.Thread#run() + */ + public abstract void run(); + + /** + * The caller is advised to check the result in case an error occurred. + * + * @see #getResult() + */ + public abstract void consumeRequestStream(InputStream aIs); + + public Id getId() { + return id; + } + + public STAL getSTAL() { + return stal; + } + + public SLCommandInvoker getCommandInvoker() { + return commandInvoker; + } + + public void updateLastAccessTime() { + lastAccessedTime = System.currentTimeMillis(); + } + + public Date getLastAccessTime() { + return new Date(lastAccessedTime); + } + + /** + * To be called after object creation. + * + * @param aStal + * must not be null + * @param aCommandInvoker + * must not be null + */ + public void init(STAL aStal, SLCommandInvoker aCommandInvoker) { + if (aStal == null) { + throw new NullPointerException("STAL must not be set to null"); + } + if (aCommandInvoker == null) { + throw new NullPointerException("Commandinvoker must not be set to null"); + } + stal = aStal; + commandInvoker = aCommandInvoker; + Thread.currentThread().setName("BPID#"+getId().toString()); + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java new file mode 100644 index 00000000..c386508d --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java @@ -0,0 +1,75 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Date; +import java.util.Locale; + +import at.gv.egiz.bku.slcommands.SLCommandInvoker; +import at.gv.egiz.stal.STAL; + +/** + * Represents an single instance of a SL HTTP binding. + * + * @author wbauer + * + */ +public interface BindingProcessor extends Runnable { + + /** + * The stream must be read completely within this method. + * + * The caller is advised to check the result in case an error occurred. + * + * @see #getResult() + */ + public void consumeRequestStream(InputStream aIs); + + /** + * The unique Id of this http binding instance. + * @return + */ + public Id getId(); + + /** + * The used underlying STAL instance + * @return + */ + public STAL getSTAL(); + + public SLCommandInvoker getCommandInvoker(); + + public Date getLastAccessTime(); + + public void updateLastAccessTime(); + + public String getResultContentType(); + + public void writeResultTo(OutputStream os, String encoding) throws IOException; + + public void init(STAL aStal, SLCommandInvoker aCommandInvoker); + + /** + * Sets the preferred locale for userinteraction. + * If the locale is not set the default locale will be used. + * @param locale must not be null. + */ + public void setLocale(Locale locale); +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java new file mode 100644 index 00000000..a4e5bd90 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java @@ -0,0 +1,102 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.util.Locale; +import java.util.Set; + +import at.gv.egiz.bku.slcommands.SLCommandInvoker; +import at.gv.egiz.stal.STALFactory; + +/** + * Central player that handles the protocol binding. + * + * @author wbauer + * + */ +public interface BindingProcessorManager { + + /** + * FactoryMethod creating a new BindingProcessor object. + * The created binding processor must be passed to the process method to execute. + * + * @param protcol + * the transport binding protocol + * @param aSessionId + * optional an external sessionId (e.g. http session) could be + * provided. This parameter may be null. + * @param locale the locale used for user interaction, may be null + */ + public BindingProcessor createBindingProcessor(String protcol, + String aSessionId, Locale locale); + + /** + * FactoryMethod creating a new BindingProcessor object. + * The created binding processor must be passed to the process method to execute. + * + * @param protcol + * the transport binding protocol + * @param aSessionId + * optional an external sessionId (e.g. http session) could be + * provided. This parameter may be null. + */ + public BindingProcessor createBindingProcessor(String protcol, + String aSessionId); + + + /** + * Gets the binding processor with a certain id. The binding processor must be passed to the + * process method before it is managed and thus returned by this method. + * @param aId must not be null + * @return null if the binding processor was not "processed" before. + */ + public BindingProcessor getBindingProcessor(Id aId); + + /** + * Sets the STAL factory that is used for creating STAL objects that are used by BindingProcessor objects. + * For each new BindingProcessor a new STAL object is created. + * @param aStalFactory the factory to be used. Must not be null. + */ + public void setSTALFactory(STALFactory aStalFactory); + + /** + * Sets the invoker to be used. + * @param invoker + */ + public void setSLCommandInvoker(SLCommandInvoker invoker); + + /** + * Schedules the provided binding processor for processing and immediately returns. + * + * @param aBindingProcessor + */ + public void process(BindingProcessor aBindingProcessor); + + /** + * Removes a formerly added (by calling the process method) binding processor. + * @param bindingProcessor must not be null + */ + public void removeBindingProcessor(Id sessionId); + + /** + * A set of all managed binding processors. + * @return + */ + public Set getManagedIds(); + + public void shutdown(); +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java new file mode 100644 index 00000000..7a3b1bb9 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java @@ -0,0 +1,258 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.SLCommandInvoker; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.bku.utils.binding.Protocol; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALFactory; + +/** + * This class maintains all active BindingProcessor Objects. Currently, only + * HTTPBinding is supported. + */ +public class BindingProcessorManagerImpl implements BindingProcessorManager { + + public final static Protocol[] SUPPORTED_PROTOCOLS = { Protocol.HTTP, + Protocol.HTTPS }; + + private static Log log = LogFactory.getLog(BindingProcessorManagerImpl.class); + + private RemovalStrategy removalStrategy; + private STALFactory stalFactory; + private SLCommandInvoker commandInvokerClass; + private ExecutorService executorService; + private Map bindingProcessorMap = Collections + .synchronizedMap(new HashMap()); + + /** + * Container to hold a Future and Bindingprocessor object as map value. + * @author wbauer + * @see BindingProcessorManagerImpl#bindingProcessorMap + */ + static class MapEntityWrapper { + private Future future; + private BindingProcessor bindingProcessor; + + public MapEntityWrapper(Future future, BindingProcessor bindingProcessor) { + if ((bindingProcessor == null) || (future == null)) { + throw new NullPointerException("Argument must not be null"); + } + this.bindingProcessor = bindingProcessor; + this.future = future; + } + + public Future getFuture() { + return future; + } + + public BindingProcessor getBindingProcessor() { + return bindingProcessor; + } + + public int hashCode() { + return bindingProcessor.getId().hashCode(); + } + + public boolean equals(Object other) { + if (other instanceof MapEntityWrapper) { + MapEntityWrapper o = (MapEntityWrapper) other; + return (o.bindingProcessor.getId().equals(bindingProcessor.getId())); + } else { + return false; + } + } + } + + /** + * + * @param fab + * must not be null + * @param ci + * must not be null (prototype to generate new instances) + */ + public BindingProcessorManagerImpl(STALFactory fab, SLCommandInvoker ci) { + if (fab == null) { + throw new NullPointerException("STALFactory must not be null"); + } + stalFactory = fab; + if (ci == null) { + throw new NullPointerException("SLCommandInvoker must not be null"); + } + commandInvokerClass = ci; + executorService = Executors.newCachedThreadPool(); + } + + /** + * + * @return the STALFactory currently used. + */ + public STALFactory getStalFactory() { + return stalFactory; + } + + /** + * Sets the STALFactory to be used. + * @param stalFactory + */ + public void setStalFactory(STALFactory stalFactory) { + this.stalFactory = stalFactory; + } + + /** + * Could be used to setup a new executor service during application stratup. + * @param executorService + */ + public void setExecutorService(ExecutorService executorService) { + this.executorService = executorService; + } + + public void setRemovalStrategy(RemovalStrategy aStrategy) { + removalStrategy = aStrategy; + } + + public RemovalStrategy getRemovlaStrategy() { + return removalStrategy; + } + + public void shutdown() { + log.info("Shutting down the BindingProcessorManager"); + executorService.shutdown(); + } + + /** + * Uses the default locale + */ + public BindingProcessor createBindingProcessor(String protocol, + String aSessionId) { + return createBindingProcessor(protocol, aSessionId, null); + } + + /** + * FactoryMethod creating a new BindingProcessor object. + * + * @param protocol + * must not be null + */ + public BindingProcessor createBindingProcessor(String protocol, + String aSessionId, Locale locale) { + String low = protocol.toLowerCase(); + Protocol proto = null; + for (int i = 0; i < SUPPORTED_PROTOCOLS.length; i++) { + if (SUPPORTED_PROTOCOLS[i].toString().equals(low)) { + proto = SUPPORTED_PROTOCOLS[i]; + break; + } + } + if (proto == null) { + throw new UnsupportedOperationException(); + } + BindingProcessor bindingProcessor = new HTTPBindingProcessor(aSessionId, + commandInvokerClass.newInstance(), proto); + STAL stal = stalFactory.createSTAL(); + bindingProcessor.init(stal, commandInvokerClass.newInstance()); + if (locale != null) { + bindingProcessor.setLocale(locale); + stal.setLocale(locale); + } + return bindingProcessor; + } + + /** + * @return the bindingprocessor object for this id or null if no bindingprocessor was found. + */ + public BindingProcessor getBindingProcessor(Id aId) { + if (bindingProcessorMap.get(aId) != null) { + return bindingProcessorMap.get(aId).getBindingProcessor(); + } else { + return null; + } + } + + /** + * + */ + public void setSTALFactory(STALFactory aStalFactory) { + if (aStalFactory == null) { + throw new NullPointerException("Cannot set STALFactory to null"); + } + stalFactory = aStalFactory; + } + + /** + * Causes the BindingProcessorManager to manage the provided BindingProcessor + * @param aBindingProcessor must not be null + */ + public void process(BindingProcessor aBindingProcessor) { + if (bindingProcessorMap.containsKey(aBindingProcessor.getId())) { + log.fatal("Clashing ids, cannot process bindingprocessor with id:" + + aBindingProcessor.getId()); + throw new SLRuntimeException( + "Clashing ids, cannot process bindingprocessor with id:" + + aBindingProcessor.getId()); + } + Future f = executorService.submit(aBindingProcessor); + bindingProcessorMap.put(aBindingProcessor.getId(), new MapEntityWrapper(f, + aBindingProcessor)); + } + + @Override + public void setSLCommandInvoker(SLCommandInvoker invoker) { + commandInvokerClass = invoker; + } + + @Override + public void removeBindingProcessor(Id sessionId) { + MapEntityWrapper wrapper = bindingProcessorMap + .get(sessionId); + if (wrapper == null) { + return; + } + Future f = wrapper.getFuture(); + if (!f.isDone()) { + f.cancel(true); + } + bindingProcessorMap.remove(sessionId); + } + + @Override + public Set getManagedIds() { + Set result = new HashSet(); + synchronized (bindingProcessorMap) { + for (Iterator it = bindingProcessorMap.keySet().iterator(); it + .hasNext();) { + result.add(it.next()); + } + } + return result; + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java new file mode 100644 index 00000000..8eaeacbd --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java @@ -0,0 +1,62 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.net.MalformedURLException; +import java.net.URL; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slexceptions.SLRuntimeException; + +/** + * Used to handle DataUrl connections as specified in the CCE's HTTP protocol binding. + * + */ +public class DataUrl { + private static DataUrlConnectionSPI defaultDataUrlConnection = new DataUrlConnectionImpl(); + private static Log log = LogFactory.getLog(DataUrl.class); + + private URL url; + + /** + * Sets the default DataUrlConnection implementation + * @param aClass must not be null + */ + public static void setDataUrlConnectionClass(DataUrlConnectionSPI dataUrlConnection) { + if (dataUrlConnection == null) { + throw new NullPointerException("Default dataurlconnection must not be set to null"); + } + defaultDataUrlConnection = dataUrlConnection; + } + + public DataUrl(String aUrlString) throws MalformedURLException { + url = new URL(aUrlString); + } + + public DataUrlConnection openConnection() { + try { + DataUrlConnectionSPI retVal = defaultDataUrlConnection.newInstance(); + retVal.init(url); + return retVal; + } catch (Exception e) { + log.error(e); + throw new SLRuntimeException("Cannot instantiate a dataurlconnection:",e); + } + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java new file mode 100644 index 00000000..e6d5e075 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java @@ -0,0 +1,79 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.IOException; +import java.io.InputStream; +import java.net.SocketTimeoutException; +import java.security.cert.X509Certificate; + +import at.gv.egiz.bku.slcommands.SLResult; + +/** + * Transmit a security layer result to DataURL via HTTP POST, encoded as multipart/form-data. + * The HTTP header user-agent is set to citizen-card-environment/1.2 BKU2 1.0. + * The form-parameter ResponseType is set to HTTP-Security-Layer-RESPONSE. + * All other headers/parameters are set by the caller. + * + * @author clemens + */ +public interface DataUrlConnection { + + public static final String DEFAULT_USERAGENT = "citizen-card-environment/1.2 BKU2 1.0"; + public static final String FORMPARAM_RESPONSETYPE = "ResponseType"; + public static final String DEFAULT_RESPONSETYPE = "HTTP-Security-Layer-RESPONSE"; + public static final String FORMPARAM_XMLRESPONSE = "XMLResponse"; + public static final String FORMPARAM_BINARYRESPONSE = "BinaryResponse"; + + public static final String XML_RESPONSE_ENCODING = "UTF-8"; + + public String getProtocol(); + + /** + * Set a HTTP Header. + * @param key + * @param value multiple values are assumed to have the correct formatting (comma-separated list) + */ + public void setHTTPHeader(String key, String value); + + /** + * Set a form-parameter. + * @param name + * @param data + * @param contentType may be null + * @param charSet may be null + * @param transferEncoding may be null + */ + public void setHTTPFormParameter(String name, InputStream data, String contentType, String charSet, String transferEncoding); + + /** + * @pre httpHeaders != null + * @throws java.net.SocketTimeoutException + * @throws java.io.IOException + */ + public void connect() throws SocketTimeoutException, IOException; + + public X509Certificate getServerCertificate(); + + /** + * @pre connection != null + * @throws java.io.IOException + */ + public void transmit(SLResult slResult) throws IOException; + + public DataUrlResponse getResponse() throws IOException; +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java new file mode 100644 index 00000000..134d765e --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java @@ -0,0 +1,216 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.SocketTimeoutException; +import java.net.URL; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.net.ssl.HttpsURLConnection; + +import org.apache.commons.httpclient.methods.multipart.FilePart; +import org.apache.commons.httpclient.methods.multipart.Part; +import org.apache.commons.httpclient.methods.multipart.StringPart; + +import at.gv.egiz.bku.binding.multipart.InputStreamPartSource; +import at.gv.egiz.bku.binding.multipart.SLResultPart; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slcommands.SLResult.SLResultType; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.bku.utils.binding.Protocol; + +/** + * not thread-safe thus newInsance always returns a new object + * + */ +public class DataUrlConnectionImpl implements DataUrlConnectionSPI { + + public final static Protocol[] SUPPORTED_PROTOCOLS = { Protocol.HTTP, + Protocol.HTTPS }; + protected X509Certificate serverCertificate; + protected Protocol protocol; + protected URL url; + private HttpURLConnection connection; + protected Map requestHttpHeaders; + protected ArrayList formParams; + protected String boundary; + + protected DataUrlResponse result; + + public String getProtocol() { + if (protocol == null) { + return null; + } + return protocol.toString(); + } + + /** + * opens a connection sets the headers gets the server certificate + * + * @throws java.net.SocketTimeoutException + * @throws java.io.IOException + * @pre url != null + * @pre httpHeaders != null + */ + public void connect() throws SocketTimeoutException, IOException { + connection = (HttpURLConnection) url.openConnection(); + + // FIXXME move this to config. + HttpURLConnection.setFollowRedirects(false); + + + connection.setDoOutput(true); + Set headers = requestHttpHeaders.keySet(); + Iterator headerIt = headers.iterator(); + while (headerIt.hasNext()) { + String name = headerIt.next(); + connection.setRequestProperty(name, requestHttpHeaders.get(name)); + } + connection.connect(); + if (connection instanceof HttpsURLConnection) { + HttpsURLConnection ssl = (HttpsURLConnection) connection; + X509Certificate[] certs = (X509Certificate[]) ssl.getServerCertificates(); + if ((certs != null) && (certs.length >= 1)) { + serverCertificate = certs[0]; + } + } + } + + public X509Certificate getServerCertificate() { + return serverCertificate; + } + + public void setHTTPHeader(String name, String value) { + if (name != null && value != null) { + requestHttpHeaders.put(name, value); + } + } + + public void setHTTPFormParameter(String name, InputStream data, + String contentType, String charSet, String transferEncoding) { + InputStreamPartSource source = new InputStreamPartSource(null, data); + FilePart formParam = new FilePart(name, source, contentType, charSet); + if (transferEncoding != null) { + formParam.setTransferEncoding(transferEncoding); + } else { + formParam.setTransferEncoding(null); + } + formParams.add(formParam); + } + + /** + * send all formParameters + * + * @throws java.io.IOException + */ + public void transmit(SLResult slResult) throws IOException { + SLResultPart slResultPart = new SLResultPart(slResult, + XML_RESPONSE_ENCODING); + if (slResult.getResultType() == SLResultType.XML) { + slResultPart.setTransferEncoding(null); + slResultPart.setContentType(slResult.getMimeType()); + slResultPart.setCharSet(XML_RESPONSE_ENCODING); + } else { + slResultPart.setTransferEncoding(null); + slResultPart.setContentType(slResult.getMimeType()); + } + formParams.add(slResultPart); + + OutputStream os = connection.getOutputStream(); + + Part[] parts = new Part[formParams.size()]; + Part.sendParts(os, formParams.toArray(parts), boundary.getBytes()); + os.close(); + // MultipartRequestEntity PostMethod + result = new DataUrlResponse(url.toString(), connection.getResponseCode(), + connection.getInputStream()); + + Map responseHttpHeaders = new HashMap(); + Map> httpHeaders = connection.getHeaderFields(); + for (Iterator keyIt = httpHeaders.keySet().iterator(); keyIt + .hasNext();) { + String key = keyIt.next(); + StringBuffer value = new StringBuffer(); + for (String val : httpHeaders.get(key)) { + value.append(val); + value.append(HttpUtil.SEPERATOR[0]); + } + String valString = value.substring(0, value.length() - 1); + if ((key != null)&&(value.length() > 0)) { + responseHttpHeaders.put(key, valString); + } + } + result.setResponseHttpHeaders(responseHttpHeaders); + } + + @Override + public DataUrlResponse getResponse() throws IOException { + return result; + } + + /** + * inits protocol, url, httpHeaders, formParams + * + * @param url + * must not be null + */ + @Override + public void init(URL url) { + + for (int i = 0; i < SUPPORTED_PROTOCOLS.length; i++) { + if (SUPPORTED_PROTOCOLS[i].toString().equalsIgnoreCase(url.getProtocol())) { + protocol = SUPPORTED_PROTOCOLS[i]; + break; + } + } + if (protocol == null) { + throw new SLRuntimeException("Protocol " + url.getProtocol() + + " not supported for data url"); + } + this.url = url; + boundary = "--" + IdFactory.getInstance().createId().toString(); + requestHttpHeaders = new HashMap(); + requestHttpHeaders.put(HttpUtil.HTTP_HEADER_USER_AGENT, DEFAULT_USERAGENT); + requestHttpHeaders.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, + HttpUtil.MULTIPART_FOTMDATA + HttpUtil.SEPERATOR[0] + + HttpUtil.MULTIPART_FOTMDATA_BOUNDARY + "=" + boundary); + + formParams = new ArrayList(); + StringPart responseType = new StringPart(FORMPARAM_RESPONSETYPE, + DEFAULT_RESPONSETYPE); + responseType.setCharSet("UTF-8"); + responseType.setTransferEncoding(null); + formParams.add(responseType); + } + + @Override + public DataUrlConnectionSPI newInstance() { + return new DataUrlConnectionImpl(); + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java new file mode 100644 index 00000000..9e5a66f8 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java @@ -0,0 +1,42 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.net.URL; + +/** + * Prototype of a DataurlconnectionSPI + * @author wbauer + * + */ +public interface DataUrlConnectionSPI extends DataUrlConnection { + + /** + * Returns a new instance of this class to handle a dataurl. + * Called by the factory each time the openConnection method is called. + * @return + */ + public DataUrlConnectionSPI newInstance(); + + /** + * Initializes the DataUrlConnection + * @param url + */ + public void init(URL url); + + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java new file mode 100644 index 00000000..b75cb0f3 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java @@ -0,0 +1,98 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PushbackInputStream; +import java.util.Iterator; +import java.util.Map; + +import at.gv.egiz.bku.utils.urldereferencer.StreamData; + +/** + * The response of a dataurl server. + * Additionally holds return code and response headers. + */ +public class DataUrlResponse extends StreamData { + + public final static String OK = ""; + + protected Map responseHttpHeaders; + + protected int responseCode = -1; + + public DataUrlResponse(String url, int responseCode, InputStream stream) { + super(url, null, new PushbackInputStream(stream, 10)); + this.responseCode = responseCode; + } + + public String getContentType() { + if (contentType != null) { + return contentType; + } + if (responseHttpHeaders == null) { + return null; + } + for (Iterator keyIt = responseHttpHeaders.keySet().iterator(); keyIt + .hasNext();) { + String key = keyIt.next(); + if (HttpUtil.HTTP_HEADER_CONTENT_TYPE.equalsIgnoreCase(key)) { + contentType = responseHttpHeaders.get(key); + return contentType; + } + } + return contentType; + } + + public void setResponseHttpHeaders(Map responseHttpHeaders) { + this.responseHttpHeaders = responseHttpHeaders; + } + + public Map getResponseHeaders() { + return responseHttpHeaders; + } + + public int getResponseCode() { + return responseCode; + } + + /** + * Checks if the http response equals "" + * + * @throws IOException + */ + public boolean isHttpResponseXMLOK() throws IOException { + String charset = HttpUtil.getCharset(contentType, true); + byte[] buffer = new byte[10]; + int i = 0; + int read = 0; + while ((i < 10) && (read != -1)) { + read = inputStream.read(buffer, i, 10 - i); + if (read != -1) { + i += read; + } + } + PushbackInputStream pbis = (PushbackInputStream) inputStream; + pbis.unread(buffer, 0, i); + if (i < 5) { + return false; + } + String ok = new String(buffer, 0, i, charset); + return (OK.equals(ok)); + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java new file mode 100644 index 00000000..d17a27c2 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java @@ -0,0 +1,67 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.util.Iterator; +import java.util.Set; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * This class can be used to check the BindingProcessorManager for expired entries and remove them. + * Should be run periodically. + * + */ +public class ExpiryRemover implements RemovalStrategy { + + private static Log log = LogFactory.getLog(ExpiryRemover.class); + + protected BindingProcessorManager bindingProcessorManager; + // keep max 5 min. + protected long maxAcceptedAge = 1000 * 60 * 5; + + @Override + public void execute() { + log.debug("Triggered Expiry Remover"); + if (bindingProcessorManager == null) { + log.warn("Bindingprocessor not set, skipping removal"); + return; + } + Set managedIds = bindingProcessorManager.getManagedIds(); + for (Iterator it = managedIds.iterator(); it.hasNext();) { + Id bindId = it.next(); + BindingProcessor bp = bindingProcessorManager.getBindingProcessor(bindId); + if (bp != null) { + if (bp.getLastAccessTime().getTime() < (System.currentTimeMillis() - maxAcceptedAge)) { + log.debug("Removing binding processor: " + bp.getId()); + bindingProcessorManager.removeBindingProcessor(bp.getId()); + } + } + } + } + + public void setMaxAcceptedAge(long maxAcceptedAge) { + this.maxAcceptedAge = maxAcceptedAge; + } + + @Override + public void setBindingProcessorManager(BindingProcessorManager bp) { + bindingProcessorManager = bp; + } + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java new file mode 100644 index 00000000..cce3d720 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java @@ -0,0 +1,28 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +/** + * Form parameters with special meaning as defined in the CCE's http binding. + * + */ +public interface FixedFormParameters { + String XMLREQUEST = "XMLRequest"; + String REDIRECTURL = "RedirectURL"; + String DATAURL = "DataURL"; + String STYLESHEETURL = "StylesheetURL"; +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java new file mode 100644 index 00000000..93339451 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java @@ -0,0 +1,39 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.Iterator; + +/** + * Interface to access form control contents from the http request. + * It's designed to be used for URL encoded and multipart-formdata requests. + * @author wbauer + * + */ +public interface FormParameter { + + String getFormParameterName(); + + InputStream getFormParameterValue(); + + String getFormParameterContentType(); + + Iterator getHeaderNames(); + + String getHeaderValue(String headerName); +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java new file mode 100644 index 00000000..45aa9be6 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java @@ -0,0 +1,93 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.Collections; +import java.util.Iterator; + +import org.apache.commons.fileupload.FileItemHeaders; + +/** + * Simple wrapper to read data while consuming an stream within the http + * processor. + * + * + */ +public class FormParameterImpl implements FormParameter { + + protected InputStream dataStream; + protected String contentType; + protected String formName; + protected FileItemHeaders headers; + + public FormParameterImpl(String contentType, String formName, InputStream is, + FileItemHeaders header) { + this.contentType = contentType; + this.formName = formName; + this.dataStream = is; + this.headers = header; + } + + @Override + public String getFormParameterContentType() { + return contentType; + } + + @Override + public String getFormParameterName() { + return formName; + } + + @Override + public InputStream getFormParameterValue() { + return dataStream; + } + + @Override + public String getHeaderValue(String headerName) { + if (headers == null) { + return null; + } + return headers.getHeader(headerName); + } + + @SuppressWarnings("unchecked") + @Override + public Iterator getHeaderNames() { + if (headers == null) { + return Collections.EMPTY_LIST.iterator(); + } + return headers.getHeaderNames(); + } + + public FileItemHeaders getHeaders() { + return headers; + } + + public boolean equals(Object other) { + if (other instanceof FormParameter) { + FormParameter fp = (FormParameter) other; + return fp.getFormParameterName().equals(getFormParameterName()); + } + return false; + } + + public int hashCode() { + return getFormParameterName().hashCode(); + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java new file mode 100644 index 00000000..8b6cd4b2 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java @@ -0,0 +1,146 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Collections; +import java.util.Iterator; + +import org.apache.commons.fileupload.FileItemHeaders; +import org.apache.commons.fileupload.util.FileItemHeadersImpl; + +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.bku.utils.StreamUtil; + +/** + * Simple store for form parameters based on a byte[] + * + * @author wbauer + * + */ +public class FormParameterStore implements FormParameter { + + private byte[] dataBuffer; + private String contentType; + private String parameterName; + private boolean initialized = false; + protected FileItemHeaders headers; + + /** + * Make sure to call init after creating a new instance. + */ + public FormParameterStore() { + } + + public void init(InputStream dataSource, String paramName, + String contentType, FileItemHeaders header) throws IOException { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + StreamUtil.copyStream(dataSource, os); + this.dataBuffer = os.toByteArray(); + this.parameterName = paramName; + this.contentType = contentType; + initialized = true; + this.headers = header; + } + + public void init(byte[] dataSource, String paramName, + String contentType, FileItemHeaders header) throws IOException { + this.dataBuffer = dataSource; + this.parameterName = paramName; + this.contentType = contentType; + initialized = true; + this.headers = header; + } + + public void init(FormParameter fp) throws IOException { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + StreamUtil.copyStream(fp.getFormParameterValue(), os); + this.dataBuffer = os.toByteArray(); + this.parameterName = fp.getFormParameterName(); + this.contentType = fp.getFormParameterContentType(); + if (fp instanceof FormParameterImpl) { + headers = ((FormParameterImpl) fp).getHeaders(); + } else { + FileItemHeadersImpl headersImpl = new FileItemHeadersImpl(); + for (Iterator i = fp.getHeaderNames(); i.hasNext();) { + String headerName = i.next(); + headersImpl.addHeader(headerName, fp.getHeaderValue(headerName)); + } + } + initialized = true; + } + + protected void ensureInitialized() { + if (!initialized) { + throw new SLRuntimeException("FormParameterStore not initialized"); + } + } + + /** + * Reads all data from the stream and stores it internally. The stream will + * not be closed. + * + * @param datSource + * @param formName + * @param contentType + */ + @Override + public String getFormParameterContentType() { + ensureInitialized(); + return contentType; + } + + @Override + public String getFormParameterName() { + ensureInitialized(); + return parameterName; + } + + /** + * May be called more than once. + */ + @Override + public InputStream getFormParameterValue() { + return new ByteArrayInputStream(dataBuffer); + } + + @Override + public String getHeaderValue(String name) { + if (headers == null) { + return null; + } + return headers.getHeader(name); + } + + @SuppressWarnings("unchecked") + @Override + public Iterator getHeaderNames() { + if (headers == null) { + return Collections.EMPTY_LIST.iterator(); + } + return headers.getHeaderNames(); + } + + public boolean isEmpty() { + ensureInitialized(); + return dataBuffer.length == 0; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java new file mode 100644 index 00000000..b79f7d55 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java @@ -0,0 +1,820 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Reader; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.net.ssl.SSLHandshakeException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.URIResolver; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandContext; +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slcommands.SLCommandInvoker; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slcommands.SLSourceContext; +import at.gv.egiz.bku.slcommands.SLTargetContext; +import at.gv.egiz.bku.slcommands.impl.ErrorResultImpl; +import at.gv.egiz.bku.slexceptions.SLBindingException; +import at.gv.egiz.bku.slexceptions.SLCanceledException; +import at.gv.egiz.bku.slexceptions.SLException; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.bku.utils.binding.Protocol; +import at.gv.egiz.bku.utils.urldereferencer.FormDataURLSupplier; +import at.gv.egiz.bku.utils.urldereferencer.SimpleFormDataContextImpl; +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URIResolverAdapter; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; +import at.gv.egiz.stal.QuitRequest; +import at.gv.egiz.stal.STALRequest; + +/** + * Class performing the HTTP binding as defined by the CCE specification. + * Currently a huge monolithic class. + * @TODO refactor + */ +@SuppressWarnings("unchecked") +public class HTTPBindingProcessor extends AbstractBindingProcessor implements + FormDataURLSupplier { + + private static Log log = LogFactory.getLog(HTTPBindingProcessor.class); + + private static enum State { + INIT, PROCESS, DATAURL, TRANSFORM, FINISHED + }; + + public final static Collection XML_REQ_TRANSFER_ENCODING = Arrays + .asList(new String[] { "binary" }); + + /** + * Defines the maximum number of dataurl connects that are allowed within a + * single SL Request processing. + */ + protected static int MAX_DATAURL_HOPS = 10; + + protected static String XML_MIME_TYPE = "text/xml"; + protected static String BINARY_MIME_TYPE = "application/octet-stream"; + + /** + * If null everything is ok and the result is taken from the command invoker. + */ + protected SLException bindingProcessorError; + protected SLCommandInvoker commandInvoker; + protected DataUrlResponse dataUrlResponse; + protected Map headerMap = Collections.EMPTY_MAP; + protected SLCommand slCommand; + protected Map formParameterMap = new HashMap(); + protected SLSourceContext srcContex = new SLSourceContext(); + protected SLTargetContext targetContext = new SLTargetContext(); + protected Protocol protocol; + protected State currentState = State.INIT; + protected Transformer transformer = null; + protected String resultContentType = null; + protected SLResult slResult = null; + protected int responseCode = 200; + protected Map responseHeaders = Collections.EMPTY_MAP; + protected Locale locale = Locale.getDefault(); + + /** + * + * @param id + * may be null. In this case a new session id will be created. + * @param cmdInvoker + * must not be null; + */ + public HTTPBindingProcessor(String id, SLCommandInvoker cmdInvoker, + Protocol protocol) { + super(id); + if ((protocol != Protocol.HTTP) && (protocol != Protocol.HTTPS)) { + throw new SLRuntimeException("Protocol not supported: " + protocol); + } + if (cmdInvoker == null) { + throw new NullPointerException("Commandinvoker cannot be set to null"); + } + commandInvoker = cmdInvoker; + this.protocol = protocol; + srcContex.setSourceProtocol(protocol); + srcContex.setSourceIsDataURL(false); + } + + //---------------------------------------------------------------------------- + // ----------- BEGIN CONVENIENCE METHODS ----------- + + protected void sendSTALQuit() { + log.info("Sending QUIT command to STAL"); + List quit = new ArrayList(1); + quit.add(new QuitRequest()); + getSTAL().handleRequest(quit); + } + + protected String getFormParameterAsString(String formParameterName) { + FormParameter fp = formParameterMap.get(formParameterName); + return getFormParameterAsString(fp); + } + + protected String getFormParameterAsString(FormParameter fp) { + if (fp == null) { + return null; + } + try { + return StreamUtil.asString(fp.getFormParameterValue(), HttpUtil + .getCharset(fp.getFormParameterContentType(), true)); + } catch (IOException e) { + return null; + } + } + + protected String getDataUrl() { + return getFormParameterAsString(FixedFormParameters.DATAURL); + } + + protected String getStyleSheetUrl() { + return getFormParameterAsString(FixedFormParameters.STYLESHEETURL); + } + + protected List getFormParameters(String parameterNamePostfix) { + List resultList = new ArrayList(); + for (Iterator fpi = formParameterMap.keySet().iterator(); fpi + .hasNext();) { + String paramName = fpi.next(); + if (paramName.endsWith(parameterNamePostfix)) { + resultList.add(formParameterMap.get(paramName)); + } + } + return resultList; + } + + protected List getTransferHeaders() { + return getFormParameters("__"); + } + + protected List getTransferForms() { + List resultList = new ArrayList(); + for (Iterator fpi = formParameterMap.keySet().iterator(); fpi + .hasNext();) { + String paramName = fpi.next(); + if ((paramName.endsWith("_")) && (!paramName.endsWith("__"))) { + resultList.add(formParameterMap.get(paramName)); + } + } + return resultList; + } + + protected void closeDataUrlConnection() { + log.debug("Closing data url input stream"); + if (dataUrlResponse == null) { + return; + } + InputStream is = dataUrlResponse.getStream(); + if (is != null) { + try { + is.close(); + } catch (IOException e) { + log.info("Error closing input stream to dataurl server:" + e); + } + } + } + + //---------------------------------------------------------------------------- + // ----------- END CONVENIENCE METHODS ----------- + + //---------------------------------------------------------------------------- + // -- BEGIN Methods that handle the http binding activities as defined in the + // activity diagram -- + + protected void init() { + log.info("Starting Bindingprocessor in Thread: " + + Thread.currentThread().getId()); + if (bindingProcessorError != null) { + log.debug("Detected binding processor error, sending quit command"); + // sendSTALQuit(); + currentState = State.FINISHED; + } else if (slCommand == null) { + log.error("SLCommand not set (consumeRequest not called ??)"); + bindingProcessorError = new SLException(2000); + // sendSTALQuit(); + currentState = State.FINISHED; + } else { + currentState = State.PROCESS; + } + } + + protected void processRequest() { + log.debug("Entered State: " + State.PROCESS); + log.debug("Processing command: " + slCommand); + commandInvoker.setCommand(slCommand); + responseCode = 200; + responseHeaders = Collections.EMPTY_MAP; + try { + commandInvoker.invoke(srcContex); + } catch (SLCanceledException e) { + log.info("Caught exception: " + e); + bindingProcessorError = e; + currentState = State.TRANSFORM; + } + dataUrlResponse = null; + if (getDataUrl() != null) { + log.debug("Data Url set to: " + getDataUrl()); + currentState = State.DATAURL; + } else { + log.debug("No data url set"); + currentState = State.TRANSFORM; + } + } + + protected void handleDataUrl() { + log.debug("Entered State: " + State.DATAURL); + try { + DataUrl dataUrl = new DataUrl(getDataUrl()); + DataUrlConnection conn = dataUrl.openConnection(); + + // set transfer headers + for (FormParameter fp : getTransferHeaders()) { + String paramString = getFormParameterAsString(fp); + if (paramString == null) { + log.error("Got empty transfer header, ignoring this"); + } else { + String[] keyVal = paramString.split(":", 2); + String key = keyVal[0]; + String val = null; + if (keyVal.length == 2) { + val = keyVal[1]; + } + val = val.trim(); + log.debug("Setting header " + key + " to value " + val); + conn.setHTTPHeader(key, val); + } + } + + // set transfer form parameters + for (FormParameter fp : getTransferForms()) { + String contentTransferEncoding = null; + String contentType = fp.getFormParameterContentType(); + String charSet = HttpUtil.getCharset(contentType, false); + if (charSet != null) { + contentType = contentType.substring(0, contentType + .lastIndexOf(HttpUtil.SEPERATOR[0])); + } + for (Iterator header = fp.getHeaderNames(); header.hasNext();) { + if (HttpUtil.CONTENT_TRANSFER_ENCODING + .equalsIgnoreCase(header.next())) { + contentTransferEncoding = getFormParameterAsString(fp); + } + } + log.debug("Setting form: " + fp.getFormParameterName() + + " contentType: " + contentType + " charset: " + charSet + + " contentTransferEncoding: " + contentTransferEncoding); + conn.setHTTPFormParameter(fp.getFormParameterName(), fp + .getFormParameterValue(), contentType, charSet, + contentTransferEncoding); + } + + // connect + conn.connect(); + // fetch and set SL result + targetContext.setTargetIsDataURL(true); + targetContext.setTargetCertificate(conn.getServerCertificate()); + targetContext.setTargetProtocol(conn.getProtocol()); + SLResult result = commandInvoker.getResult(targetContext); + + // transfer result + conn.transmit(result); + + // process Dataurl response + dataUrlResponse = conn.getResponse(); + log.debug("Received data url response code: " + + dataUrlResponse.getResponseCode()); + protocol = Protocol.fromString(conn.getProtocol()); + + switch (dataUrlResponse.getResponseCode()) { + case 200: + String contentType = dataUrlResponse.getContentType(); + log.debug("Got dataurl response content type: " + contentType); + if (contentType != null) { + if ((contentType.startsWith(HttpUtil.APPLICATION_URL_ENCODED)) + || (contentType.startsWith(HttpUtil.MULTIPART_FOTMDATA))) { + log.debug("Detected SL Request in dataurl response"); + // process headers and request + setHTTPHeaders(dataUrlResponse.getResponseHeaders()); + consumeRequestStream(dataUrlResponse.getStream()); + closeDataUrlConnection(); + srcContex.setSourceCertificate(conn.getServerCertificate()); + srcContex.setSourceIsDataURL(true); + srcContex + .setSourceProtocol(Protocol.fromString(conn.getProtocol())); + currentState = State.PROCESS; + } else if (((contentType.startsWith(HttpUtil.TXT_HTML)) + || (contentType.startsWith(HttpUtil.TXT_PLAIN)) || (contentType + .startsWith(HttpUtil.TXT_XML))) + && (dataUrlResponse.isHttpResponseXMLOK())) { + log.info("Dataurl response matches with content type: " + + contentType); + currentState = State.TRANSFORM; + + } else if ((contentType.startsWith(HttpUtil.TXT_XML)) + && (!dataUrlResponse.isHttpResponseXMLOK())) { + log + .debug("Detected text/xml dataurl response with content != "); + headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, contentType); + assignXMLRequest(dataUrlResponse.getStream(), HttpUtil.getCharset( + contentType, true)); + closeDataUrlConnection(); + srcContex.setSourceCertificate(conn.getServerCertificate()); + srcContex.setSourceIsDataURL(true); + srcContex + .setSourceProtocol(Protocol.fromString(conn.getProtocol())); + currentState = State.PROCESS; + // just to be complete, actually not used + srcContex.setSourceHTTPReferer(dataUrlResponse.getResponseHeaders() + .get(HttpUtil.HTTP_HEADER_REFERER)); + } else { + resultContentType = contentType; + responseHeaders = dataUrlResponse.getResponseHeaders(); + responseCode = dataUrlResponse.getResponseCode(); + currentState = State.FINISHED; + } + } else { + log.debug("Content type not set in dataurl response"); + closeDataUrlConnection(); + throw new SLBindingException(2007); + } + + break; + case 307: + contentType = dataUrlResponse.getContentType(); + if ((contentType != null) && (contentType.startsWith(HttpUtil.TXT_XML))) { + log.debug("Received dataurl response code 307 with XML content"); + String location = dataUrlResponse.getResponseHeaders().get( + HttpUtil.HTTP_HEADER_LOCATION); + if (location == null) { + log + .error("Did not get a location header for a 307 data url response"); + throw new SLBindingException(2003); + } + // consumeRequestStream(dataUrlResponse.getStream()); + FormParameterStore fp = new FormParameterStore(); + fp.init(location.getBytes(HttpUtil.DEFAULT_CHARSET), + FixedFormParameters.DATAURL, null, null); + formParameterMap.put(FixedFormParameters.DATAURL, fp); + headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, contentType); + assignXMLRequest(dataUrlResponse.getStream(), HttpUtil.getCharset( + dataUrlResponse.getContentType(), true)); + closeDataUrlConnection(); + srcContex.setSourceCertificate(conn.getServerCertificate()); + srcContex.setSourceIsDataURL(true); + srcContex.setSourceProtocol(Protocol.fromString(conn.getProtocol())); + currentState = State.PROCESS; + // just to be complete, actually not used + srcContex.setSourceHTTPReferer(dataUrlResponse.getResponseHeaders() + .get(HttpUtil.HTTP_HEADER_REFERER)); + + } else { + log.debug("Received dataurl response code 307 non XML content: " + + dataUrlResponse.getContentType()); + resultContentType = dataUrlResponse.getContentType(); + currentState = State.FINISHED; + } + responseHeaders = dataUrlResponse.getResponseHeaders(); + responseCode = dataUrlResponse.getResponseCode(); + break; + + case 301: + case 302: + case 303: + responseHeaders = dataUrlResponse.getResponseHeaders(); + responseCode = dataUrlResponse.getResponseCode(); + resultContentType = dataUrlResponse.getContentType(); + currentState = State.FINISHED; + break; + + default: + // issue error + log.info("Unexpected response code from dataurl server: " + + dataUrlResponse.getResponseCode()); + throw new SLBindingException(2007); + } + + } catch (SLException slx) { + bindingProcessorError = slx; + log.error("Error during dataurl communication"); + resultContentType = HttpUtil.TXT_XML; + currentState = State.TRANSFORM; + } catch (SSLHandshakeException hx) { + bindingProcessorError = new SLException(2010); + log.info("Error during dataurl communication", hx); + resultContentType = HttpUtil.TXT_XML; + currentState = State.TRANSFORM; + } catch (IOException e) { + bindingProcessorError = new SLBindingException(2001); + log.error("Error while data url handling", e); + resultContentType = HttpUtil.TXT_XML; + currentState = State.TRANSFORM; + return; + } + } + + protected void transformResult() { + log.debug("Entered State: " + State.TRANSFORM); + if (bindingProcessorError != null) { + resultContentType = HttpUtil.TXT_XML; + } else if (dataUrlResponse != null) { + resultContentType = dataUrlResponse.getContentType(); + } else { + targetContext.setTargetIsDataURL(false); + targetContext.setTargetProtocol(protocol.toString()); + try { + slResult = commandInvoker.getResult(targetContext); + resultContentType = slResult.getMimeType(); + log + .debug("Successfully got SLResult from commandinvoker, setting mimetype to: " + + resultContentType); + } catch (SLCanceledException e) { + log.info("Cannot get result from invoker:", e); + bindingProcessorError = new SLException(6002); + resultContentType = HttpUtil.TXT_XML; + } + } + transformer = getTransformer(getStyleSheetUrl()); + if (transformer != null) { + log.debug("Output transformation required"); + resultContentType = transformer.getOutputProperty("media-type"); + log.debug("Got media type from stylesheet: " + resultContentType); + if (resultContentType == null) { + log.debug("Setting to default text/xml result conent type"); + resultContentType = "text/xml"; + } + log.debug("Deferring sytylesheet processing"); + } + currentState = State.FINISHED; + } + + protected void finished() { + log.debug("Entered State: " + State.FINISHED); + if (bindingProcessorError != null) { + log.debug("Binding processor error, sending quit command"); + resultContentType = HttpUtil.TXT_XML; + } + sendSTALQuit(); + log.info("Terminating Bindingprocessor; Thread: " + + Thread.currentThread().getId()); + } + + // -- END Methods that handle the http binding activities as defined in the + // activity diagram -- + //---------------------------------------------------------------------------- + + /** + * Sets the headers of the SL Request. IMPORTANT: make sure to set all headers + * before invoking {@link #consumeRequestStream(InputStream)} + * + * @param aHeaderMap + * if null all header will be cleared. + */ + public void setHTTPHeaders(Map aHeaderMap) { + headerMap = new HashMap(); + // ensure lowercase keys + if (aHeaderMap != null) { + for (String s : aHeaderMap.keySet()) { + if (s != null) { + headerMap.put(s.toLowerCase(), aHeaderMap.get(s)); + if (s.equalsIgnoreCase(HttpUtil.HTTP_HEADER_REFERER)) { + String referer = aHeaderMap.get(s); + log.debug("Got referer header: " + referer); + srcContex.setSourceHTTPReferer(referer); + } + } + } + } + } + + public void setSourceCertificate(X509Certificate aCert) { + srcContex.setSourceCertificate(aCert); + } + + /** + * The HTTPBindingProcessor does not handle redirect URLs. It only provides + * the parameter. + * + * @return null if redirect url is not set. + */ + public String getRedirectURL() { + return getFormParameterAsString(FixedFormParameters.REDIRECTURL); + } + + public String getFormDataContentType(String aParameterName) { + FormParameter fp = formParameterMap.get(aParameterName); + if (fp != null) { + return fp.getFormParameterContentType(); + } + return null; + } + + public InputStream getFormData(String aParameterName) { + FormParameter fp = formParameterMap.get(aParameterName); + if (fp != null) { + return fp.getFormParameterValue(); + } + return null; + } + + protected void assignXMLRequest(InputStream is, String charset) + throws IOException, SLException { + Reader r = new InputStreamReader(is, charset); + StreamSource source = new StreamSource(r); + SLCommandContext commandCtx = new SLCommandContext(); + commandCtx.setSTAL(getSTAL()); + commandCtx.setURLDereferencerContext(new SimpleFormDataContextImpl(this)); + slCommand = SLCommandFactory.getInstance().createSLCommand(source, + commandCtx); + log.debug("Created new command: " + slCommand); + } + + @Override + public void run() { + boolean done = false; + int hopcounter = 0; + if (bindingProcessorError != null) { + currentState = State.FINISHED; + } + try { + while (!done) { + try { + switch (currentState) { + case INIT: + init(); + break; + case PROCESS: + processRequest(); + break; + case DATAURL: + handleDataUrl(); + if (++hopcounter > MAX_DATAURL_HOPS) { + log.error("Maximum number of dataurl hops reached"); + bindingProcessorError = new SLBindingException(2000); + currentState = State.FINISHED; + } + break; + case TRANSFORM: + transformResult(); + break; + case FINISHED: + done = true; + finished(); + break; + } + } catch (RuntimeException rte) { + throw rte; + } catch (Exception t) { + log.error("Caught unexpected exception", t); + responseCode = 200; + resultContentType = HttpUtil.TXT_XML; + responseHeaders = Collections.EMPTY_MAP; + bindingProcessorError = new SLException(2000); + currentState = State.FINISHED; + } + } + } catch (Throwable t) { + log.error("Caught unexpected exception", t); + responseCode = 200; + resultContentType = HttpUtil.TXT_XML; + responseHeaders = Collections.EMPTY_MAP; + bindingProcessorError = new SLException(2000); + currentState = State.FINISHED; + } + log.debug("Terminated http binding processor"); + } + + @Override + public void consumeRequestStream(InputStream is) { + try { + log.debug("Start consuming request stream"); + formParameterMap.clear(); + String cl = headerMap + .get(HttpUtil.HTTP_HEADER_CONTENT_TYPE.toLowerCase()); + if (cl == null) { + log.info("No content type set in http header"); + throw new SLBindingException(2006); + } + InputDecoder id = InputDecoderFactory.getDecoder(cl, is); + id.setContentType(cl); + if (id == null) { + log.error("Cannot get inputdecoder for is"); + throw new SLException(2006); + } + for (Iterator fpi = id.getFormParameterIterator(); fpi + .hasNext();) { + FormParameter fp = fpi.next(); + log.debug("Got request parameter with name: " + + fp.getFormParameterName()); + if (fp.getFormParameterName().equals(FixedFormParameters.XMLREQUEST)) { + log.debug("Creating XML Request"); + for (Iterator headerIterator = fp.getHeaderNames(); headerIterator + .hasNext();) { + String headerName = headerIterator.next(); + if (HttpUtil.CONTENT_TRANSFER_ENCODING.equalsIgnoreCase(headerName)) { + String transferEncoding = fp.getHeaderValue(headerName); + log.debug("Got transfer encoding for xmlrequest: " + + transferEncoding); + if (XML_REQ_TRANSFER_ENCODING.contains(transferEncoding)) { + log.debug("Supported transfer encoding: " + transferEncoding); + } else { + log + .error("Transferencoding not supported: " + + transferEncoding); + throw new SLBindingException(2005); + } + } + } + String charset = HttpUtil.getCharset(cl, true); + assignXMLRequest(fp.getFormParameterValue(), charset); + } else { + FormParameterStore fps = new FormParameterStore(); + fps.init(fp); + if (!fps.isEmpty()) { + log.debug("Setting from parameter: " + fps.getFormParameterName()); + formParameterMap.put(fps.getFormParameterName(), fps); + } + } + } + if (slCommand == null) { + throw new SLBindingException(2004); + } + if (is.read() != -1) { + log.error("Request input stream not completely read"); + // consume rest of stream, should never occur + throw new SLRuntimeException( + "request input stream not consumed till end"); + } + } catch (SLException slx) { + log.info("Error while consuming input stream " + slx); + bindingProcessorError = slx; + } catch (Throwable t) { + log.info("Error while consuming input stream " + t, t); + bindingProcessorError = new SLException(2000); + } finally { + try { + while (is.read() != -1) + ; + } catch (IOException e) { + log.error(e); + } + } + } + + @Override + public String getResultContentType() { + return resultContentType; + } + + protected Transformer getTransformer(String styleSheetURL) { + if (styleSheetURL == null) { + log.debug("Stylesheet URL not set"); + return null; + } + try { + URLDereferencerContext urlCtx = new SimpleFormDataContextImpl(this); + URIResolver resolver = new URIResolverAdapter(URLDereferencer + .getInstance(), urlCtx); + TransformerFactory factory = TransformerFactory.newInstance(); + StreamData sd = URLDereferencer.getInstance().dereference(styleSheetURL, + urlCtx); + Transformer t = factory.newTransformer(new StreamSource(sd.getStream())); + t.setURIResolver(resolver); + return t; + } catch (Exception ex) { + log.info("Cannot instantiate transformer", ex); + bindingProcessorError = new SLException(2002); + return null; + } + } + + protected void handleBindingProcessorError(OutputStream os, String encoding, + Transformer transformer) throws IOException { + log.debug("Writing error as result"); + ErrorResultImpl error = new ErrorResultImpl(bindingProcessorError); + try { + error.writeTo(new StreamResult(new OutputStreamWriter(os, encoding)), + transformer); + } catch (TransformerException e) { + log.fatal("Cannot write error result to stream", e); + } + } + + @Override + public void writeResultTo(OutputStream os, String encoding) + throws IOException { + if (encoding == null) { + encoding = HttpUtil.DEFAULT_CHARSET; + } + if (bindingProcessorError != null) { + log.debug("Detected error in binding processor, writing error as result"); + handleBindingProcessorError(os, encoding, transformer); + return; + } else if (dataUrlResponse != null) { + log.debug("Writing data url response as result"); + String charEnc = HttpUtil.getCharset(dataUrlResponse.getContentType(), + true); + InputStreamReader isr = new InputStreamReader( + dataUrlResponse.getStream(), charEnc); + OutputStreamWriter osw = new OutputStreamWriter(os, encoding); + if (transformer == null) { + StreamUtil.copyStream(isr, osw); + } else { + try { + transformer.transform(new StreamSource(isr), new StreamResult(osw)); + } catch (TransformerException e) { + log.fatal("Exception occured during result transformation", e); + // bindingProcessorError = new SLException(2008); + // handleBindingProcessorError(os, encoding, null); + return; + } + } + osw.flush(); + isr.close(); + } else if (slResult == null) { + // result not yet assigned -> must be a cancel + bindingProcessorError = new SLException(6001); + handleBindingProcessorError(os, encoding, transformer); + return; + } else { + log.debug("Getting result from invoker"); + OutputStreamWriter osw = new OutputStreamWriter(os, encoding); + try { + slResult.writeTo(new StreamResult(osw), transformer); + } catch (TransformerException e) { + log.fatal("Cannot write result to stream", e); + // bindingProcessorError = new SLException(2008); + // handleBindingProcessorError(os, encoding, transformer); + } + osw.flush(); + } + } + + /** + * The response code from the dataurl server or 200 if no dataurl server + * created the result + * + * @return + */ + public int getResponseCode() { + return responseCode; + } + + /** + * All headers from the data url server in case of a direct forward from the + * dataurl server. + * + * @return + */ + public Map getResponseHeaders() { + return responseHeaders; + } + + @Override + public void setLocale(Locale locale) { + if (locale == null) { + throw new NullPointerException("Locale must not be set to null"); + } + this.locale = locale; + } + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java new file mode 100644 index 00000000..b11a4d85 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java @@ -0,0 +1,78 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.util.Map; + +import org.apache.commons.fileupload.ParameterParser; + +/** + * Placeholder for some HTTP related constants and helper method to extract the charset for a request. + * + */ +public class HttpUtil { + + public final static String CHAR_SET = "charset"; + public final static String DEFAULT_CHARSET = "ISO-8859-1"; + public final static String HTTP_HEADER_CONTENT_TYPE = "Content-Type"; + public static final String HTTP_HEADER_USER_AGENT = "User-Agent"; + public final static String HTTP_HEADER_REFERER = "Referer"; + public final static String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding"; + public final static String MULTIPART_FOTMDATA = "multipart/form-data"; + public final static String MULTIPART_FOTMDATA_BOUNDARY = "boundary"; + public final static String TXT_XML = "text/xml"; + public final static String TXT_PLAIN = "text/plain"; + public final static String TXT_HTML = "text/html"; + public final static String APPLICATION_URL_ENCODED = "application/x-www-form-urlencoded"; + public final static String HTTP_HEADER_LOCATION = "Location"; + + public final static char[] SEPERATOR = { ';' }; + + /** + * Extracts charset from a content type header. + * + * @param contentType + * @param replaceNullWithDefault + * if true the method return the default charset if not set + * @return charset String or null if not present + */ + @SuppressWarnings("unchecked") + public static String getCharset(String contentType, + boolean replaceNullWithDefault) { + ParameterParser pf = new ParameterParser(); + pf.setLowerCaseNames(true); + Map map = pf.parse(contentType, SEPERATOR); + String retVal = (String) map.get(CHAR_SET); + if ((retVal == null) && (replaceNullWithDefault)) { + if (map.containsKey(APPLICATION_URL_ENCODED)) { + // default charset for url encoded data + return "UTF-8"; + } + retVal = getDefaultCharset(); + } + return retVal; + } + + /** + * + * Not to be used for url encoded requests. + */ + public static String getDefaultCharset() { + return DEFAULT_CHARSET; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java new file mode 100644 index 00000000..93ab2e8b --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java @@ -0,0 +1,27 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +/** + * The unique identifier for a BindingProcessor + * @author wbauer + * + */ +public interface Id { + + public String toString(); +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java new file mode 100644 index 00000000..60bf69a4 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java @@ -0,0 +1,106 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Creates or converts Ids for BindingProcessors. + * @author wbauer + * + */ +public class IdFactory { + + public static int DEFAULT_NUMBER_OF_BITS = 168; + + private static Log log = LogFactory.getLog(IdFactory.class); + + private static IdFactory instance = new IdFactory(); + + private SecureRandom random; + private int numberOfBits = DEFAULT_NUMBER_OF_BITS; + + private IdFactory() { + try { + random = SecureRandom.getInstance("SHA1PRNG"); + } catch (NoSuchAlgorithmException e) { + log.error("Cannot instantiate secure random" + e); + } + } + + public static IdFactory getInstance() { + return instance; + } + + + /** + * set the secure random number generator to create secure ids. + * + * @param random + * must not be null + */ + public void setSecureRandom(SecureRandom random) { + if (random == null) { + throw new NullPointerException("Cannot set secure random to null"); + } + this.random = random; + } + + /** + * Don't use this method unless you know exactly what you do ! + * Be sure to use a sufficient large entropy + * @param numberOfBits >=1 (although this small entropy does not make sense) + */ + public void setNumberOfBits(int numberOfBits) { + if (numberOfBits <1) { + throw new IllegalArgumentException("Cannot set number of bits < 1"); + } + this.numberOfBits = numberOfBits; + } + + public int getNumberOfBits() { + return numberOfBits; + } + + /** + * Creates a new Id object with the factory's secure RNG and the set number of + * bits. + * + * @return + */ + public Id createId() { + return new IdImpl(numberOfBits, random); + } + + /** + * Creates an Id object for the provided String + * + * @param idString + * may be null in this case the method call creates a new Id. + * @return + */ + public Id createId(String idString) { + if (idString == null) { + return createId(); + } + return new IdImpl(idString); + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java new file mode 100644 index 00000000..5523992a --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java @@ -0,0 +1,80 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import iaik.utils.Base64OutputStream; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.security.SecureRandom; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Implementation that uses a Base64 representation for self generated Ids. + * @author wbauer + * + */ +public class IdImpl implements at.gv.egiz.bku.binding.Id { + private static Log log = LogFactory.getLog(IdImpl.class); + + private String idString; + + public IdImpl(int bitNumber, SecureRandom random) { + int byteSize = bitNumber/8; + if (bitNumber % 8 != 0) { + byteSize++; + } + byte[] randomBytes = new byte[byteSize]; + random.nextBytes(randomBytes); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + Base64OutputStream b64 = new Base64OutputStream(baos); + try { + b64.write(randomBytes); + b64.flush(); + b64.close(); + idString = new String(baos.toByteArray()); + } catch (IOException e) { + log.error("Cannot create secure id: "+e); + } + } + + public IdImpl(String idString) { + if (idString == null) { + throw new NullPointerException("Provided idstring must not be null"); + } + this.idString = idString; + } + + public String toString() { + return idString; + } + + public int hashCode() { + return idString.hashCode(); + } + + public boolean equals(Object other) { + if (other instanceof Id) { + Id otherId = (Id)other; + return otherId.toString().equals(idString); + } else { + return false; + } + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java new file mode 100644 index 00000000..e22e54f2 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java @@ -0,0 +1,41 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.Iterator; + +/** + * Decodes http input stream (either url encoded or multipart formdata) + * @author wbauer + * + */ +public interface InputDecoder { + /** + * Called from Factory. + * @param contentType + */ + void setContentType(String contentType); + + /** + * Called from Factory. + * @param is the input must not be null + */ + void setInputStream(InputStream is); + + Iterator getFormParameterIterator(); +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java new file mode 100644 index 00000000..211deee7 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java @@ -0,0 +1,89 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Factory to get a matching instance for a encoded input stream when reading a http request. + * + */ +public class InputDecoderFactory { + + public final static String MULTIPART_FORMDATA = "multipart/form-data"; + public final static String URL_ENCODED = "application/x-www-form-urlencoded"; + + private static InputDecoderFactory instance = new InputDecoderFactory(); + private static Log log = LogFactory.getLog(InputDecoderFactory.class); + + private String defaultEncoding = URL_ENCODED; + private Map> decoderMap = new HashMap>(); + + private InputDecoderFactory() { + decoderMap.put(MULTIPART_FORMDATA, MultiPartFormDataInputDecoder.class); + decoderMap.put(URL_ENCODED, XWWWFormUrlInputDecoder.class); + } + + public static InputDecoder getDefaultDecoder(InputStream is) { + return getDecoder(instance.defaultEncoding, is); + } + + /** + * + * @param contentType + * @param is + * @return null if the content type is not supported + */ + public static InputDecoder getDecoder(String contentType, InputStream is) { + String prefix = contentType.split(";")[0].trim().toLowerCase(); + Class dec = instance.decoderMap.get(prefix); + if (dec == null) { + log.info("Unknown encoding prefix " + contentType); + return null; + } + InputDecoder id; + try { + id = dec.newInstance(); + id.setContentType(contentType); + id.setInputStream(is); + return id; + } catch (InstantiationException e) { + log.error(e); + throw new IllegalArgumentException( + "Cannot get an input decoder for content type: " + contentType); + } catch (IllegalAccessException e) { + log.error(e); + throw new IllegalArgumentException( + "Cannot get an input decoder for content type: " + contentType); + } + } + + /** + * Allows to register decoders for special mime types. + * @param mimeType + * @param decoder + */ + public static void registerDecoder(String mimeType, + Class decoder) { + instance.decoderMap.put(mimeType.toLowerCase(), decoder); + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java new file mode 100644 index 00000000..f8b13553 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java @@ -0,0 +1,133 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Iterator; + +import org.apache.commons.fileupload.FileItemIterator; +import org.apache.commons.fileupload.FileItemStream; +import org.apache.commons.fileupload.FileUpload; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.RequestContext; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slexceptions.SLRuntimeException; + +/** + * The code to detect the multipart boundary is based on + * org.apache.commons.fileupload.FileUploadBase of + * http://commons.apache.org/fileupload/ + * + * @author wbauer + * + */ +public class MultiPartFormDataInputDecoder implements InputDecoder, + RequestContext { + + private static Log log = LogFactory + .getLog(MultiPartFormDataInputDecoder.class); + + private String contentType; + private InputStream stream; + + @Override + public void setContentType(String contentType) { + this.contentType = contentType; + } + + @Override + public String getCharacterEncoding() { + return null; + } + + @Override + public int getContentLength() { + return 0; + } + + @Override + public String getContentType() { + return contentType; + } + + @Override + public InputStream getInputStream() throws IOException { + return stream; + } + + @Override + public Iterator getFormParameterIterator() { + try { + FileUpload fup = new FileUpload(); + FileItemIterator fit = fup.getItemIterator(this); + return new IteratorDelegator(fit); + } catch (Exception iox) { + log.error("Cannot decode multipart form data stream " + iox); + throw new SLRuntimeException(iox); + } + } + + @Override + public void setInputStream(InputStream is) { + stream = is; + } + + static class IteratorDelegator implements Iterator { + + private FileItemIterator fileItemIterator; + + public IteratorDelegator(FileItemIterator fit) { + fileItemIterator = fit; + } + + @Override + public boolean hasNext() { + try { + return fileItemIterator.hasNext(); + } catch (FileUploadException e) { + log.error(e); + throw new SLRuntimeException(e); + } catch (IOException e) { + log.error(e); + throw new SLRuntimeException(e); + } + } + + @Override + public FormParameter next() { + try { + FileItemStream item = fileItemIterator.next(); + return new FormParameterImpl(item.getContentType(), + item.getFieldName(), item.openStream(), item.getHeaders()); + } catch (FileUploadException e) { + log.error(e); + throw new SLRuntimeException(e); + } catch (IOException e) { + log.error(e); + throw new SLRuntimeException(e); + } + } + + @Override + public void remove() { + throw new UnsupportedOperationException("Remove not supported"); + } + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java new file mode 100644 index 00000000..6c2dcb9f --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java @@ -0,0 +1,26 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +/** + * Could be used to remove expired BindingProcessor objects from a BindingProcessorManager. + * + */ +public interface RemovalStrategy { + public void execute(); + public void setBindingProcessorManager(BindingProcessorManager bp); +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java new file mode 100644 index 00000000..ef2affd1 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java @@ -0,0 +1,66 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandInvoker; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slcommands.SLSourceContext; +import at.gv.egiz.bku.slcommands.SLTargetContext; + +/** + * This class implements the entry point for the CCEs security management. + * + * TODO the secuirty management is currently not implemented. + */ +public class SLCommandInvokerImpl implements SLCommandInvoker { + + private static Log log = LogFactory.getLog(SLCommandInvokerImpl.class); + + protected SLCommand command; + protected SLResult result; + + /** + * Invokes a sl command. + */ + public void invoke(SLSourceContext aContext) { + // FIXXME add security policy here. + log.warn("Security policy not implemented yet, invoking command: "+command); + result = command.execute(); + } + + public SLResult getResult(SLTargetContext aContext) { + // FIXXME + log.warn("Security policy not implemented yet, getting result of command: "+command); + return result; + } + + public void setCommand(SLCommand aCmd) { + command = aCmd; + } + + @Override + public SLCommandInvoker newInstance() { + SLCommandInvokerImpl cmdInv = new SLCommandInvokerImpl(); + return cmdInv; + } + + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java new file mode 100644 index 00000000..f4ebe288 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java @@ -0,0 +1,101 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLDecoder; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.fileupload.ParameterParser; + +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.bku.utils.StreamUtil; + +/** + * Implementation based on Java's URLDecoder class + * + */ +// FIXME replace this code by a streaming variant +public class XWWWFormUrlInputDecoder implements InputDecoder { + + public final static String CHAR_SET = "charset"; + public final static String NAME_VAL_SEP = "="; + public final static String SEP = "\\&"; + + private String contentType; + private InputStream dataStream; + private String charset = "UTF-8"; + + protected List decodeInput(InputStream is) throws IOException { + List result = new LinkedList(); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + StreamUtil.copyStream(is, bos); + String inputString = new String(bos.toByteArray()); + String[] nameValuePairs = inputString.split(SEP); + //inputString = URLDecoder.decode(inputString, charset); + for (int i = 0; i < nameValuePairs.length; i++) { + String[] fields = nameValuePairs[i].split(NAME_VAL_SEP, 2); + if (fields.length != 2) { + throw new SLRuntimeException("Invalid form encoding, missing value"); + } + String name = URLDecoder.decode(fields[0], charset); + String value =URLDecoder.decode(fields[1], charset); + ByteArrayInputStream bais = new ByteArrayInputStream(value + .getBytes(charset)); + FormParameterImpl fpi = new FormParameterImpl(contentType, name, bais, null); + result.add(fpi); + } + return result; + } + + @SuppressWarnings("unchecked") + @Override + public void setContentType(String contentType) { + ParameterParser pp = new ParameterParser(); + pp.setLowerCaseNames(true); + Map params = pp.parse(contentType, new char[] { ':', ';' }); + if (!params.containsKey("application/x-www-form-urlencoded")) { + throw new IllegalArgumentException( + "not a url encoded content type specification: " + contentType); + } + String cs = params.get(CHAR_SET); + if (cs != null) { + charset = cs; + } + this.contentType = contentType; + } + + @Override + public Iterator getFormParameterIterator() { + try { + return decodeInput(dataStream).iterator(); + } catch (IOException e) { + throw new SLRuntimeException(e); + } + } + + @Override + public void setInputStream(InputStream is) { + dataStream = is; + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java new file mode 100644 index 00000000..253f8ff5 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java @@ -0,0 +1,66 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.binding.multipart; + +import java.io.IOException; +import java.io.InputStream; +import org.apache.commons.httpclient.methods.multipart.PartSource; + +/** + * InputStream source for FilePart. + * DOES NOT RETURN A CORRECT LENGTH OF THE INPUT DATA. (but we don't care, since we use chunked encoding) + * + * @author clemens + */ +public class InputStreamPartSource implements PartSource { + + protected String name; + protected InputStream data; + + public InputStreamPartSource(String name, InputStream data) { + this.name = name; + this.data = data; + } + + /** + * Just a dummy value to make Part work + * @return 42 + */ + @Override + public long getLength() { + //System.out.println("***********GETLENGTH"); + return 42; + } + + @Override + public String getFileName() { + return name; + } + + @Override + public InputStream createInputStream() throws IOException { + if (data == null) + throw new IOException("Failed to get stream for part: no data was set."); + return data; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java new file mode 100644 index 00000000..566b77b3 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.binding.multipart; + +import at.gv.egiz.bku.slcommands.SLResult; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; + +import javax.xml.transform.stream.StreamResult; + +import org.apache.commons.httpclient.methods.multipart.ByteArrayPartSource; +import org.apache.commons.httpclient.methods.multipart.FilePart; + +/** + * + * @author clemens + */ +public class SLResultPart extends FilePart { + + protected SLResult slResult; + protected String encoding; + + public SLResultPart(SLResult slResult, String encoding) { + super("XMLResponse", + new ByteArrayPartSource(null, "dummySource".getBytes())); + this.slResult = slResult; + this.encoding = encoding; + } + + @Override + protected void sendData(OutputStream out) throws IOException { + slResult.writeTo(new StreamResult(new OutputStreamWriter(out, encoding))); + // slResult.writeTo(new StreamResult(new OutputStreamWriter(System.out, + // encoding))); + // super.sendData(out); + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java new file mode 100644 index 00000000..014b7fd7 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java @@ -0,0 +1,21 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public class AccessControlInvocation implements + at.gv.egiz.bku.slcommands.InvocationStrategy { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java new file mode 100644 index 00000000..2d87c39f --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; + +public interface CreateXMLSignatureCommand extends SLCommand { + + public void prepareXMLSignature() throws SLCommandException, SLRequestException; +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java new file mode 100644 index 00000000..4bc2820b --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface CreateXMLSignatureResult extends SLResult { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java new file mode 100644 index 00000000..5d52c0ea --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface ErrorResult extends SLResult { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java new file mode 100644 index 00000000..77529a36 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface InfoboxReadCommand extends SLCommand { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java new file mode 100644 index 00000000..c6a51362 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface InfoboxReadResult extends SLResult { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java new file mode 100644 index 00000000..6b410fac --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface InvocationStrategy { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java new file mode 100644 index 00000000..0651f882 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface NullOperationCommand extends SLCommand { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java new file mode 100644 index 00000000..c36c879e --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java @@ -0,0 +1,20 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +public interface NullOperationResult extends SLResult { +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java new file mode 100644 index 00000000..a8625946 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java @@ -0,0 +1,31 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import at.gv.egiz.bku.slexceptions.SLCommandException; + +public interface SLCommand { + + public final String NAMESPACE_URI = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#"; + + public String getName(); + + public void init(SLCommandContext aCtx, Object aUnmarshalledRequest) throws SLCommandException; + + public SLResult execute(); + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java new file mode 100644 index 00000000..c95736bd --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java @@ -0,0 +1,42 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; +import at.gv.egiz.stal.STAL; + +public class SLCommandContext { + + private STAL stal; + private URLDereferencerContext urlDerefCtx; + + public void setSTAL(STAL aStal) { + this.stal = aStal; + } + + public void setURLDereferencerContext(URLDereferencerContext aCtx) { + this.urlDerefCtx = aCtx; + } + + public STAL getSTAL() { + return stal; + } + + public URLDereferencerContext getURLDereferencerContext() { + return urlDerefCtx; + } +} \ No newline at end of file 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 new file mode 100644 index 00000000..e13b29a1 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java @@ -0,0 +1,370 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import java.io.IOException; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; + +import javax.xml.XMLConstants; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.UnmarshalException; +import javax.xml.bind.Unmarshaller; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +import at.gv.egiz.bku.slcommands.impl.CreateXMLSignatureCommandImpl; +import at.gv.egiz.bku.slcommands.impl.InfoboxReadCommandImpl; +import at.gv.egiz.bku.slcommands.impl.NullOperationCommandImpl; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLExceptionMessages; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.slbinding.RedirectEventFilter; +import at.gv.egiz.slbinding.RedirectUnmarshallerListener; + +public class SLCommandFactory { + + /** + * Schema files required for Security Layer command validation. + */ + public static final String[] SCHEMA_FILES = new String[]{ + "at/gv/egiz/bku/slcommands/schema/xml.xsd", + "at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd", + "at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd" + }; + /** + * Logging facility. + */ + static Log log = LogFactory.getLog(SLCommandFactory.class); + /** + * The instance returned by {@link #getInstance()}. + */ + private static SLCommandFactory instance; + /** + * Schema for Security Layer command validation. + */ + private static Schema slSchema; + /** + * The JAXBContext. + */ + private static JAXBContext jaxbContext; + /** + * The map of : to implementation class of the + * corresponding {@link SLCommand}. + */ + private static Map> slRequestTypeMap = new HashMap>(); + + + static { + + // TODO: implement dynamic registration + + // register all known implementation classes + putImplClass(SLCommand.NAMESPACE_URI, "NullOperationRequest", + NullOperationCommandImpl.class); + putImplClass(SLCommand.NAMESPACE_URI, "InfoboxReadRequest", + InfoboxReadCommandImpl.class); + putImplClass(SLCommand.NAMESPACE_URI, "CreateXMLSignatureRequest", + CreateXMLSignatureCommandImpl.class); + } + + /** + * Register an {@link SLCommand} implementation class of a Security Layer + * command with the given namespaceUri and localname + * . + * + * @param namespaceUri + * the namespace URI of the Security Layer command + * @param localname + * the localname of the Security Layer command + * @param slCommandClass + * the implementation class, or null to deregister a + * currently registered class + */ + public static void putImplClass(String namespaceUri, String localname, + Class slCommandClass) { + if (slCommandClass != null) { + slRequestTypeMap.put(namespaceUri + ":" + localname, slCommandClass); + } else { + slRequestTypeMap.remove(namespaceUri + ":" + localname); + } + } + + /** + * Returns the implementation class of an {@link SLCommand} with the given + * name, or null if no such class is registered. + * + * @param name + * the QName of the Security Layer command + * @return the implementation class, or null if no class is + * registered for the given name + */ + public static Class getImplClass(QName name) { + String namespaceURI = name.getNamespaceURI(); + String localPart = name.getLocalPart(); + return slRequestTypeMap.get(namespaceURI + ":" + localPart); + } + + /** + * Sets the schema to validate Security Layer commands with. + * + * @param slSchema the schema to validate Security Layer commands with + */ + public static void setSLSchema(Schema slSchema) { + SLCommandFactory.slSchema = slSchema; + } + + /** + * @return the jaxbContext + */ + public static JAXBContext getJaxbContext() { + ensureJaxbContext(); + return jaxbContext; + } + + /** + * @param jaxbContext the jaxbContext to set + */ + public static void setJaxbContext(JAXBContext jaxbContext) { + SLCommandFactory.jaxbContext = jaxbContext; + } + + /** + * Initialize the JAXBContext. + */ + private synchronized static void ensureJaxbContext() { + if (jaxbContext == null) { + try { + String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName(); + String xmldsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); + setJaxbContext(JAXBContext.newInstance(slPkg + ":" + xmldsigPkg)); + } catch (JAXBException e) { + log.error("Failed to setup JAXBContext security layer request.", e); + throw new SLRuntimeException(e); + } + } + } + + /** + * Initialize the security layer schema. + */ + private synchronized static void ensureSchema() { + if (slSchema == null) { + try { + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + ClassLoader cl = SLCommandFactory.class.getClassLoader(); + Source[] sources = new Source[SCHEMA_FILES.length]; + for (int i = 0; i < SCHEMA_FILES.length; i++) { + String schemaFile = SCHEMA_FILES[i]; + URL schemaURL = cl.getResource(schemaFile); + if (schemaURL == null) { + throw new SLRuntimeException("Failed to load schema file " + schemaFile + "."); + } + log.debug("Schema location: " + schemaURL); + sources[i] = new StreamSource(schemaURL.openStream()); + } + Schema schema = schemaFactory.newSchema(sources); + log.debug("Schema successfully created."); + SLCommandFactory.setSLSchema(schema); + } catch (SAXException e) { + log.error("Failed to load security layer schema.", e); + throw new SLRuntimeException("Failed to load security layer schema.", e); + } catch (IOException e) { + log.error("Failed to load security layer schema.", e); + throw new SLRuntimeException("Failed to load security layer schema.", e); + } + + } + } + + /** + * Get an instance of the SLCommandFactory. + */ + public synchronized static SLCommandFactory getInstance() { + if (instance == null) { + ensureJaxbContext(); + ensureSchema(); + instance = new SLCommandFactory(); + } + return instance; + } + + /** + * Private constructor used by {@link #getInstance()}. + */ + private SLCommandFactory() { + } + + /** + * Unmarshalls from the given source. + * + * @see Unmarshaller#unmarshal(Source) + * + * Note:Could replace JAXB's unmarshal-time validation engine (see commented code), however, + * we need a redirect filter. + * + * @param source + * the source to unmarshal from + * @return the object returned by {@link Unmarshaller#unmarshal(Source)} + * @throws SLRequestException + * if unmarshalling fails + * @throws SLRuntimeException + * if an unexpected error occurs configuring the unmarshaller or if + * unmarshalling fails with an unexpected error + */ + protected Object unmarshal(Source source) throws SLRuntimeException, + SLRequestException { + + Object object; + try { + +// ValidatorHandler validator = slSchema.newValidatorHandler(); +// validator.getContentHandler(); +// +// SAXParserFactory spf = SAXParserFactory.newInstance(); +// spf.setNamespaceAware(true); +// XMLReader saxReader = spf.newSAXParser().getXMLReader(); +// //TODO extend validator to implement redirectContentHandler (validate+redirect) +// saxReader.setContentHandler(validator); +// //TODO get a InputSource +// SAXSource saxSource = new SAXSource(saxReader, source); +// +// Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); +// //turn off duplicate jaxb validation +// unmarshaller.setSchema(null); +// unmarshaller.setListener(listener); +// unmarshaller.unmarshal(saxSource); + + + XMLInputFactory inputFactory = XMLInputFactory.newInstance(); + XMLEventReader eventReader = inputFactory.createXMLEventReader(source); + RedirectEventFilter redirectEventFilter = new RedirectEventFilter(); + XMLEventReader filteredReader = inputFactory.createFilteredReader(eventReader, redirectEventFilter); + + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + unmarshaller.setListener(new RedirectUnmarshallerListener(redirectEventFilter)); + if (slSchema != null) { + unmarshaller.setSchema(slSchema); + } + log.trace("Before unmarshal()."); + object = unmarshaller.unmarshal(filteredReader); + log.trace("After unmarshal()."); + } catch (UnmarshalException e) { + if (log.isDebugEnabled()) { + log.debug("Failed to unmarshall security layer request.", e); + } else { + log.info("Failed to unmarshall security layer request." + e.getMessage()); + } + Throwable cause = e.getCause(); + if (cause instanceof SAXParseException) { + throw new SLRequestException(3000, + SLExceptionMessages.EC3000_UNCLASSIFIED, new Object[]{cause.getMessage()}); + } else { + throw new SLRequestException(3000, + SLExceptionMessages.EC3000_UNCLASSIFIED, new Object[]{e}); + } + } catch (JAXBException e) { + // unexpected error + log.error("Failed to unmarshall security layer request.", e); + throw new SLRuntimeException(e); + } catch (XMLStreamException e) { + // unexpected error + log.error("Failed to unmarshall security layer request.", e); + throw new SLRuntimeException(e); + } + + return object; + + } + + /** + * Creates a new SLCommand from the given source and + * context. + * + * @param source + * the Source to unmarshall from + * @param context + * the context for the created SLCommand + * @return the SLCommand unmarshalled from the given + * source + * @throws SLRequestException + * if unmarshalling fails + * @throws SLCommandException + * if command ist not supported + * @throws SLRuntimeException + * if an unexpected error occurs configuring the unmarshaller, if + * unmarshalling fails with an unexpected error or if the + * corresponding SLCommand could not be instantiated + */ + @SuppressWarnings("unchecked") + public SLCommand createSLCommand(Source source, SLCommandContext context) + throws SLCommandException, SLRuntimeException, SLRequestException { + + Object object = unmarshal(source); + if (!(object instanceof JAXBElement)) { + // invalid request + log.info("Invalid security layer request. " + object.toString()); + throw new SLRequestException(3002, SLExceptionMessages.EC3002_INVALID, + new Object[]{object.toString()}); + } + + QName qName = ((JAXBElement) object).getName(); + Class implClass = getImplClass(qName); + if (implClass == null) { + // command not supported + log.info("Unsupported command received: " + qName.toString()); + throw new SLCommandException(4011, + SLExceptionMessages.EC4011_NOTIMPLEMENTED, new Object[]{qName.toString()}); + } + + // try to instantiate + SLCommand slCommand; + try { + slCommand = implClass.newInstance(); + log.debug("SLCommand " + slCommand.getName() + " created."); + } catch (InstantiationException e) { + // unexpected error + log.error("Failed to instantiate security layer command implementation.", + e); + throw new SLRuntimeException(e); + } catch (IllegalAccessException e) { + // unexpected error + log.error("Failed to instantiate security layer command implementation.", + e); + throw new SLRuntimeException(e); + } + slCommand.init(context, (JAXBElement) object); + + return slCommand; + + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java new file mode 100644 index 00000000..30c6b68f --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java @@ -0,0 +1,45 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import at.gv.egiz.bku.slexceptions.SLCanceledException; + +public interface SLCommandInvoker { + + /** + * + * @param aContext + * @throws SLCanceledException if the security management prevents execution of this command + */ + public void invoke(SLSourceContext aContext) throws SLCanceledException; + + /** + * + * @param aContext + * @return + * @throws SLCanceledException if the security management prevents execution of this command + */ + public SLResult getResult(SLTargetContext aContext) throws SLCanceledException; + + public void setCommand(at.gv.egiz.bku.slcommands.SLCommand aCmd); + + /** + * Prototype creation + * @return + */ + public SLCommandInvoker newInstance(); +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java new file mode 100644 index 00000000..7cf43fda --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java @@ -0,0 +1,44 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import javax.xml.transform.Result; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; + +public interface SLResult { + + public static enum SLResultType {BINARY, XML}; + + public SLResultType getResultType(); + + /** + * The MIME Type of the Result. + * + * @return may result null if unknown. + */ + public String getMimeType(); + + public void writeTo(Result aResult); + + /** + * + * @param result + * @param transformer may be null. + */ + public void writeTo(Result result, Transformer transformer) throws TransformerException; +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java new file mode 100644 index 00000000..ded55b2a --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java @@ -0,0 +1,63 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import java.security.cert.X509Certificate; + +import at.gv.egiz.bku.utils.binding.Protocol; + + +public class SLSourceContext { + + private Protocol sourceProtocol; + private boolean sourceIsDataURL; + private X509Certificate sourceCertificate; + private String sourceHTTPReferer; + + public Protocol getSourceProtocol() { + return sourceProtocol; + } + + public void setSourceProtocol(Protocol sourceProtocol) { + this.sourceProtocol = sourceProtocol; + } + + public boolean isSourceIsDataURL() { + return sourceIsDataURL; + } + + public void setSourceIsDataURL(boolean sourceIsDataURL) { + this.sourceIsDataURL = sourceIsDataURL; + } + + public X509Certificate getSourceCertificate() { + return sourceCertificate; + } + + public void setSourceCertificate(X509Certificate sourceCertificate) { + this.sourceCertificate = sourceCertificate; + } + + public String getSourceHTTPReferer() { + return sourceHTTPReferer; + } + + public void setSourceHTTPReferer(String sourceHTTPReferer) { + this.sourceHTTPReferer = sourceHTTPReferer; + } + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java new file mode 100644 index 00000000..cf800406 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java @@ -0,0 +1,50 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import java.security.cert.X509Certificate; + +public class SLTargetContext { + private String targetProtocol; + private boolean targetIsDataURL; + private X509Certificate targetCertificate; + + public String getTargetProtocol() { + return targetProtocol; + } + + public void setTargetProtocol(String targetProtocol) { + this.targetProtocol = targetProtocol; + } + + public boolean isTargetIsDataURL() { + return targetIsDataURL; + } + + public void setTargetIsDataURL(boolean targetIsDataURL) { + this.targetIsDataURL = targetIsDataURL; + } + + public X509Certificate getTargetCertificate() { + return targetCertificate; + } + + public void setTargetCertificate(X509Certificate targetCertificate) { + this.targetCertificate = targetCertificate; + } + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java new file mode 100644 index 00000000..136fa6f3 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java @@ -0,0 +1,229 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import java.io.ByteArrayInputStream; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.Date; + +import javax.xml.crypto.MarshalException; +import javax.xml.crypto.URIReferenceException; +import javax.xml.crypto.dsig.XMLSignatureException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSSerializer; + +import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; +import at.gv.egiz.bku.slcommands.CreateXMLSignatureCommand; +import at.gv.egiz.bku.slcommands.SLCommandContext; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory; +import at.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactoryImpl; +import at.gv.egiz.bku.slcommands.impl.xsect.IdValueFactory; +import at.gv.egiz.bku.slcommands.impl.xsect.IdValueFactoryImpl; +import at.gv.egiz.bku.slcommands.impl.xsect.Signature; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.dom.DOMUtils; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.InfoboxReadResponse; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; + +/** + * This class implements the security layer command CreateXMLSignatureRequest. + * + * @author mcentner + */ +public class CreateXMLSignatureCommandImpl extends SLCommandImpl implements + CreateXMLSignatureCommand { + + /** + * Logging facility. + */ + protected static Log log = LogFactory.getLog(CreateXMLSignatureCommandImpl.class); + + /** + * The signing certificate. + */ + protected X509Certificate signingCertificate; + + /** + * The keybox identifier of the key used for signing. + */ + protected String keyboxIdentifier; + + /** + * The to-be signed signature. + */ + protected Signature signature; + + @Override + public void init(SLCommandContext ctx, Object unmarshalledRequest) + throws SLCommandException { + super.init(ctx, unmarshalledRequest); + } + + @Override + public void prepareXMLSignature() throws SLCommandException, SLRequestException { + + CreateXMLSignatureRequestType request = getRequestValue(); + + // TODO: make configurable? + IdValueFactory idValueFactory = new IdValueFactoryImpl(); + + // TODO: make configurable? + AlgorithmMethodFactory algorithmMethodFactory; + try { + algorithmMethodFactory = new AlgorithmMethodFactoryImpl(signingCertificate); + } catch (NoSuchAlgorithmException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } + + signature = new Signature(getCmdCtx().getURLDereferencerContext(), idValueFactory, algorithmMethodFactory); + + // SigningTime + signature.setSigningTime(new Date()); + + // SigningCertificate + signature.setSignerCeritifcate(signingCertificate); + + // SignatureInfo + if (request.getSignatureInfo() != null) { + signature.setSignatureInfo(request.getSignatureInfo()); + } + + // DataObjects + for (DataObjectInfoType dataObjectInfo : request.getDataObjectInfo()) { + signature.addDataObject(dataObjectInfo); + } + + signature.buildXMLSignature(); + + } + + /** + * Gets the signing certificate from STAL. + * + * @throws SLCommandException + * if getting the singing certificate fails + */ + private void getSigningCertificate() throws SLCommandException { + + CreateXMLSignatureRequestType request = getRequestValue(); + keyboxIdentifier = request.getKeyboxIdentifier(); + + InfoboxReadRequest stalRequest = new InfoboxReadRequest(); + stalRequest.setInfoboxIdentifier(keyboxIdentifier); + + requestSTAL(Collections.singletonList((STALRequest) stalRequest)); + + STALResponse stalResponse = stalResponses.next(); + + if (stalResponse instanceof InfoboxReadResponse) { + byte[] infobox = ((InfoboxReadResponse) stalResponse).getInfoboxValue(); + + try { + CertificateFactory certFactory = CertificateFactory.getInstance("X509"); + signingCertificate = (X509Certificate) certFactory.generateCertificate(new ByteArrayInputStream(infobox)); + } catch (CertificateException e) { + log.info("Failed to decode signing certificate.", e); + // TODO: issue appropriate error + throw new SLCommandException(4000); + } + + } else { + log.info("Failed to get signing certificate."); + // TODO: issue appropriate error + throw new SLCommandException(4000); + } + + } + + /** + * Signs the signature. + * + * @throws SLCommandException + * if signing the signature fails + */ + private void signXMLSignature() throws SLCommandException { + + try { + signature.sign(getCmdCtx().getSTAL(), keyboxIdentifier); + } catch (MarshalException e) { + log.error("Failed to marshall XMLSignature.", e); + throw new SLCommandException(4000); + } catch (XMLSignatureException e) { + if (e.getCause() instanceof URIReferenceException) { + URIReferenceException uriReferenceException = (URIReferenceException) e.getCause(); + if (uriReferenceException.getCause() instanceof SLCommandException) { + throw (SLCommandException) uriReferenceException.getCause(); + } + } + log.error("Failed to sign XMLSignature.", e); + throw new SLCommandException(4000); + } + + } + + @Override + public SLResult execute() { + try { + + // get certificate in order to select appropriate algorithms for hashing and signing + getSigningCertificate(); + + // prepare the XMLSignature for signing + prepareXMLSignature(); + + // sign the XMLSignature + signXMLSignature(); + + if (log.isTraceEnabled()) { + + DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); + LSSerializer serializer = domImplLS.createLSSerializer(); + String debugString = serializer.writeToString(signature.getDocument()); + + log.trace(debugString); + + } + + return new CreateXMLSignatureResultImpl(signature.getDocument()); + + } catch (SLCommandException e) { + return new ErrorResultImpl(e); + } catch (SLRequestException e) { + return new ErrorResultImpl(e); + } + } + + @Override + public String getName() { + return "CreateXMLSignatureRequest"; + } + + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java new file mode 100644 index 00000000..d2d2e678 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java @@ -0,0 +1,138 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.transform.Result; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureResponseType; +import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; + +/** + * This calls implements the result of the security layer command CreateXMLSignature. + * + * @author mcentner + */ +public class CreateXMLSignatureResultImpl extends SLResultImpl { + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(CreateXMLSignatureResultImpl.class); + + /** + * The document containing the XMLSignature. + */ + protected Document doc; + + /** + * Creates a new instance of this CreateXMLSignatureResultImpl with the given + * signature document. + * + * @param document the signature document + * + * @throws NullPointerException if document is null + */ + public CreateXMLSignatureResultImpl(Document document) { + super(); + + if (document == null) { + throw new NullPointerException("Argument 'document' must not be null."); + } + + this.doc = document; + + marshallCreateXMLSignatureResponse(); + } + + /** + * Marshalls the CreateXMLSignatureResponse. + */ + private void marshallCreateXMLSignatureResponse() { + + ObjectFactory factory = new ObjectFactory(); + + CreateXMLSignatureResponseType createCreateXMLSignatureResponseType = factory.createCreateXMLSignatureResponseType(); + JAXBElement createCreateXMLSignatureResponse = factory.createCreateXMLSignatureResponse(createCreateXMLSignatureResponseType); + + DocumentFragment fragment = doc.createDocumentFragment(); + + JAXBContext jaxbContext = SLCommandFactory.getJaxbContext(); + try { + Marshaller marshaller = jaxbContext.createMarshaller(); + marshaller.marshal(createCreateXMLSignatureResponse, fragment); + } catch (JAXBException e) { + log.error("Failed to marshall 'CreateXMLSignatureResponse'", e); + throw new SLRuntimeException(e); + } + + Node child = fragment.getFirstChild(); + if (child instanceof Element) { + Node node = doc.replaceChild(child, doc.getDocumentElement()); + child.appendChild(node); + } + + } + + @Override + public void writeTo(Result result) { + + try { + writeTo(result, null); + } catch (TransformerException e) { + log.error(e); + } + + } + + /* (non-Javadoc) + * @see at.gv.egiz.bku.slcommands.impl.SLResultImpl#writeTo(javax.xml.transform.Result, javax.xml.transform.Transformer) + */ + @Override + public void writeTo(Result result, Transformer transformer) throws TransformerException { + + if (transformer == null) { + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + try { + transformer = transformerFactory.newTransformer(); + } catch (TransformerConfigurationException e) { + log.error("Failed to create Transformer.", e); + throw new SLRuntimeException(e); + } + } + transformer.transform(new DOMSource(doc), result); + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java new file mode 100644 index 00000000..555f83bd --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import at.buergerkarte.namespaces.securitylayer._1.ErrorResponseType; +import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; +import at.gv.egiz.bku.slcommands.ErrorResult; +import at.gv.egiz.bku.slexceptions.SLException; + +import javax.xml.transform.Result; + +/** + * This class implements the security layer result ErrorResponse. + * + * @author mcentner + */ +public class ErrorResultImpl extends SLResultImpl implements ErrorResult { + + /** + * The exception containing information provided in the ErrorResponse. + */ + protected SLException slException; + + /** + * Creates a new instance of this ErrorResultImpl with the given + * slException containing information provided in the + * ErrorResponse. + * + * @param slException the exception + */ + public ErrorResultImpl(SLException slException) { + this.slException = slException; + } + + @Override + public void writeTo(Result result) { + + ObjectFactory factory = new ObjectFactory(); + ErrorResponseType responseType = factory.createErrorResponseType(); + responseType.setErrorCode(slException.getErrorCode()); + responseType.setInfo(slException.getDetailedMsg()); + + writeTo(factory.createErrorResponse(responseType), result); + + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java new file mode 100644 index 00000000..93131cf4 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java @@ -0,0 +1,409 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import iaik.asn1.CodingException; +import iaik.asn1.DerCoder; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Result; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMResult; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Node; + +import at.buergerkarte.namespaces.personenbindung._20020506_.CompressedIdentityLinkType; +import at.buergerkarte.namespaces.securitylayer._1.AnyChildrenType; +import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadParamsBinaryFileType; +import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; +import at.gv.egiz.bku.slcommands.InfoboxReadCommand; +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandContext; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLExceptionMessages; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.idlink.CompressedIdentityLinkFactory; +import at.gv.egiz.idlink.IdentityLinkTransformer; +import at.gv.egiz.idlink.ans1.IdentityLink; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.InfoboxReadResponse; +import at.gv.egiz.stal.STALRequest; + +/** + * This class implements the security layer command + * InfoboxReadRequest. + *

+ * NOTE: Currently the only supported infobox identifier is ' + * IdentityLink'. + *

+ * + * @author mcentner + */ +public class InfoboxReadCommandImpl extends SLCommandImpl implements + InfoboxReadCommand { + + /** + * Logging facility. + */ + protected static Log log = LogFactory.getLog(InfoboxReadCommandImpl.class); + + public static final String INFOBOX_IDENTIFIER_CERTIFICATES = "Certificates"; + + public static final String BOX_SPECIFIC_PARAMETER_IDENTITY_LINK_DOMAIN_IDENTIFIER = "IdentityLinkDomainIdentifier"; + + public static final String INFOBOX_IDENTIFIER_IDENTITY_LINK = "IdentityLink"; + + /** + * The InfoboxIdentifier + */ + protected String infoboxIdentifier; + + /** + * The IdentityLinkDomainIdentifier value of an IdentyLink infobox. + */ + protected String identityLinkDomainIdentifier; + + /** + * Is content XML entity? + */ + protected boolean isXMLEntity; + + @Override + public String getName() { + return "InfoboxReadRequest"; + } + + /** + * @return the infoboxIdentifier + */ + public String getInfoboxIdentifier() { + return infoboxIdentifier; + } + + @Override + public void init(SLCommandContext ctx, Object request) throws SLCommandException { + super.init(ctx, request); + + InfoboxReadRequestType req = getRequestValue(); + + infoboxIdentifier = req.getInfoboxIdentifier(); + + InfoboxReadParamsBinaryFileType binaryFileParameters = req.getBinaryFileParameters(); + if (binaryFileParameters != null) { + isXMLEntity = binaryFileParameters.isContentIsXMLEntity(); + log.debug("Got ContentIsXMLEntity=" + isXMLEntity + "."); + } + + if (INFOBOX_IDENTIFIER_IDENTITY_LINK.equals(infoboxIdentifier)) { + + if (req.getAssocArrayParameters() != null) { + log.info("Got AssocArrayParameters but Infobox type is BinaryFile."); + throw new SLCommandException(4010); + } + + + AnyChildrenType boxSpecificParameters = req.getBoxSpecificParameters(); + + if (boxSpecificParameters != null) { + // check BoxSpecificParameters + List parameter = boxSpecificParameters.getAny(); + JAXBElement element; + if (parameter != null + && parameter.size() == 1 + && parameter.get(0) instanceof JAXBElement + && SLCommand.NAMESPACE_URI.equals((element = (JAXBElement) parameter.get(0)).getName().getNamespaceURI()) + && BOX_SPECIFIC_PARAMETER_IDENTITY_LINK_DOMAIN_IDENTIFIER.equals(element.getName().getLocalPart()) + && element.getValue() instanceof String) { + identityLinkDomainIdentifier = (String) element.getValue(); + log.debug("Got sl:IdentityLinkDomainIdentifier: " + identityLinkDomainIdentifier); + } else { + log.info("Got invalid BoxSpecificParameters."); + throw new SLCommandException(4010); + } + } + + } else { + throw new SLCommandException(4002, + SLExceptionMessages.EC4002_INFOBOX_UNKNOWN, + new Object[] { infoboxIdentifier }); + } + + } + + @Override + public SLResult execute() { + try { + return readIdentityLink(); + } catch (SLCommandException e) { + return new ErrorResultImpl(e); + } + } + + /** + * Gets the IdentitiyLink form the next STAL response. + * + * @return the IdentityLink + * + * @throws SLCommandException if getting the IdentitiyLink fails + */ + private IdentityLink getIdentityLinkFromResponses() throws SLCommandException { + + // IdentityLink + InfoboxReadResponse response; + if (hasNextResponse()) { + response = (InfoboxReadResponse) nextResponse(InfoboxReadResponse.class); + byte[] idLink = response.getInfoboxValue(); + try { + return new IdentityLink(DerCoder.decode(idLink)); + } catch (CodingException e) { + log.info("Failed to decode infobox '" + INFOBOX_IDENTIFIER_IDENTITY_LINK + "'.", e); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, + new Object[] { INFOBOX_IDENTIFIER_IDENTITY_LINK }); + } + } else { + log.info("No infobox '" + INFOBOX_IDENTIFIER_IDENTITY_LINK + "' returned from STAL."); + throw new SLCommandException(4000); + } + + } + + /** + * Gets the list of certificates from the next STAL responses. + * + * @return the list of certificates + * + * @throws SLCommandException if getting the list of certificates fails + */ + private List getCertificatesFromResponses() throws SLCommandException { + + List certificates = new ArrayList(); + + CertificateFactory certFactory; + try { + certFactory = CertificateFactory.getInstance("X509"); + } catch (CertificateException e) { + // we should always be able to get an X509 certificate factory + log.error("CertificateFactory.getInstance(\"X509\") failed.", e); + throw new SLRuntimeException(e); + } + + InfoboxReadResponse response; + while(hasNextResponse()) { + response = (InfoboxReadResponse) nextResponse(InfoboxReadResponse.class); + byte[] cert = response.getInfoboxValue(); + try { + certificates.add((X509Certificate) certFactory.generateCertificate(new ByteArrayInputStream(cert))); + } catch (CertificateException e) { + log.info("Failed to decode certificate.", e); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, + new Object[] { INFOBOX_IDENTIFIER_CERTIFICATES }); + } + } + + return certificates; + + } + + /** + * Uses STAL to read the IdentityLink. + * + * @return the corresponding security layer result + * + * @throws SLCommandException if reading the IdentityLink fails + */ + private SLResult readIdentityLink() throws SLCommandException { + + List stalRequests = new ArrayList(); + + InfoboxReadRequest infoboxReadRequest; + // get raw identity link + infoboxReadRequest = new InfoboxReadRequest(); + infoboxReadRequest.setInfoboxIdentifier(INFOBOX_IDENTIFIER_IDENTITY_LINK); + infoboxReadRequest.setDomainIdentifier(identityLinkDomainIdentifier); + stalRequests.add(infoboxReadRequest); + + // get certificates + infoboxReadRequest = new InfoboxReadRequest(); + infoboxReadRequest.setInfoboxIdentifier("SecureSignatureKeypair"); + stalRequests.add(infoboxReadRequest); + + infoboxReadRequest = new InfoboxReadRequest(); + infoboxReadRequest.setInfoboxIdentifier("CertifiedKeypair"); + stalRequests.add(infoboxReadRequest); + + requestSTAL(stalRequests); + + IdentityLink identityLink = getIdentityLinkFromResponses(); + List certificates = getCertificatesFromResponses(); + + + CompressedIdentityLinkFactory idLinkFactory = CompressedIdentityLinkFactory.getInstance(); + JAXBElement compressedIdentityLink = idLinkFactory + .createCompressedIdentityLink(identityLink, certificates, identityLinkDomainIdentifier); + + IdentityLinkTransformer identityLinkTransformer = IdentityLinkTransformer.getInstance(); + String issuerTemplate = identityLink.getIssuerTemplate(); + + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db; + try { + db = dbf.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + log.error("Failed to create XML document.", e); + throw new SLRuntimeException(e); + } + + Document document = db.newDocument(); + try { + idLinkFactory.marshallCompressedIdentityLink(compressedIdentityLink, document, null, true); + } catch (JAXBException e) { + log.info("Failed to marshall CompressedIdentityLink.", e); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, + new Object[] { INFOBOX_IDENTIFIER_IDENTITY_LINK }); + } + + InfoboxReadResultImpl result = new InfoboxReadResultImpl(); + ByteArrayOutputStream resultBytes = null; + Result xmlResult = (isXMLEntity || identityLinkDomainIdentifier != null) + ? result.getXmlResult(true) + : new StreamResult((resultBytes = new ByteArrayOutputStream())); + try { + identityLinkTransformer.transformIdLink(issuerTemplate, new DOMSource(document), xmlResult); + } catch (IOException e) { + // we should not get an IOException as we are writing into a DOMResult + throw new SLRuntimeException(e); + } catch (TransformerException e) { + log.info("Faild to transform CompressedIdentityLink.", e); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } + + // TODO: Report BUG in IssuerTemplates + // Some IssuerTemplate stylesheets do not consider the pr:Type-Element of the CompressedIdentityLink ... + if (identityLinkDomainIdentifier != null) { + if (xmlResult instanceof DOMResult) { + Node node = ((DOMResult) xmlResult).getNode(); + Node nextSibling = ((DOMResult) xmlResult).getNextSibling(); + Node idLinkNode; + if (nextSibling != null) { + idLinkNode = nextSibling.getPreviousSibling(); + } else if (node != null) { + idLinkNode = node.getFirstChild(); + } else { + log + .error("An IdentityLinkDomainIdentifier of '" + + identityLinkDomainIdentifier + + "' has been given. However, it cannot be set, as the transformation result does not contain a node."); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } + IdentityLinkTransformer.setDomainIdentifier(idLinkNode, identityLinkDomainIdentifier); + } else { + log + .error("An IdentityLinkDomainIdentifier of '" + + identityLinkDomainIdentifier + + "' has been given. However, it cannot be set, as the transformation result is not of type DOM."); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } + } + + if (!isXMLEntity) { + if (resultBytes == null) { + resultBytes = new ByteArrayOutputStream(); + + if (xmlResult instanceof DOMResult) { + Node node = ((DOMResult) xmlResult).getNode(); + Node nextSibling = ((DOMResult) xmlResult).getNextSibling(); + + DOMSource xmlSource; + if (nextSibling != null) { + xmlSource = new DOMSource(nextSibling.getPreviousSibling()); + } else if (node != null) { + xmlSource = new DOMSource(node.getFirstChild()); + } else { + log + .error("IssuerTemplate transformation returned no node."); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + try { + Transformer transformer = transformerFactory.newTransformer(); + transformer.transform(xmlSource, new StreamResult(resultBytes)); + } catch (TransformerConfigurationException e) { + log.error(e); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } catch (TransformerException e) { + log.error(e); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } + } else if (xmlResult instanceof StreamResult) { + OutputStream outputStream = ((StreamResult) xmlResult).getOutputStream(); + if (outputStream instanceof ByteArrayOutputStream) { + result.setResultBytes(((ByteArrayOutputStream) outputStream).toByteArray()); + } else { + log.error("ContentIsXMLEntity is set to 'false'. However, an XMLResult has already been set."); + throw new SLCommandException(4000, + SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, + new Object[] { issuerTemplate }); + } + } + } else { + result.setResultBytes(resultBytes.toByteArray()); + } + } + + + return result; + + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java new file mode 100644 index 00000000..6f07338f --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java @@ -0,0 +1,171 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Result; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMResult; +import javax.xml.transform.dom.DOMSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; +import org.w3c.dom.NodeList; + +import at.buergerkarte.namespaces.securitylayer._1.Base64XMLContentType; +import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadResponseType; +import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; +import at.buergerkarte.namespaces.securitylayer._1.XMLContentType; +import at.gv.egiz.bku.slcommands.InfoboxReadResult; +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; + +/** + * This class implements the result of the security layer command InfoboxReadRequest. + * + * @author mcentner + */ +public class InfoboxReadResultImpl extends SLResultImpl implements + InfoboxReadResult { + + /** + * Logging facility. + */ + protected static Log log = LogFactory.getLog(InfoboxReadResultImpl.class); + + /** + * The XML document containing the infobox content. + */ + Document xmlDocument; + + /** + * Creates the response document from the given binaryContent. + * + * @param binaryContent the infobox content + * @param preserveSpace the value of the preserveSpace parameter + * + * @return the created response document + */ + private Document createResponseDocument(byte[] binaryContent, boolean preserveSpace) { + + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + Document doc; + try { + doc = dbf.newDocumentBuilder().newDocument(); + } catch (ParserConfigurationException e) { + // it should always be possible to create a new Document + log.error("Failed to create XML document.", e); + throw new SLRuntimeException(e); + } + + ObjectFactory factory = new ObjectFactory(); + + Base64XMLContentType base64XMLContentType = factory.createBase64XMLContentType(); + if (binaryContent == null) { + XMLContentType xmlContentType = factory.createXMLContentType(); + if (preserveSpace) { + xmlContentType.setSpace("preserve"); + } + base64XMLContentType.setXMLContent(xmlContentType); + } else { + base64XMLContentType.setBase64Content(binaryContent); + } + InfoboxReadResponseType infoboxReadResponseType = factory.createInfoboxReadResponseType(); + infoboxReadResponseType.setBinaryFileData(base64XMLContentType); + + JAXBElement infoboxReadResponse = factory.createInfoboxReadResponse(infoboxReadResponseType); + + JAXBContext context = SLCommandFactory.getJaxbContext(); + try { + Marshaller marshaller = context.createMarshaller(); + marshaller.marshal(infoboxReadResponse, doc); + } catch (JAXBException e) { + log.error("Failed to marshal 'InfoboxReadResponse' document.", e); + throw new SLRuntimeException(e); + } + + return doc; + + } + + + /** + * @return an XMLResult for marshalling the infobox to + */ + Result getXmlResult(boolean preserveSpace) { + + xmlDocument = createResponseDocument(null, preserveSpace); + + NodeList nodeList = xmlDocument.getElementsByTagNameNS(SLCommand.NAMESPACE_URI, "XMLContent"); + return new DOMResult(nodeList.item(0)); + + } + + /** + * Creates a new result document for this InfoboxReadResult + * and sets the given resultBytes as content. + * + * @param resultBytes + */ + void setResultBytes(byte[] resultBytes) { + + xmlDocument = createResponseDocument(resultBytes, false); + + } + + @Override + public void writeTo(Result result) { + + try { + writeTo(result, null); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + /* (non-Javadoc) + * @see at.gv.egiz.bku.slcommands.impl.SLResultImpl#writeTo(javax.xml.transform.Result, javax.xml.transform.Transformer) + */ + @Override + public void writeTo(Result result, Transformer transformer) throws TransformerException { + + if (transformer == null) { + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + try { + transformer = transformerFactory.newTransformer(); + } catch (TransformerConfigurationException e) { + log.error("Failed to create Transformer.", e); + throw new SLRuntimeException(e); + } + } + transformer.transform(new DOMSource(xmlDocument), result); + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java new file mode 100644 index 00000000..1b6fb237 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java @@ -0,0 +1,43 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import at.buergerkarte.namespaces.securitylayer._1.NullOperationRequestType; +import at.gv.egiz.bku.slcommands.NullOperationCommand; +import at.gv.egiz.bku.slcommands.NullOperationResult; +import at.gv.egiz.bku.slcommands.SLResult; + +/** + * This class implements the security layer command NullOperation. + * + * @author mcentner + */ +public class NullOperationCommandImpl extends SLCommandImpl implements NullOperationCommand { + + protected static NullOperationResult RESULT = new NullOperationResultImpl(); + + @Override + public SLResult execute() { + return RESULT; + } + + @Override + public String getName() { + return "NullOperationRequest"; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java new file mode 100644 index 00000000..ae1f91ce --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java @@ -0,0 +1,47 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import javax.xml.bind.JAXBElement; +import javax.xml.transform.Result; + +import at.buergerkarte.namespaces.securitylayer._1.NullOperationResponseType; +import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; +import at.gv.egiz.bku.slcommands.NullOperationResult; + +/** + * This class represents the result of the security layer command + * NullOperation. + * + * @author mcentner + */ +public class NullOperationResultImpl extends SLResultImpl implements NullOperationResult { + + protected static JAXBElement RESPONSE; + + static { + ObjectFactory factory = new ObjectFactory(); + NullOperationResponseType type = factory.createNullOperationResponseType(); + RESPONSE = factory.createNullOperationResponse(type); + } + + @Override + public void writeTo(Result result) { + writeTo(RESPONSE, result); + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java new file mode 100644 index 00000000..9a3a2984 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java @@ -0,0 +1,162 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; + +import javax.xml.bind.JAXBElement; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandContext; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; + +/** + * This class serves as abstract base class for the implementation of a security + * layer command. + * + * @author mcentner + * + * @param + * the type of the corresponding request value + */ +public abstract class SLCommandImpl implements SLCommand { + + /** + * The SLCommandContext for this SLCommand. + */ + protected SLCommandContext cmdCtx; + + /** + * The request element of this command. + */ + protected JAXBElement request; + + /** + * An iterator over the STALResponses received in + * {@link SLCommandImpl#requestSTAL(List)}. + */ + protected Iterator stalResponses; + + @SuppressWarnings("unchecked") + @Override + public void init(SLCommandContext ctx, Object request) + throws SLCommandException { + + this.request = (JAXBElement) request; + + this.cmdCtx = ctx; + assert this.cmdCtx != null; + + } + + /** + * Returns the request value. + * + * It is a convenience method for request.getValue(). + * + * @see JAXBElement#getValue() + * @return the request value + */ + protected T getRequestValue() { + return request.getValue(); + } + + /** + * @return the corresponding SLCommandContext + */ + protected SLCommandContext getCmdCtx() { + return cmdCtx; + } + + /** + * Calls {@link STAL#handleRequest(List)} with the given + * stalRequests. + * + * @param stalRequests + * @throws SLCommandException + */ + protected void requestSTAL(List stalRequests) throws SLCommandException { + List responses = cmdCtx.getSTAL().handleRequest(stalRequests); + if (responses == null) { + Log log = LogFactory.getLog(this.getClass()); + log.info("Received no responses from STAL."); + throw new SLCommandException(4000); + } else if (responses.size() != stalRequests.size()) { + Log log = LogFactory.getLog(this.getClass()); + log.info("Received invalid count of responses from STAL. Expected " + + stalRequests.size() + ", but got " + responses.size() + "."); + // throw new SLCommandException(4000); + } + stalResponses = responses.iterator(); + } + + /** + * @return true if there are more {@link STALResponse}s to be + * fetched with {@link #nextResponse(Class)}, or false + * otherwise. + */ + protected boolean hasNextResponse() { + return (stalResponses != null) ? stalResponses.hasNext() : false; + } + + /** + * Returns the next response of type responseClass that has been + * received by {@link #requestSTAL(List)}. + * + * @param responseClass + * the response must be an instance of + * @return the next response of type responseClass + * + * @throws NoSuchElementException + * if there is no more response + * @throws SLCommandException + * if the next response is of type {@link ErrorResponse} or not of + * type responseClass + */ + protected STALResponse nextResponse( + Class responseClass) throws SLCommandException { + + if (stalResponses == null) { + throw new NoSuchElementException(); + } + + STALResponse response = stalResponses.next(); + + if (response instanceof ErrorResponse) { + throw new SLCommandException(((ErrorResponse) response).getErrorCode()); + } + + if (!(responseClass.isAssignableFrom(response.getClass()))) { + Log log = LogFactory.getLog(this.getClass()); + log.info("Received " + response.getClass() + " from STAL but expected " + + responseClass); + throw new SLCommandException(4000); + } + + return response; + + } +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java new file mode 100644 index 00000000..a79382b6 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java @@ -0,0 +1,117 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.transform.Result; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slcommands.SLResult; + +/** + * This class serves as an abstract base class for the implementation of a + * security layer result. + * + * @author mcentner + */ +public abstract class SLResultImpl implements SLResult { + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(SLResult.class); + + /** + * The security layer result type (default = XML). + */ + protected SLResultType resultType = SLResultType.XML; + + /** + * The security layer result MIME-type (default = text/xml). + */ + protected String resultingMimeType = "text/xml"; + + /* (non-Javadoc) + * @see at.gv.egiz.bku.slcommands.SLResult#getResultType() + */ + public SLResultType getResultType() { + return resultType; + } + + /* (non-Javadoc) + * @see at.gv.egiz.bku.slcommands.SLResult#getMimeType() + */ + public String getMimeType() { + return resultingMimeType; + } + + /** + * Writes the given response to the result. + * + * @param response the security layer response element + * @param result the result to marshal the response to + */ + @SuppressWarnings("unchecked") + public void writeTo(JAXBElement response, Result result) { + + try { + JAXBContext context = SLCommandFactory.getJaxbContext(); + Marshaller marshaller = context.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); + marshaller.marshal(response, result); + } catch (JAXBException e) { + // TODO Add throws clause to interface + log.fatal("Failed to marshall JAXBElement.", e); + throw new RuntimeException("Failed to marshall JAXBElement.", e); + } + + } + + /* (non-Javadoc) + * @see at.gv.egiz.bku.slcommands.SLResult#writeTo(javax.xml.transform.Result, javax.xml.transform.Transformer) + */ + @Override + public void writeTo(Result result, Transformer transformer) throws TransformerException { + // TODO Auto-generated method stub + // fixxme: wb added for testing purposes to be completed + // begin hack + if (transformer == null) { + writeTo(result); + return; + } + // just a quick hack to proceed with testing + ByteArrayOutputStream os = new ByteArrayOutputStream(); + writeTo(new StreamResult(os)); + ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray()); + transformer.transform(new StreamSource(is), result); + //end hack + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java new file mode 100644 index 00000000..d6cbaefa --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java @@ -0,0 +1,79 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.security.InvalidAlgorithmParameterException; +import java.security.NoSuchAlgorithmException; + +import javax.xml.crypto.AlgorithmMethod; +import javax.xml.crypto.dsig.CanonicalizationMethod; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.SignatureMethod; + +/** + * A factory for creating {@link AlgorithmMethod}s. + * + * @author mcentner + */ +public interface AlgorithmMethodFactory { + + /** + * Creates a new DigestMethod for the given signatureContext. + * + * @param signatureContext + * the signature context + * + * @return a DigestMethod for the given signatureContext + * + * @throws NoSuchAlgorithmException + * @throws InvalidAlgorithmParameterException + */ + public DigestMethod createDigestMethod(SignatureContext signatureContext) + throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; + + /** + * Creates a new SignatureMethod for the given signatureContext. + * + * @param signatureContext + * the signature context + * + * @return a SignatureMethod for the given signatureContext + * + * @throws NoSuchAlgorithmException + * @throws InvalidAlgorithmParameterException + */ + public SignatureMethod createSignatureMethod(SignatureContext signatureContext) + throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; + + /** + * Creates a new CanonicalizationMethod for the given + * signatureContext. + * + * @param signatureContext + * the signature context + * + * @return a CanonicalizationMethod for the given + * signatureContext + * + * @throws NoSuchAlgorithmException + * @throws InvalidAlgorithmParameterException + */ + public CanonicalizationMethod createCanonicalizationMethod( + SignatureContext signatureContext) throws NoSuchAlgorithmException, + InvalidAlgorithmParameterException; + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java new file mode 100644 index 00000000..6b963465 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java @@ -0,0 +1,125 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import iaik.xml.crypto.XmldsigMore; + +import java.security.InvalidAlgorithmParameterException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.X509Certificate; + +import javax.xml.crypto.dsig.CanonicalizationMethod; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.SignatureMethod; +import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; +import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec; +import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; + +/** + * An implementation of the AlgorithmMethod factory that uses the signing + * certificate to choose appropriate algorithms. + * + * @author mcentner + */ +public class AlgorithmMethodFactoryImpl implements AlgorithmMethodFactory { + + /** + * The signature algorithm URI. + */ + private String signatureAlgorithmURI; + + /** + * The algorithm parameters for the signature algorithm. + */ + private SignatureMethodParameterSpec signatureMethodParameterSpec; + + /** + * Creates a new AlgrithmMethodFactory with the given + * signingCertificate. + * + * @param siginingCertificate + * + * @throws NoSuchAlgorithmException + * if the public key algorithm of the given + * signingCertificate is not supported + */ + public AlgorithmMethodFactoryImpl(X509Certificate siginingCertificate) + throws NoSuchAlgorithmException { + + String algorithm = siginingCertificate.getPublicKey().getAlgorithm(); + + if ("DSA".equals(algorithm)) { + signatureAlgorithmURI = SignatureMethod.DSA_SHA1; + } else if ("RSA".equals(algorithm)) { + signatureAlgorithmURI = SignatureMethod.RSA_SHA1; + } else if (("EC".equals(algorithm)) || ("ECDSA".equals(algorithm))) { + signatureAlgorithmURI = XmldsigMore.SIGNATURE_ECDSA_SHA1; + } else { + throw new NoSuchAlgorithmException("Public key algorithm '" + algorithm + + "' not supported."); + } + + } + + /* + * (non-Javadoc) + * + * @seeat.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory# + * createCanonicalizationMethod + * (at.gv.egiz.bku.slcommands.impl.xsect.SignatureContext) + */ + @Override + public CanonicalizationMethod createCanonicalizationMethod( + SignatureContext signatureContext) throws NoSuchAlgorithmException, + InvalidAlgorithmParameterException { + + return signatureContext.getSignatureFactory().newCanonicalizationMethod( + CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null); + + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory#createDigestMethod + * (at.gv.egiz.bku.slcommands.impl.xsect.SignatureContext) + */ + @Override + public DigestMethod createDigestMethod(SignatureContext signatureContext) + throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { + + return signatureContext.getSignatureFactory().newDigestMethod( + DigestMethod.SHA1, (DigestMethodParameterSpec) null); + } + + /* + * (non-Javadoc) + * + * @seeat.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory# + * createSignatureMethod + * (at.gv.egiz.bku.slcommands.impl.xsect.SignatureContext) + */ + @Override + public SignatureMethod createSignatureMethod(SignatureContext signatureContext) + throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { + + return signatureContext.getSignatureFactory().newSignatureMethod( + signatureAlgorithmURI, signatureMethodParameterSpec); + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java new file mode 100644 index 00000000..a6473a05 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java @@ -0,0 +1,65 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.io.ByteArrayInputStream; + +import javax.xml.crypto.Data; +import javax.xml.crypto.OctetStreamData; +import javax.xml.crypto.URIDereferencer; +import javax.xml.crypto.URIReference; +import javax.xml.crypto.URIReferenceException; +import javax.xml.crypto.XMLCryptoContext; + +/** + * An URIDereferencer implementation that dereferences the given + * byte array. + * + * @author mcentner + */ +public class ByteArrayDereferencer implements URIDereferencer { + + /** + * The dereferenced data. + */ + protected byte[] dereferencedData; + + /** + * Creates a new instance of this ByteArrayDereferencer with + * the given dereferencedData. + * + * @param dereferencedData the octets to be returned by {@link #dereference(URIReference, XMLCryptoContext)} + * + * @throws NullPointerException if dereferencedData is null + */ + public ByteArrayDereferencer(byte[] dereferencedData) { + if (dereferencedData == null) { + throw new NullPointerException("Parameter 'dereferencedData' must not be null."); + } + this.dereferencedData = dereferencedData; + } + + /* (non-Javadoc) + * @see javax.xml.crypto.URIDereferencer#dereference(javax.xml.crypto.URIReference, javax.xml.crypto.XMLCryptoContext) + */ + @Override + public Data dereference(URIReference uriReference, XMLCryptoContext context) + throws URIReferenceException { + return new OctetStreamData(new ByteArrayInputStream(dereferencedData)); + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java new file mode 100644 index 00000000..d25f2526 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java @@ -0,0 +1,1006 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import iaik.xml.crypto.dom.DOMCryptoContext; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.SequenceInputStream; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.net.URISyntaxException; +import java.nio.charset.Charset; +import java.security.InvalidAlgorithmParameterException; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.crypto.MarshalException; +import javax.xml.crypto.dom.DOMStructure; +import javax.xml.crypto.dsig.CanonicalizationMethod; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.Reference; +import javax.xml.crypto.dsig.Transform; +import javax.xml.crypto.dsig.XMLObject; +import javax.xml.crypto.dsig.spec.TransformParameterSpec; +import javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec; +import javax.xml.crypto.dsig.spec.XPathType; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.Text; +import org.w3c.dom.bootstrap.DOMImplementationRegistry; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSException; +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSOutput; +import org.w3c.dom.ls.LSParser; +import org.w3c.dom.ls.LSSerializer; + +import at.buergerkarte.namespaces.securitylayer._1.Base64XMLLocRefOptRefContentType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; +import at.buergerkarte.namespaces.securitylayer._1.MetaInfoType; +import at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType; +import at.gv.egiz.bku.binding.HttpUtil; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.dom.DOMUtils; +import at.gv.egiz.slbinding.impl.XMLContentType; + +/** + * This class represents a DataObject of an XML-Signature + * created by the security layer command CreateXMLSignature. + * + * @author mcentner + */ +public class DataObject { + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(DataObject.class); + + /** + * DOM Implementation. + */ + private static final String DOM_LS_3_0 = "LS 3.0"; + + /** + * The array of the default preferred MIME type order. + */ + private static final String[] DEFAULT_PREFFERED_MIME_TYPES = + new String[] { + "application/xhtml+xml", + "text/plain" + }; + + /** + * The DOM implementation used. + */ + private DOMImplementationLS domImplLS; + + /** + * The signature context. + */ + private SignatureContext ctx; + + /** + * The Reference for this DataObject. + */ + private XSECTReference reference; + + /** + * The XMLObject for this DataObject. + */ + private XMLObject xmlObject; + + /** + * The MIME-Type of the digest input. + */ + private String mimeType; + + /** + * An optional description of the digest input. + */ + private String description; + + /** + * Creates a new instance. + * + * @param document the document of the target signature + */ + public DataObject(SignatureContext signatureContext) { + this.ctx = signatureContext; + + DOMImplementationRegistry registry; + try { + registry = DOMImplementationRegistry.newInstance(); + } catch (Exception e) { + log.error("Failed to get DOMImplementationRegistry.", e); + throw new SLRuntimeException("Failed to get DOMImplementationRegistry."); + } + + domImplLS = (DOMImplementationLS) registry.getDOMImplementation(DOM_LS_3_0); + if (domImplLS == null) { + log.error("Failed to get DOMImplementation " + DOM_LS_3_0); + throw new SLRuntimeException("Failed to get DOMImplementation " + DOM_LS_3_0); + } + + } + + /** + * @return the reference + */ + public Reference getReference() { + return reference; + } + + /** + * @return the xmlObject + */ + public XMLObject getXmlObject() { + return xmlObject; + } + + /** + * @return the mimeType + */ + public String getMimeType() { + return mimeType; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Configures this DataObject with the information provided within the given + * sl:DataObjectInfo. + * + * @param dataObjectInfo + * the sl:DataObjectInfo + * + * @throws SLCommandException + * if configuring this DataObject with the information provided in + * the sl:DataObjectInfo fails. + * @throws SLRequestException + * if the information provided in the sl:DataObjectInfo + * does not conform to the security layer specification. + * @throws NullPointerException + * if dataObjectInfo is null + */ + public void setDataObjectInfo(DataObjectInfoType dataObjectInfo) throws SLCommandException, SLRequestException { + + Base64XMLLocRefOptRefContentType dataObject = dataObjectInfo.getDataObject(); + String structure = dataObjectInfo.getStructure(); + + // select and unmarshal an appropriate transformation path if provided + // and set the final data meta information + XSECTTransforms transforms = createTransformsAndSetFinalDataMetaInfo(dataObjectInfo.getTransformsInfo()); + + if ("enveloping".equals(structure)) { + + // configure this DataObject as an enveloped DataObject + setEnvelopedDataObject(dataObject, transforms); + + } else if ("detached".equals(structure)) { + + // configure this DataObject as an detached DataObject + setDetachedDataObject(dataObject, transforms); + + } + // other values are not allowed by the schema and are therefore ignored + + } + + /** + * Configures this DataObject as an enveloped DataObject with the information + * provided within the given sl:DataObject. + * + * @param dataObject + * the sl:DataObject + * @param transforms + * an optional Transforms element (may be + * null) + * + * @throws SLCommandException + * if configuring this DataObject with the information provided in + * the sl:DataObject fails. + * @throws SLRequestException + * if the information provided in the sl:DataObject + * does not conform to the security layer specification. + * @throws NullPointerException + * if dataObject is null + */ + private void setEnvelopedDataObject( + Base64XMLLocRefOptRefContentType dataObject, XSECTTransforms transforms) + throws SLCommandException, SLRequestException { + + String reference = dataObject.getReference(); + if (reference == null) { + // + // case A + // + // The Reference attribute is not used; the content of sl:DataObject represents the data object. + // If the data object is XML-coded (the sl:XMLContent element is used in sl:DataObject), then it + // must be incorporated in the signature structure as parsed XML. + // + + if (dataObject.getBase64Content() != null) { + + log.debug("Adding DataObject (Base64Content) without a reference URI."); + + // create XMLObject + XMLObject xmlObject = createXMLObject(new ByteArrayInputStream(dataObject.getBase64Content())); + + setXMLObjectAndReferenceBase64(xmlObject, transforms); + + } else if (dataObject.getXMLContent() != null) { + + log.debug("Adding DataObject (XMLContent) without a reference URI."); + + // create XMLObject + DocumentFragment content = parseDataObject((XMLContentType) dataObject.getXMLContent()); + XMLObject xmlObject = createXMLObject(content); + + setXMLObjectAndReferenceXML(xmlObject, transforms); + + } else if (dataObject.getLocRefContent() != null) { + + log.debug("Adding DataObject (LocRefContent) without a reference URI."); + + setEnvelopedDataObject(dataObject.getLocRefContent(), transforms); + + } else { + + // not allowed + log.info("XML structure of the command request contains an " + + "invalid combination of optional elements or attributes. " + + "DataObject of structure='enveloped' without a reference must contain content."); + throw new SLRequestException(3003); + + } + + } else { + + if (dataObject.getBase64Content() == null && + dataObject.getXMLContent() == null && + dataObject.getLocRefContent() == null) { + + // + // case B + // + // The Reference attribute contains a URI that must be resolved by the + // Citizen Card Environment to obtain the data object. + // The content of sl:DataObject remains empty + // + + log.debug("Adding DataObject from reference URI '" + reference + "'."); + + setEnvelopedDataObject(reference, transforms); + + } else { + + // not allowed + log.info("XML structure of the command request contains an " + + "invalid combination of optional elements or attributes. " + + "DataObject of structure='enveloped' with reference must not contain content."); + throw new SLRequestException(3003); + + } + + + } + + } + + /** + * Configures this DataObject as an enveloped DataObject with the content to + * be dereferenced from the given reference. + * + * @param reference + * the reference URI + * @param transforms + * an optional Transforms element (may be + * null) + * + * @throws SLCommandException + * if dereferencing the given reference fails, or if + * configuring this DataObject with the data dereferenced from the + * given reference fails. + * @throws NullPointerException + * if reference is null + */ + private void setEnvelopedDataObject(String reference, XSECTTransforms transforms) throws SLCommandException { + + if (reference == null) { + throw new NullPointerException("Argument 'reference' must not be null."); + } + + // dereference URL + URLDereferencer dereferencer = URLDereferencer.getInstance(); + + StreamData streamData; + try { + streamData = dereferencer.dereference(reference, ctx.getDereferencerContext()); + } catch (IOException e) { + log.info("Failed to dereference XMLObject from '" + reference + "'.", e); + throw new SLCommandException(4110); + } + + Node childNode; + + String contentType = streamData.getContentType(); + if (contentType.startsWith("text/xml")) { + + // If content type is text/xml parse content. + String charset = HttpUtil.getCharset(contentType, true); + + Document doc = parseDataObject(streamData.getStream(), charset); + + childNode = doc.getDocumentElement(); + + if (childNode == null) { + log.info("Failed to parse XMLObject from '" + reference + "'."); + throw new SLCommandException(4111); + } + + XMLObject xmlObject = createXMLObject(childNode); + + setXMLObjectAndReferenceXML(xmlObject, transforms); + + } else { + + // Include content Base64 encoded. + XMLObject xmlObject = createXMLObject(streamData.getStream()); + + setXMLObjectAndReferenceBase64(xmlObject, transforms); + + } + + } + + /** + * Configures this DataObject as an detached DataObject with the information + * provided in the given sl:DataObject and optionally + * transforms. + * + * @param dataObject + * the sl:DataObject + * @param transforms + * an optional Transforms object, may be null + * + * @throws SLCommandException + * if configuring this DataObject with the information provided in + * the sl:DataObject fails. + * @throws SLRequestException + * if the information provided in the sl:DataObject + * does not conform to the security layer specification. + * @throws NullPointerException + * if dataObject is null + */ + private void setDetachedDataObject( + Base64XMLLocRefOptRefContentType dataObject, XSECTTransforms transforms) + throws SLCommandException, SLRequestException { + + String referenceURI = dataObject.getReference(); + + if (referenceURI == null) { + + // not allowed + log.info("XML structure of the command request contains an " + + "invalid combination of optional elements or attributes. " + + "DataObject of structure='detached' must contain a reference."); + throw new SLRequestException(3003); + + } else { + + DigestMethod dm; + try { + dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); + } catch (NoSuchAlgorithmException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } catch (InvalidAlgorithmParameterException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } + + String idValue = ctx.getIdValueFactory().createIdValue("Reference"); + + reference = new XSECTReference(referenceURI, dm, transforms, null, idValue); + + // case D: + // + // The Reference attribute contains a URI that is used by the Citizen Card + // Environment to code the reference to the data object as part of the XML + // signature (attribute URI in the dsig:Reference) element. The content of + // sl:DataObject represents the data object. + + if (dataObject.getLocRefContent() != null) { + String locRef = dataObject.getLocRefContent(); + try { + this.reference.setDereferencer(new LocRefDereferencer(ctx.getDereferencerContext(), locRef)); + } catch (URISyntaxException e) { + log.info("Invalid URI '" + locRef + "' in DataObject.", e); + throw new SLCommandException(4003); + } catch (IllegalArgumentException e) { + log.info("LocRef URI of '" + locRef + "' not supported in DataObject. ", e); + throw new SLCommandException(4003); + } + } else if (dataObject.getBase64Content() != null) { + byte[] base64Content = dataObject.getBase64Content(); + this.reference.setDereferencer(new ByteArrayDereferencer(base64Content)); + } else if (dataObject.getXMLContent() != null) { + XMLContentType xmlContent = (XMLContentType) dataObject.getXMLContent(); + byte[] bytes = xmlContent.getRedirectedStream().toByteArray(); + this.reference.setDereferencer(new ByteArrayDereferencer(bytes)); + } else { + + // case C: + // + // The Reference attribute contains a URI that must be resolved by the + // Citizen Card Environment to obtain the data object. The Reference + // attribute contains a URI that is used by the Citizen Card Environment + // to code the reference to the data object as part of the XML signature + // (attribute URI in the dsig:Reference) element. The content of + // sl:DataObject remains empty. + + } + + } + } + + /** + * Returns the preferred sl:TransformInfo from the given list of + * transformInfos, or null if none of the given + * transformInfos is preferred over the others. + * + * @param transformsInfos + * a list of sl:TransformInfos + * + * @return the selected sl:TransformInfo or null, if + * none is preferred over the others + */ + private TransformsInfoType selectPreferredTransformsInfo(List transformsInfos) { + + Map mimeTypes = new HashMap(); + + StringBuilder debugString = null; + if (log.isDebugEnabled()) { + debugString = new StringBuilder(); + debugString.append("Got " + transformsInfos.size() + " TransformsInfo(s):"); + } + + for (TransformsInfoType transformsInfoType : transformsInfos) { + MetaInfoType finalDataMetaInfo = transformsInfoType.getFinalDataMetaInfo(); + String mimeType = finalDataMetaInfo.getMimeType(); + String description = finalDataMetaInfo.getDescription(); + mimeTypes.put(mimeType, transformsInfoType); + if (debugString != null) { + debugString.append("\n FinalDataMetaInfo: MIME-Type="); + debugString.append(mimeType); + if (description != null) { + debugString.append(" "); + debugString.append(description); + } + } + } + + if (debugString != null) { + log.debug(debugString); + } + + // look for preferred transform + for (String mimeType : DEFAULT_PREFFERED_MIME_TYPES) { + if (mimeTypes.containsKey(mimeType)) { + return mimeTypes.get(mimeType); + } + } + + // no preferred transform + return null; + + } + + /** + * Create an instance of ds:Transforms from the given + * sl:TransformsInfo. + * + * @param transformsInfo + * the sl:TransformsInfo + * + * @return a corresponding unmarshalled ds:Transforms, or + * null if the given sl:TransformsInfo does + * not contain a dsig:Transforms element + * + * @throws SLRequestException + * if the ds:Transforms in the given + * transformsInfo are not valid or cannot be parsed. + * + * @throws MarshalException + * if the ds:Transforms in the given + * transformsInfo cannot be unmarshalled. + */ + private XSECTTransforms createTransforms(TransformsInfoType transformsInfo) throws SLRequestException, MarshalException { + + ByteArrayOutputStream redirectedStream = ((at.gv.egiz.slbinding.impl.TransformsInfoType) transformsInfo).getRedirectedStream(); + byte[] transformBytes = (redirectedStream != null) ? redirectedStream.toByteArray() : null; + + if (transformBytes != null && transformBytes.length > 0) { + + // debug + if (log.isTraceEnabled()) { + StringBuilder sb = new StringBuilder(); + sb.append("Trying to parse transforms:\n"); + sb.append(new String(transformBytes, Charset.forName("UTF-8"))); + log.trace(sb); + } + + DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); + LSInput input = domImplLS.createLSInput(); + input.setByteStream(new ByteArrayInputStream(transformBytes)); + + LSParser parser = domImplLS.createLSParser( + DOMImplementationLS.MODE_SYNCHRONOUS, null); + DOMConfiguration domConfig = parser.getDomConfig(); + SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); + domConfig.setParameter("error-handler", errorHandler); + domConfig.setParameter("validate", Boolean.FALSE); + + Document document; + try { + document = parser.parse(input); + } catch (DOMException e) { + log.info("Failed to parse dsig:Transforms.", e); + throw new SLRequestException(3002); + } catch (LSException e) { + log.info("Failed to parse dsig:Transforms.", e); + throw new SLRequestException(3002); + } + + // adopt ds:Transforms + Element documentElement = document.getDocumentElement(); + Node adoptedTransforms = ctx.getDocument().adoptNode(documentElement); + + DOMCryptoContext context = new DOMCryptoContext(); + + // unmarshall ds:Transforms + return new XSECTTransforms(context, adoptedTransforms); + + } else { + return null; + } + + } + + /** + * Sets the mimeType and the description value + * for this DataObject. + * + * @param metaInfoType the sl:FinalMetaDataInfo + * + * @throws NullPointerException if metaInfoType is null + */ + private void setFinalDataMetaInfo(MetaInfoType metaInfoType) { + + this.mimeType = metaInfoType.getMimeType(); + this.description = metaInfoType.getDescription(); + + } + + /** + * Selects an appropriate transformation path (if present) from the given list + * of sl:TransformInfos, sets the corresponding final data meta info and + * returns the corresponding unmarshalled ds:Transforms. + * + * @param transformsInfos the sl:TransformInfos + * + * @return the unmarshalled ds:Transforms, or null if + * no transformation path has been selected. + * + * @throws SLRequestException if the given list ds:TransformsInfo contains + * an invalid ds:Transforms element, or no suitable transformation path + * can be found. + */ + private XSECTTransforms createTransformsAndSetFinalDataMetaInfo( + List transformsInfos) throws SLRequestException { + + TransformsInfoType preferredTransformsInfo = selectPreferredTransformsInfo(transformsInfos); + // try preferred transform + if (preferredTransformsInfo != null) { + + try { + XSECTTransforms transforms = createTransforms(preferredTransformsInfo); + setFinalDataMetaInfo(preferredTransformsInfo.getFinalDataMetaInfo()); + return transforms; + } catch (MarshalException e) { + + String mimeType = preferredTransformsInfo.getFinalDataMetaInfo().getMimeType(); + log.info("Failed to unmarshal preferred transformation path (MIME-Type=" + + mimeType + ").", e); + + } + + } + + // look for another suitable transformation path + for (TransformsInfoType transformsInfoType : transformsInfos) { + + try { + XSECTTransforms transforms = createTransforms(transformsInfoType); + setFinalDataMetaInfo(transformsInfoType.getFinalDataMetaInfo()); + return transforms; + } catch (MarshalException e) { + + String mimeType = transformsInfoType.getFinalDataMetaInfo().getMimeType(); + log.info("Failed to unmarshal transformation path (MIME-Type=" + + mimeType + ").", e); + } + + } + + // no suitable transformation path found + throw new SLRequestException(3003); + + } + + /** + * Create an XMLObject with the Base64 encoding of the given + * content. + * + * @param content + * the to-be Base64 encoded content + * @return an XMLObject with the Base64 encoded content + */ + private XMLObject createXMLObject(InputStream content) { + + Text textNode; + try { + textNode = at.gv.egiz.dom.DOMUtils.createBase64Text(content, ctx.getDocument()); + } catch (IOException e) { + log.error(e); + throw new SLRuntimeException(e); + } + + DOMStructure structure = new DOMStructure(textNode); + + String idValue = ctx.getIdValueFactory().createIdValue("Object"); + + return ctx.getSignatureFactory().newXMLObject(Collections.singletonList(structure), idValue, null, null); + + } + + /** + * Create an XMLObject with the given content node. + * + * @param content the content node + * + * @return an XMLObject with the given content + */ + private XMLObject createXMLObject(Node content) { + + String idValue = ctx.getIdValueFactory().createIdValue("Object"); + + List structures = Collections.singletonList(new DOMStructure(content)); + + return ctx.getSignatureFactory().newXMLObject(structures, idValue, null, null); + + } + + /** + * Sets the given xmlObject and creates and sets a corresponding + * Reference. + *

+ * A transform to Base64-decode the xmlObject's content is inserted at the top + * of to the optional transforms if given, or to a newly created + * Transforms element if transforms is + * null. + * + * @param xmlObject + * the XMLObject + * @param transforms + * an optional Transforms element (may be + * null) + * + * @throws SLCommandException + * if creating the Reference fails + * @throws NullPointerException + * if xmlObject is null + */ + private void setXMLObjectAndReferenceBase64(XMLObject xmlObject, XSECTTransforms transforms) throws SLCommandException { + + // create reference URI + // + // NOTE: the ds:Object can be referenced directly, as the Base64 transform + // operates on the text() of the input nodelist. + // + String referenceURI = "#" + xmlObject.getId(); + + // create Base64 Transform + Transform transform; + try { + transform = ctx.getSignatureFactory().newTransform(Transform.BASE64, (TransformParameterSpec) null); + } catch (NoSuchAlgorithmException e) { + // algorithm must be present + throw new SLRuntimeException(e); + } catch (InvalidAlgorithmParameterException e) { + // algorithm does not take parameters + throw new SLRuntimeException(e); + } + + if (transforms == null) { + transforms = new XSECTTransforms(Collections.singletonList(transform)); + } else { + transforms.insertTransform(transform); + } + + DigestMethod dm; + try { + dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); + } catch (NoSuchAlgorithmException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } catch (InvalidAlgorithmParameterException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } + String id = ctx.getIdValueFactory().createIdValue("Reference"); + + this.xmlObject = xmlObject; + this.reference = new XSECTReference(referenceURI, dm, transforms, null, id); + + } + + /** + * Sets the given xmlObject and creates and sets a corresponding + * Reference. + *

+ * A transform to select the xmlObject's content is inserted at the top of to + * the optional transforms if given, or to a newly created + * Transforms element if transforms is + * null. + *

+ * + * @param xmlObject + * the XMLObject + * @param transforms + * an optional Transforms element (may be + * null) + * + * @throws SLCommandException + * if creating the Reference fails + * @throws NullPointerException + * if xmlObject is null + */ + private void setXMLObjectAndReferenceXML(XMLObject xmlObject, XSECTTransforms transforms) throws SLCommandException { + + // create reference URI + String referenceURI = "#" + xmlObject.getId(); + + // create Transform to select ds:Object's children + Transform xpathTransform; + Transform c14nTransform; + try { + + XPathType xpath = new XPathType("id(\"" + xmlObject.getId() + "\")/node()", XPathType.Filter.INTERSECT); + List xpaths = Collections.singletonList(xpath); + XPathFilter2ParameterSpec params = new XPathFilter2ParameterSpec(xpaths); + + xpathTransform = ctx.getSignatureFactory().newTransform(Transform.XPATH2, params); + + // add exclusive canonicalization to avoid signing the namespace context of the ds:Object + c14nTransform = ctx.getSignatureFactory().newTransform(CanonicalizationMethod.EXCLUSIVE, (TransformParameterSpec) null); + + } catch (NoSuchAlgorithmException e) { + // algorithm must be present + throw new SLRuntimeException(e); + } catch (InvalidAlgorithmParameterException e) { + // params must be appropriate + throw new SLRuntimeException(e); + } + + if (transforms == null) { + List newTransfroms = new ArrayList(); + newTransfroms.add(xpathTransform); + newTransfroms.add(c14nTransform); + transforms = new XSECTTransforms(newTransfroms); + } else { + transforms.insertTransform(xpathTransform); + } + + DigestMethod dm; + try { + dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); + } catch (NoSuchAlgorithmException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } catch (InvalidAlgorithmParameterException e) { + log.error("Failed to get DigestMethod.", e); + throw new SLCommandException(4006); + } + String id = ctx.getIdValueFactory().createIdValue("Reference"); + + this.xmlObject = xmlObject; + this.reference = new XSECTReference(referenceURI, dm, transforms, null, id); + + } + + /** + * Parses the given xmlContent and returns a corresponding + * document fragment. + * + *

+ * The to-be parsed content is surrounded by ... elements to + * allow for mixed (e.g. Text and Element) content in XMLContent. + *

+ * + * @param xmlContent + * the XMLContent to-be parsed + * + * @return a document fragment containing the parsed nodes + * + * @throws SLCommandException + * if parsing the given xmlContent fails + * + * @throws NullPointerException + * if xmlContent is null + */ + private DocumentFragment parseDataObject(XMLContentType xmlContent) throws SLCommandException { + + ByteArrayOutputStream redirectedStream = xmlContent.getRedirectedStream(); + + // Note: We can assume a fixed character encoding of UTF-8 for the + // content of the redirect stream as the content has already been parsed + // and serialized again to the redirect stream. + + List inputStreams = new ArrayList(); + try { + // dummy start element + inputStreams.add(new ByteArrayInputStream("".getBytes("UTF-8"))); + + // content + inputStreams.add(new ByteArrayInputStream(redirectedStream.toByteArray())); + + // dummy end element + inputStreams.add(new ByteArrayInputStream("".getBytes("UTF-8"))); + } catch (UnsupportedEncodingException e) { + throw new SLRuntimeException(e); + } + + SequenceInputStream inputStream = new SequenceInputStream(Collections.enumeration(inputStreams)); + + // parse DataObject + Document doc = parseDataObject(inputStream, "UTF-8"); + + Element documentElement = doc.getDocumentElement(); + + if (documentElement == null || + !"dummy".equals(documentElement.getLocalName())) { + log.info("Failed to parse DataObject XMLContent."); + throw new SLCommandException(4111); + } + + DocumentFragment fragment = doc.createDocumentFragment(); + while (documentElement.getFirstChild() != null) { + fragment.appendChild(documentElement.getFirstChild()); + } + + // log parsed document + if (log.isTraceEnabled()) { + + StringWriter writer = new StringWriter(); + + writer.write("DataObject:\n"); + + LSOutput output = domImplLS.createLSOutput(); + output.setCharacterStream(writer); + output.setEncoding("UTF-8"); + LSSerializer serializer = domImplLS.createLSSerializer(); + serializer.getDomConfig().setParameter("xml-declaration", Boolean.FALSE); + serializer.write(fragment, output); + + log.trace(writer.toString()); + } + + return fragment; + + } + + /** + * Parses the given inputStream using the given + * encoding and returns the parsed document. + * + * @param inputStream + * the to-be parsed input + * + * @param encoding + * the encoding to be used for parsing the given + * inputStream + * + * @return the parsed document + * + * @throws SLCommandException + * if parsing the inputStream fails. + * + * @throws NullPointerException + * if inputStram is null + */ + private Document parseDataObject(InputStream inputStream, String encoding) throws SLCommandException { + + LSInput input = domImplLS.createLSInput(); + input.setByteStream(inputStream); + + if (encoding != null) { + input.setEncoding(encoding); + } + + LSParser parser = domImplLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); + DOMConfiguration domConfig = parser.getDomConfig(); + SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); + domConfig.setParameter("error-handler", errorHandler); + domConfig.setParameter("validate", Boolean.FALSE); + + Document doc; + try { + doc = parser.parse(input); + } catch (DOMException e) { + log.info("Existing XML document cannot be parsed.", e); + throw new SLCommandException(4111); + } catch (LSException e) { + log.info("Existing XML document cannot be parsed. ", e); + throw new SLCommandException(4111); + } + + if (errorHandler.hasErrors()) { + // log errors + if (log.isInfoEnabled()) { + List errorMessages = errorHandler.getErrorMessages(); + StringBuffer sb = new StringBuffer(); + for (String errorMessage : errorMessages) { + sb.append(" "); + sb.append(errorMessage); + } + log.info("Existing XML document cannot be parsed. " + sb.toString()); + } + throw new SLCommandException(4111); + } + + return doc; + + } + + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java new file mode 100644 index 00000000..df42bd11 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java @@ -0,0 +1,37 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +/** + * A factory for creating xsd:Id-attribute values. + * + * @author mcentner + */ +public interface IdValueFactory { + + /** + * Creates a new xsd:Id-attribute value for an Element of the + * given elementName. + * + * @param elementName + * the local name of the element to create the value for + * + * @return a xsd:Id-attribute value + */ + public String createIdValue(String elementName); + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java new file mode 100644 index 00000000..b9824655 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java @@ -0,0 +1,127 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +/** + * An implementation of the IdValueFactory. + *

+ * This IdValueFactory creates xsd:Id-attribute values of the form + * '<elementName>-<random>-<sequenceNumber>', + * where + *

    + *
  • <elementName> is the name provided at + * {@link #createIdValue(String)},
  • + *
  • <random> is a random generated fixed value for an + * instance of this IdValueFactory and
  • + *
  • <sequenceNumber> is the sequence number of the value + * generated for a given elementName by an instance of this + * IdValueFactory.
  • + *
+ *

+ * + * @author mcentner + */ +public class IdValueFactoryImpl implements IdValueFactory { + + /** + * A generator for xsd:Id-attribute values. + * + * @author mcentner + */ + private class IdGenerator { + + /** + * The salt. + */ + private String salt; + + /** + * The element name. + */ + private String elementName; + + /** + * The sequence number. + */ + private int i = 0; + + /** + * Creates a new instance of this IdGenerator with the given + * elementName and salt value. + * + * @param elementName the element name + * @param salt the salt valeu + */ + private IdGenerator(String elementName, String salt) { + super(); + this.elementName = elementName; + this.salt = salt; + } + + /** + * @return returns the next xsd:Id-attribute value. + */ + public String getNextId() { + return elementName + "-" + salt + "-" + Integer.toString(++i); + } + + } + + /** + * A map of element names to xsd:Id-value generators. + */ + private Map generators = new HashMap(); + + /** + * The seed value. + */ + private String seed; + + /** + * Creates a new instance of this IdValueFactory. + */ + public IdValueFactoryImpl() { + + Random random = new Random(); + int rand = random.nextInt(); + seed = Integer.toHexString(rand); + + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.slcommands.impl.IdValueFactory#createIdValue(java.lang.String + * ) + */ + public String createIdValue(String elementName) { + + IdGenerator generator = generators.get(elementName); + if (generator == null) { + generator = new IdGenerator(elementName, seed); + generators.put(elementName, generator); + } + return generator.getNextId(); + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java new file mode 100644 index 00000000..a6399c9b --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import javax.xml.crypto.Data; +import javax.xml.crypto.OctetStreamData; +import javax.xml.crypto.URIDereferencer; +import javax.xml.crypto.URIReference; +import javax.xml.crypto.URIReferenceException; +import javax.xml.crypto.XMLCryptoContext; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; + +/** + * An URIDereferencer implementation that dereferences LocRef + * references. + * + * @author mcentner + */ +public class LocRefDereferencer implements URIDereferencer { + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(LocRefDereferencer.class); + + /** + * The LocRef-reference to be dereferenced by + * {@link #dereference(URIReference, XMLCryptoContext)}. + */ + protected String locRef; + + /** + * The context to be used for dereferencing. + */ + protected URLDereferencerContext dereferencerContext; + + /** + * Creates a new instance of this LocRefDereferencer with the given + * dereferencerContext and locRef reference. + * + * @param dereferencerContext + * the context to be used for dereferencing + * @param locRef + * the LocRef-reference (must be an absolute URI) + * + * @throws URISyntaxException + * if LocRef is not an absolute URI + */ + public LocRefDereferencer(URLDereferencerContext dereferencerContext, + String locRef) throws URISyntaxException { + + this.dereferencerContext = dereferencerContext; + + URI locRefUri = new URI(locRef); + if (locRefUri.isAbsolute()) { + this.locRef = locRef; + } else { + throw new IllegalArgumentException( + "Parameter 'locRef' must be an absolut URI."); + } + } + + /* + * (non-Javadoc) + * + * @see + * javax.xml.crypto.URIDereferencer#dereference(javax.xml.crypto.URIReference, + * javax.xml.crypto.XMLCryptoContext) + */ + @Override + public Data dereference(URIReference uriReference, XMLCryptoContext context) + throws URIReferenceException { + + URLDereferencer dereferencer = URLDereferencer.getInstance(); + StreamData streamData; + try { + streamData = dereferencer.dereference(locRef, dereferencerContext); + } catch (IOException e) { + log.info("Failed to dereference URI'" + locRef + "'. " + e.getMessage(), + e); + throw new URIReferenceException("Failed to dereference URI '" + locRef + + "'. " + e.getMessage(), e); + } + + return new OctetStreamData(streamData.getStream(), locRef, streamData + .getContentType()); + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java new file mode 100644 index 00000000..64c758c9 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java @@ -0,0 +1,122 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.security.PrivateKey; + +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.HashDataInputCallback; + +/** + * This class implements a private key used by the {@link STALSignature} class. + * + * @author mcentner + */ +public class STALPrivateKey implements PrivateKey { + + private static final long serialVersionUID = 1L; + + /** + * The STAL implementation. + */ + private STAL stal; + + /** + * The callback interface for obtaining the hash input data. + */ + private HashDataInputCallback hashDataInputCallback; + + /** + * The keybox identifier. + */ + private String keyboxIdentifier; + + /** + * The signature algorithm. + */ + private String algorithm; + + /** + * Creates a new instance of this STALPrivateKey with the given + * stal implementation, signature algorithm, + * keyboxIdentifier and hashDataInputCallback + * interface. + * + * @param stal + * the STAL implementation + * @param algorithm + * the signature algorithm + * @param keyboxIdentifier + * the keybox identifier + * @param hashDataInputCallback + * the interface for obtaining the has input data + */ + public STALPrivateKey(STAL stal, + String algorithm, String keyboxIdentifier, HashDataInputCallback hashDataInputCallback) { + super(); + this.keyboxIdentifier = keyboxIdentifier; + this.hashDataInputCallback = hashDataInputCallback; + this.stal = stal; + this.algorithm = algorithm; + } + + /* (non-Javadoc) + * @see java.security.Key#getAlgorithm() + */ + @Override + public String getAlgorithm() { + return algorithm; + } + + /* (non-Javadoc) + * @see java.security.Key#getEncoded() + */ + @Override + public byte[] getEncoded() { + throw new UnsupportedOperationException("STALPrivateKey does not support the getEncoded() method."); + } + + /* (non-Javadoc) + * @see java.security.Key#getFormat() + */ + @Override + public String getFormat() { + return null; + } + + /** + * @return the STAL implementation + */ + public STAL getStal() { + return stal; + } + + /** + * @return the interface for obtaining the hash data input + */ + public HashDataInputCallback getHashDataInputCallback() { + return hashDataInputCallback; + } + + /** + * @return the keybox identifier + */ + public String getKeyboxIdentifier() { + return keyboxIdentifier; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java new file mode 100644 index 00000000..0ab30530 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java @@ -0,0 +1,64 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import iaik.xml.crypto.XmldsigMore; + +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.Provider; +import java.security.Signature; +import java.util.HashMap; +import java.util.Map; + +import javax.xml.crypto.dsig.SignatureMethod; + +/** + * A security provider implementation that provides {@link Signature} implementations + * based on STAL. + * + * @author mcentner + */ +public class STALProvider extends Provider { + + private static final long serialVersionUID = 1L; + + private static String IMPL_PACKAGE_NAME = "at.gv.egiz.bku.slcommands.impl.xsect"; + + public STALProvider() { + + super("STAL", 1.0, "Security Token Abstraction Layer Provider"); + + final Map map = new HashMap(); + + // TODO: register further algorithms + map.put("Signature." + SignatureMethod.RSA_SHA1, + IMPL_PACKAGE_NAME + ".STALSignature"); + map.put("Signature." + XmldsigMore.SIGNATURE_ECDSA_SHA1, + IMPL_PACKAGE_NAME + ".STALSignature"); + + AccessController.doPrivileged(new PrivilegedAction() { + @Override + public Void run() { + putAll(map); + return null; + } + }); + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java new file mode 100644 index 00000000..f0fcb891 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java @@ -0,0 +1,165 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.io.ByteArrayOutputStream; +import java.security.InvalidKeyException; +import java.security.InvalidParameterException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SignatureException; +import java.security.SignatureSpi; +import java.util.Collections; +import java.util.List; + +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.SignRequest; +import at.gv.egiz.stal.SignResponse; +import at.gv.egiz.stal.HashDataInputCallback; + +/** + * A signature service provider implementation that uses STAL to sign. + * + * @author mcentner + */ +public class STALSignature extends SignatureSpi { + + /** + * The private key. + */ + protected STALPrivateKey privateKey; + + /** + * The to-be signed data. + */ + protected ByteArrayOutputStream data = new ByteArrayOutputStream(); + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineGetParameter(java.lang.String) + */ + @Override + protected Object engineGetParameter(String param) + throws InvalidParameterException { + throw new InvalidParameterException(); + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineInitSign(java.security.PrivateKey) + */ + @Override + protected void engineInitSign(PrivateKey privateKey) + throws InvalidKeyException { + + if (!(privateKey instanceof STALPrivateKey)) { + throw new InvalidKeyException("STALSignature supports STALKeys only."); + } + + this.privateKey = (STALPrivateKey) privateKey; + + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineInitVerify(java.security.PublicKey) + */ + @Override + protected void engineInitVerify(PublicKey publicKey) + throws InvalidKeyException { + + throw new UnsupportedOperationException("STALSignature does not support signature verification."); + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineSetParameter(java.lang.String, java.lang.Object) + */ + @Override + protected void engineSetParameter(String param, Object value) + throws InvalidParameterException { + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineSign() + */ + @Override + protected byte[] engineSign() throws SignatureException { + + STAL stal = privateKey.getStal(); + + if (stal == null) { + throw new SignatureException("STALSignature requires the STALPrivateKey " + + "to provide a STAL implementation reference."); + } + + HashDataInputCallback signRefDataSupplier = privateKey.getHashDataInputCallback(); + + String keyboxIdentifier = privateKey.getKeyboxIdentifier(); + + if (keyboxIdentifier == null) { + throw new SignatureException("STALSignature requires the STALPrivateKey " + + "to provide a KeyboxIdentifier."); + } + + SignRequest signRequest = new SignRequest(); + signRequest.setKeyIdentifier(keyboxIdentifier); + signRequest.setSignedInfo(data.toByteArray()); + signRequest.setHashDataInput(signRefDataSupplier); + + List responses = stal.handleRequest(Collections.singletonList((STALRequest) signRequest)); + + if (responses == null || responses.size() != 1) { + throw new SignatureException("Failed to access STAL."); + } + + STALResponse response = responses.get(0); + if (response instanceof SignResponse) { + return ((SignResponse) response).getSignatureValue(); + } else if (response instanceof ErrorResponse) { + throw new STALSignatureException(((ErrorResponse) response).getErrorCode()); + } else { + throw new SignatureException("Failed to access STAL."); + } + + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineUpdate(byte) + */ + @Override + protected void engineUpdate(byte b) throws SignatureException { + data.write(b); + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineUpdate(byte[], int, int) + */ + @Override + protected void engineUpdate(byte[] b, int off, int len) + throws SignatureException { + data.write(b, off, len); + } + + /* (non-Javadoc) + * @see java.security.SignatureSpi#engineVerify(byte[]) + */ + @Override + protected boolean engineVerify(byte[] sigBytes) throws SignatureException { + throw new UnsupportedOperationException("STALSignature des not support signature verification."); + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java new file mode 100644 index 00000000..4e86b07c --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.security.SignatureException; + +/** + * A SignatureException thrown by the {@link STALSignature}. + * + * @author mcentner + */ +public class STALSignatureException extends SignatureException { + + private static final long serialVersionUID = 1L; + + /** + * The STAL error code. + */ + private int errorCode; + + /** + * Creates a new instance of this STALSignatureException. + */ + public STALSignatureException() { + } + + /** + * Creates a new instance of this STALSigantureException with + * the given errorCode. + * + * @param errorCode the error code + */ + public STALSignatureException(int errorCode) { + this.errorCode = errorCode; + } + + /** + * Creates a new instance of this STALSignatureException with + * the given error msg. + * + * @param msg the error message + * @see SignatureException#SignatureException(String) + */ + public STALSignatureException(String msg) { + super(msg); + } + + /** + * Creates a new instance of this STALSignatureException with + * the given root cause. + * + * @param cause the cause + * @see SignatureException#SignatureException(Throwable) + */ + public STALSignatureException(Throwable cause) { + super(cause); + } + + /** + * Creates a new instance of this STALSignautureException with + * the given error message and root cause. + * + * @param message the error message + * @param cause the cause + * @see SignatureException#SignatureException(String, Throwable) + */ + public STALSignatureException(String message, Throwable cause) { + super(message, cause); + } + + /** + * @return the error code + */ + public int getErrorCode() { + return errorCode; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java new file mode 100644 index 00000000..94a4a066 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java @@ -0,0 +1,935 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.security.InvalidAlgorithmParameterException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.crypto.MarshalException; +import javax.xml.crypto.dom.DOMStructure; +import javax.xml.crypto.dsig.CanonicalizationMethod; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.Reference; +import javax.xml.crypto.dsig.SignatureMethod; +import javax.xml.crypto.dsig.SignedInfo; +import javax.xml.crypto.dsig.XMLObject; +import javax.xml.crypto.dsig.XMLSignature; +import javax.xml.crypto.dsig.XMLSignatureException; +import javax.xml.crypto.dsig.XMLSignatureFactory; +import javax.xml.crypto.dsig.dom.DOMSignContext; +import javax.xml.crypto.dsig.keyinfo.KeyInfo; +import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory; +import javax.xml.crypto.dsig.keyinfo.X509Data; +import javax.xml.stream.XMLStreamException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.etsi.uri._01903.v1_1.DataObjectFormatType; +import org.etsi.uri._01903.v1_1.QualifyingPropertiesType; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSException; +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSOutput; +import org.w3c.dom.ls.LSParser; +import org.w3c.dom.ls.LSResourceResolver; +import org.w3c.dom.ls.LSSerializer; + +import at.buergerkarte.namespaces.securitylayer._1.Base64XMLLocRefReqRefContentType; +import at.buergerkarte.namespaces.securitylayer._1.Base64XMLOptRefContentType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectAssociationType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; +import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType; +import at.gv.egiz.bku.binding.HttpUtil; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.utils.HexDump; +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; +import at.gv.egiz.dom.DOMUtils; +import at.gv.egiz.slbinding.impl.XMLContentType; +import at.gv.egiz.stal.HashDataInputCallback; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.xades.QualifyingPropertiesException; +import at.gv.egiz.xades.QualifyingPropertiesFactory; + +/** + * This class represents an XML-Signature as to be created by the + * security layer command CreateXMLSignatureRequest. + * + * @author mcentner + */ +public class Signature implements HashDataInputCallback { + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(Signature.class); + + /** + * The DOM implementation used. + */ + private DOMImplementationLS domImplLS; + + /** + * The SignatureContext for the XMLSignature. + */ + private SignatureContext ctx; + + /** + * The list of {@link DataObject}s for this signature. + */ + private List dataObjects = new ArrayList(); + + /** + * A mapping from the Id-attribute values of this signature's + * ds:References to the corresponding {@link DataObject}s. + */ + private Map dataObjectReferencIds = new HashMap(); + + /** + * The SignatureEnvironment for this signature. + */ + private SignatureLocation signatureLocation; + + /** + * The XML signature. + */ + private XMLSignature xmlSignature; + + /** + * A list of attributes of type xsd:ID to be registered in the {@link DOMSignContext}. + */ + private List idAttributes = new ArrayList(); + + /** + * The signer's X509 certificate. + */ + private X509Certificate signerCertificate; + + /** + * The signing time. + */ + private Date signingTime; + + /** + * Creates a new SLXMLSignature instance. + */ + public Signature(URLDereferencerContext dereferencerContext, + IdValueFactory idValueFactory, + AlgorithmMethodFactory algorithmMethodFactory) { + + domImplLS = DOMUtils.getDOMImplementationLS(); + + ctx = new SignatureContext(); + + ctx.setSignatureFactory(XMLSignatureFactory.getInstance()); + + ctx.setDereferencerContext(dereferencerContext); + ctx.setIdValueFactory(idValueFactory); + ctx.setAlgorithmMethodFactory(algorithmMethodFactory); + + } + + /** + * @return the Document containing this Signature + */ + public Document getDocument() { + return ctx.getDocument(); + } + + /** + * @return the parent Node for this Signature + */ + public Node getParent() { + return (signatureLocation != null) ? signatureLocation.getParent() : null; + } + + /** + * @return the next sibling Node for this Signature + */ + public Node getNextSibling() { + return (signatureLocation != null) ? signatureLocation.getNextSibling() : null; + } + + /** + * @return the XMLSignature + */ + public XMLSignature getXMLSignature() { + return xmlSignature; + } + + /** + * @return the list of {@link Reference}s of this Signature + */ + @SuppressWarnings("unchecked") + public List getReferences() { + return (xmlSignature != null) ? xmlSignature.getSignedInfo().getReferences() : null; + } + + /** + * @return the list of {@link XMLObject}s of this Signature + */ + @SuppressWarnings("unchecked") + public List getXMLObjects() { + return (xmlSignature != null) ? xmlSignature.getObjects() : null; + } + + /** + * Prepares the signature document with the information given by the + * signatureInfo provided. + * + * @param signatureInfo + * the SignatureInfo + * + * @throws SLCommandException + * if processing fails for any reason + * @throws IllegalStateException + * if the parent node has already been set + * @throws NullPointerException + * if signatureInfo is null + */ + public void setSignatureInfo(SignatureInfoCreationType signatureInfo) throws SLCommandException { + + if (signatureLocation != null) { + throw new IllegalStateException("SignatureEnvironment already set."); + } + + Base64XMLOptRefContentType signatureEnvironment = signatureInfo.getSignatureEnvironment(); + + if (signatureEnvironment == null) { + + // no SignatureEnvironment, so we use an empty document and the document as parent + ensureSignatureLocation(); + + } else { + + // parse SignatureEnvrionment and use as document + Document document = parseSignatureEnvironment(signatureEnvironment, signatureInfo.getSupplement()); + ctx.setDocument(document); + + signatureLocation = new SignatureLocation(ctx); + signatureLocation.setSignatureInfo(signatureInfo); + + } + + } + + /** + * Ensures a SignatureLocation for this Signature. + */ + private void ensureSignatureLocation() { + + if (signatureLocation == null) { + Document document = DOMUtils.createDocument(); + ctx.setDocument(document); + + signatureLocation = new SignatureLocation(ctx); + signatureLocation.setParent(document); + } + + } + + /** + * Adds a DataObject with the information given by the + * dataObjectInfo provided to this Signature. + * + * @param dataObjectInfo + * the DataObjectInfo element + * + * @throws SLCommandException + * if adding the DataObject fails + * @throws SLRequestException + * if the information provided by the given + * dataObjectInfo does not conform to the security + * layer specification + * @throws NullPointerException + * if dataObjectInfo is null + */ + public void addDataObject(DataObjectInfoType dataObjectInfo) throws SLCommandException, SLRequestException { + + ensureSignatureLocation(); + + DataObject dataObject = new DataObject(ctx); + dataObject.setDataObjectInfo(dataObjectInfo); + + dataObjects.add(dataObject); + + dataObjectReferencIds.put(dataObject.getReference().getId(), dataObject); + + } + + /** + * Sets the SigningTime qualifying property of this Signature. + * + * @param signingTime the signing time to set + */ + public void setSigningTime(Date signingTime) { + this.signingTime = signingTime; + } + + /** + * Sets the SignerCertificate qualifying property of this Signature. + * + * @param certificate the signer's certificate + */ + public void setSignerCeritifcate(X509Certificate certificate) { + this.signerCertificate = certificate; + } + + /** + * Builds the XMLSignature data structure of this Signature as configured by + * the various setter methods. + * + * @throws SLCommandException if building this signature fails + */ + public void buildXMLSignature() throws SLCommandException { + + List objects = new ArrayList(); + List references = new ArrayList(); + + // add all data objects + for (DataObject dataObject : dataObjects) { + if (dataObject.getXmlObject() != null) { + objects.add(dataObject.getXmlObject()); + } + if (dataObject.getReference() != null) { + references.add(dataObject.getReference()); + } + } + + addXAdESObjectAndReference(objects, references); + + XMLSignatureFactory signatureFactory = ctx.getSignatureFactory(); + AlgorithmMethodFactory algorithmMethodFactory = ctx.getAlgorithmMethodFactory(); + + CanonicalizationMethod cm; + SignatureMethod sm; + try { + cm = algorithmMethodFactory.createCanonicalizationMethod(ctx); + sm = algorithmMethodFactory.createSignatureMethod(ctx); + } catch (NoSuchAlgorithmException e) { + log.error("Failed to get Canonicalization or Signature algorithm.", e); + throw new SLCommandException(4006); + } catch (InvalidAlgorithmParameterException e) { + log.error("Failed to get Canonicalization or Signature algorithm.", e); + throw new SLCommandException(4006); + } + + String siId = ctx.getIdValueFactory().createIdValue("SignedInfo"); + + SignedInfo si = signatureFactory.newSignedInfo(cm, sm, references, siId); + + KeyInfo ki = null; + if (signerCertificate != null) { + KeyInfoFactory kif = KeyInfoFactory.getInstance(); + X509Data x509Data = kif.newX509Data(Collections.singletonList(signerCertificate)); + ki = kif.newKeyInfo(Collections.singletonList(x509Data)); + } + + String signatureId = ctx.getIdValueFactory().createIdValue("Signature"); + String signatureValueId = ctx.getIdValueFactory().createIdValue("SignatureValue"); + + xmlSignature = signatureFactory.newXMLSignature(si, ki, objects, signatureId, signatureValueId); + + } + + /** + * Sign this Signature using the given signContext. + *

+ * Call's {@link #buildXMLSignature()} if it has not been called yet. + *

+ * + * @param signContext + * the signing context + * + * @throws MarshalException + * if marshalling the XMLSignature fails + * @throws XMLSignatureException + * if signing the XMLSignature fails + * @throws SLCommandException + * if building the XMLSignature fails + * @throws NullPointerException + * if signContext is null + */ + public void sign(DOMSignContext signContext) throws MarshalException, XMLSignatureException, SLCommandException { + + if (xmlSignature == null) { + buildXMLSignature(); + } + + for (IdAttribute idAttribute : idAttributes) { + signContext.setIdAttributeNS(idAttribute.element, idAttribute.namespaceURI, idAttribute.localName); + } + + // DO NOT USE: + // signContext.setProperty("iaik.xml.crypto.dsig.sign-over", Boolean.TRUE); + + signContext.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); + + signContext.putNamespacePrefix(XMLSignature.XMLNS, "dsig"); + + signContext.setURIDereferencer(new URIDereferncerAdapter(ctx.getDereferencerContext())); + + try { + xmlSignature.sign(signContext); + } catch (XMLSignatureException e) { + Throwable cause = e.getCause(); + while (cause != null) { + if (cause instanceof STALSignatureException) { + int errorCode = ((STALSignatureException) cause).getErrorCode(); + SLCommandException commandException = new SLCommandException(errorCode); + log.info("Failed to sign signature.", commandException); + throw commandException; + } else { + cause = cause.getCause(); + } + } + throw e; + } + + // debug + if (log.isTraceEnabled()) { + for (DataObject dataObject : dataObjects) { + Reference reference = dataObject.getReference(); + InputStream digestInputStream = reference.getDigestInputStream(); + if (digestInputStream != null) { + String mimeType = dataObject.getMimeType(); + StringBuilder sb = new StringBuilder(); + sb.append("DigestInput for Reference with id='"); + sb.append(reference.getId()); + sb.append("' (MIME-Type="); + sb.append(dataObject.getMimeType()); + sb.append("):\n"); + try { + if (mimeType != null && ( + mimeType.startsWith("text") || + "application/xhtml+xml".equals(mimeType))) { + byte[] b = new byte[512]; + for (int l; (l = digestInputStream.read(b)) != -1;) { + sb.append(new String(b, 0, l)); + } + } else { + sb.append(HexDump.hexDump(digestInputStream)); + } + } catch (IOException e) { + log.error(e); + } + log.trace(sb.toString()); + } else { + log.trace("Reference caching is not enabled."); + } + } + } + + } + + /** + * Sign this Signature using the given stal implementation and + * keyboxIdentifier. + *

+ * This method configures an appropriate {@link DOMSignContext} and calls + * {@link #sign(DOMSignContext)}. If {@link #buildXMLSignature()} has not been + * called yet, it is called by this method. + *

+ * + * @param stal + * the STAL implementation to use + * @param keyboxIdentifier + * the KeyboxIdentifier to use + * + * @throws MarshalException + * if marshalling this Signature fails + * @throws XMLSignatureException + * if signing this Signature fails + * @throws SLCommandException + * if building this Signature fails + * @throws NullPointerException + * if stal or keyboxIdentifier is + * null + */ + public void sign(STAL stal, String keyboxIdentifier) throws MarshalException, XMLSignatureException, SLCommandException { + + if (stal == null) { + throw new NullPointerException("Argument 'stal' must not be null."); + } + + if (keyboxIdentifier == null) { + throw new NullPointerException("Argument 'keyboxIdentifier' must not be null."); + } + + if (xmlSignature == null) { + buildXMLSignature(); + } + + SignatureMethod signatureMethod = xmlSignature.getSignedInfo().getSignatureMethod(); + String algorithm = signatureMethod.getAlgorithm(); + + PrivateKey privateKey = new STALPrivateKey(stal, algorithm, keyboxIdentifier, this); + + DOMSignContext signContext; + if (getNextSibling() == null) { + signContext = new DOMSignContext(privateKey, getParent()); + } else { + signContext = new DOMSignContext(privateKey, getParent(), getNextSibling()); + } + + sign(signContext); + } + + @Override + public InputStream getHashDataInput(String referenceId) { + + DataObject dataObject = dataObjectReferencIds.get(referenceId); + if (dataObject != null) { + return dataObject.getReference().getDigestInputStream(); + } else { + return null; + } + } + + /** + * Adds the XAdES QualifyingProperties as an + * ds:Object and a corresponding ds:Reference to + * it's SignedProperties element to this Signature. + * + * @param objects + * the list of ds:Objects to add the created + * ds:Object to + * @param references + * the list of ds:References to add the created + * ds:Reference to + * + * @throws SLCommandException + * if creating and adding the XAdES + * QualifyingProperties fails + * @throws NullPointerException + * if objects or references is + * null + */ + private void addXAdESObjectAndReference(List objects, List references) throws SLCommandException { + + QualifyingPropertiesFactory factory = QualifyingPropertiesFactory.getInstance(); + + String idValue = ctx.getIdValueFactory().createIdValue("SignedProperties"); + + Date date = (signingTime != null) ? signingTime : new Date(); + + List signingCertificates; + if (signerCertificate != null) { + signingCertificates = Collections.singletonList(signerCertificate); + } else { + signingCertificates = Collections.emptyList(); + } + + // TODO: report MOA-SP bug + // + // The security layer specification mandates the use of version 1.2.2. of the + // XAdES QualifyingProperties. However MOA-SP supports only version 1.1.1. Therefore, + // the version 1.1.1 is used in order to be compatible with current MOA-SP versions. + + List dataObjectFormats = new ArrayList(); + for (DataObject dataObject : dataObjects) { + if (dataObject.getMimeType() != null && dataObject.getReference() != null) { + Reference reference = dataObject.getReference(); + if (reference.getId() != null) { + String objectReference = "#" + reference.getId(); + dataObjectFormats.add(factory.createDataObjectFormatType( + objectReference, dataObject.getMimeType(), dataObject + .getDescription())); + } + } + } + + JAXBElement qualifyingProperties; + try { + qualifyingProperties = factory.createQualifyingProperties111(date, signingCertificates, idValue, dataObjectFormats); + } catch (QualifyingPropertiesException e) { + log.error("Failed to create QualifyingProperties.", e); + throw new SLCommandException(4000); + } + + DocumentFragment fragment = ctx.getDocument().createDocumentFragment(); + + try { + factory.marshallQualifyingProperties(qualifyingProperties, fragment); + } catch (JAXBException e) { + log.error("Failed to marshal QualifyingProperties.", e); + throw new SLCommandException(4000); + } + + List content = Collections.singletonList(new DOMStructure(fragment.getFirstChild())); + + String objectIdValue = ctx.getIdValueFactory().createIdValue("Object"); + + XMLObject object = ctx.getSignatureFactory().newXMLObject(content, objectIdValue, null, null); + + objects.add(object); + + // TODO: Report MOA-SP Bug + // + // Direct referencing of the SignedPorperties Id-attribute is not supported by MOA-SP + // because the QualifyingProperties are parsed without the XAdES schema. Therefore, + // the shorthand XPointer could not be resolved. + // + // The following workaround uses an XPointer to select the SignedProperties in order + // to allow the signature to be verified with MOA-SP. + + String referenceURI = "#xmlns(xades=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id('" + + objectIdValue + + "')/child::xades:QualifyingProperties/child::xades:SignedProperties)"; + DigestMethod dm; + try { + dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); + } catch (NoSuchAlgorithmException e) { + log.error("Failed to get DigestMethod algorithm.", e); + throw new SLCommandException(4006); + } catch (InvalidAlgorithmParameterException e) { + log.error("Failed to get DigestMethod algorithm.", e); + throw new SLCommandException(4006); + } + + String referenceIdValue = ctx.getIdValueFactory().createIdValue("Reference"); + String referenceType = QualifyingPropertiesFactory.SIGNED_PROPERTIES_REFERENCE_TYPE_V1_1_1; + + Reference reference = ctx.getSignatureFactory().newReference(referenceURI, dm, null, referenceType, referenceIdValue); + + references.add(reference); + + Node child = fragment.getFirstChild(); + if (child instanceof Element) { + NodeList nodes = ((Element) child).getElementsByTagNameNS(QualifyingPropertiesFactory.NS_URI_V1_1_1, "SignedProperties"); + if (nodes.getLength() > 0) { + IdAttribute idAttribute = new IdAttribute(); + idAttribute.element = (Element) nodes.item(0); + idAttribute.namespaceURI = null; + idAttribute.localName = "Id"; + idAttributes.add(idAttribute); + } + } + + } + + /** + * Parse the SignatureEnvironment. + * + * @param signatureEnvironment + * the SignatureEnvironment element + * @param supplements + * an optional list of Supplements (may be + * null) + * + * @return the parsed SignatureEnvironment document + * + * @throws SLCommandException + * if parsing the SignatureEnvironment fails + * @throws NullPointerException + * if signatureEnvironment is null + */ + private Document parseSignatureEnvironment( + Base64XMLOptRefContentType signatureEnvironment, + List supplements) throws SLCommandException { + + if (signatureEnvironment == null) { + throw new NullPointerException("Argument 'signatureEnvironment' must not be null."); + } + + LSInput input; + try { + if (signatureEnvironment.getReference() != null) { + log.debug("SignatureEnvironment contains Reference " + signatureEnvironment.getReference() + "."); + input = createLSInput(signatureEnvironment.getReference()); + } else if (signatureEnvironment.getBase64Content() != null) { + log.debug("SignatureEnvironment contains Base64Content."); + input = createLSInput(signatureEnvironment.getBase64Content()); + } else if (signatureEnvironment.getXMLContent() != null) { + log.debug("SignatureEnvironment contains XMLContent."); + input = createLSInput((XMLContentType) signatureEnvironment.getXMLContent()); + } else { + // the schema does not allow us to reach this point + throw new SLCommandException(4000); + } + } catch (IOException e) { + log.info("XML document in which the signature is to be integrated cannot be resolved.", e); + throw new SLCommandException(4100); + } catch (XMLStreamException e) { + log.info("XML document in which the signature is to be integrated cannot be resolved.", e); + throw new SLCommandException(4100); + } + + LSParser parser = domImplLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); + DOMConfiguration domConfig = parser.getDomConfig(); + SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); + domConfig.setParameter("error-handler", errorHandler); + LSResourceResolverAdapter resourceResolver = new LSResourceResolverAdapter(supplements); + domConfig.setParameter("resource-resolver", resourceResolver); + domConfig.setParameter("validate", Boolean.TRUE); + + Document doc; + try { + doc = parser.parse(input); + } catch (DOMException e) { + log.info("XML document in which the signature is to be integrated cannot be parsed.", e); + throw new SLCommandException(4101); + } catch (LSException e) { + log.info("XML document in which the signature is to be integrated cannot be parsed.", e); + throw new SLCommandException(4101); + } + + if (resourceResolver.getError() != null) { + log.info("Failed to resolve resource while parsing SignatureEnvironment document.", resourceResolver.getError()); + // we don't stop here, as we only _try_ to parse validating + } + + if (errorHandler.hasFatalErrors()) { + // log fatal errors + if (log.isInfoEnabled()) { + List errorMessages = errorHandler.getErrorMessages(); + StringBuffer sb = new StringBuffer(); + for (String errorMessage : errorMessages) { + sb.append(" "); + sb.append(errorMessage); + } + log.info("XML document in which the signature is to be integrated cannot be parsed." + sb.toString()); + } + throw new SLCommandException(4101); + } + + // log parsed document + if (log.isTraceEnabled()) { + + StringWriter writer = new StringWriter(); + + writer.write("SignatureEnvironment:\n"); + + LSOutput output = domImplLS.createLSOutput(); + output.setCharacterStream(writer); + output.setEncoding("UTF-8"); + LSSerializer serializer = domImplLS.createLSSerializer(); + serializer.write(doc, output); + + log.trace(writer.toString()); + } + + return doc; + + } + + /** + * Creates an LSInput from the given reference URI. + * + * @param reference + * the reference URL + * + * @return an LSInput from the given reference URI + * + * @throws IOException + * if dereferencing the given reference fails + */ + private LSInput createLSInput(String reference) throws IOException { + + URLDereferencer urlDereferencer = URLDereferencer.getInstance(); + StreamData streamData = urlDereferencer.dereference(reference, ctx.getDereferencerContext()); + + String contentType = streamData.getContentType(); + String charset = HttpUtil.getCharset(contentType, true); + InputStreamReader streamReader; + try { + streamReader = new InputStreamReader(streamData.getStream(), charset); + } catch (UnsupportedEncodingException e) { + log.info("Charset " + charset + " not supported. Using default."); + streamReader = new InputStreamReader(streamData.getStream()); + } + + LSInput input = domImplLS.createLSInput(); + input = domImplLS.createLSInput(); + input.setCharacterStream(streamReader); + + return input; + + } + + /** + * Creates an LSInput from the given content bytes. + * + * @param content + * the content bytes + * + * @return an LSInput from the givne content bytes + */ + private LSInput createLSInput(byte[] content) { + + ByteArrayInputStream inputStream = new ByteArrayInputStream(content); + LSInput input = domImplLS.createLSInput(); + input.setByteStream(inputStream); + + return input; + + } + + /** + * Creates an LSInput from the given XML content. + * + * @param content + * the XML content + * @return an LSInput from the given XML content + * + * @throws XMLStreamException + * if reading the XMLStream from the given XML content fails + */ + private LSInput createLSInput(XMLContentType content) throws XMLStreamException { + + ByteArrayOutputStream redirectedStream = content.getRedirectedStream(); + if (redirectedStream != null) { + LSInput input = domImplLS.createLSInput(); + input.setByteStream(new ByteArrayInputStream(redirectedStream.toByteArray())); + return input; + } else { + return null; + } + + } + + /** + * Represents an xsd:Id-attribute value. + * + * @author mcentner + */ + private class IdAttribute { + + private Element element; + + private String namespaceURI; + + private String localName; + + } + + /** + * An implementation of the LSResourceResolver that uses a list of supplements + * to resolve resources. + * + * @author mcentner + */ + private class LSResourceResolverAdapter implements LSResourceResolver { + + List supplements; + + private LSResourceResolverAdapter( + List supplements) { + this.supplements = supplements; + } + + private Exception error; + + /** + * @return the error + */ + public Exception getError() { + return error; + } + + @Override + public LSInput resolveResource(String type, String namespaceURI, + String publicId, String systemId, String baseURI) { + + if (log.isTraceEnabled()) { + log.trace("Resolve resource :" + + "\n type=" + type + + "\n namespaceURI=" + namespaceURI + + "\n publicId=" + publicId + + "\n systemId=" + systemId + + "\n baseURI=" + baseURI); + } + + if (systemId != null) { + + log.debug("Resolve resource '" + systemId + "'."); + + for (DataObjectAssociationType supplement : supplements) { + + Base64XMLLocRefReqRefContentType content = supplement.getContent(); + if (content != null) { + + String reference = content.getReference(); + if (systemId.equals(reference)) { + + try { + if (content.getLocRefContent() != null) { + log.trace("Resolved resource '" + reference + "' to supplement with LocRefContent."); + return createLSInput(content.getLocRefContent()); + } else if (content.getBase64Content() != null) { + log.trace("Resolved resource '" + reference + "' to supplement with Base64Content."); + return createLSInput(content.getBase64Content()); + } else if (content.getXMLContent() != null) { + log.trace("Resolved resource '" + reference + "' to supplement with XMLContent."); + return createLSInput((XMLContentType) content.getXMLContent()); + } else { + return null; + } + } catch (IOException e) { + log.info("Failed to resolve resource '" + systemId + "' to supplement.", e); + error = e; + return null; + } catch (XMLStreamException e) { + log.info("Failed to resolve resource '" + systemId + "' to supplement.", e); + error = e; + return null; + } + + } + + } + + } + + log.info("Failed to resolve resource '" + systemId + "' to supplement. No such supplement."); + + } + + return null; + + } + + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java new file mode 100644 index 00000000..0925f2fd --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java @@ -0,0 +1,129 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.XMLSignatureFactory; + +import org.w3c.dom.Document; + +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; + +/** + * An instance of this class carries context information for a XML-Signature + * created by the security layer command CreateXMLSignature. + * + * @author mcentner + */ +public class SignatureContext { + + /** + * The document going to contain the XML signature. + */ + private Document document; + + /** + * The IdValueFactory used to create xsd:ID-attribute values. + */ + private IdValueFactory idValueFactory; + + /** + * The XMLSignatureFactory to create XML signature objects. + */ + private XMLSignatureFactory signatureFactory; + + /** + * The URLDereferencerContext for dereferencing URLs. + */ + private URLDereferencerContext dereferencerContext; + + /** + * The DigestMethodFactory to create {@link DigestMethod} objects. + */ + private AlgorithmMethodFactory digestMethodFactory; + + /** + * @return the document + */ + public Document getDocument() { + return document; + } + + /** + * @param document the document to set + */ + public void setDocument(Document document) { + this.document = document; + } + + /** + * @return the idValueFactory + */ + public IdValueFactory getIdValueFactory() { + return idValueFactory; + } + + /** + * @param idValueFactory the idValueFactory to set + */ + public void setIdValueFactory(IdValueFactory idValueFactory) { + this.idValueFactory = idValueFactory; + } + + /** + * @return the signatureFactory + */ + public XMLSignatureFactory getSignatureFactory() { + return signatureFactory; + } + + /** + * @param signatureFactory the signatureFactory to set + */ + public void setSignatureFactory(XMLSignatureFactory signatureFactory) { + this.signatureFactory = signatureFactory; + } + + /** + * @return the dereferencerContext + */ + public URLDereferencerContext getDereferencerContext() { + return dereferencerContext; + } + + /** + * @param dereferencerContext the dereferencerContext to set + */ + public void setDereferencerContext(URLDereferencerContext dereferencerContext) { + this.dereferencerContext = dereferencerContext; + } + + /** + * @return the digestMethodFactory + */ + public AlgorithmMethodFactory getAlgorithmMethodFactory() { + return digestMethodFactory; + } + + /** + * @param digestMethodFactory the digestMethodFactory to set + */ + public void setAlgorithmMethodFactory(AlgorithmMethodFactory digestMethodFactory) { + this.digestMethodFactory = digestMethodFactory; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java new file mode 100644 index 00000000..5ec02893 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java @@ -0,0 +1,235 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.util.Iterator; + +import javax.xml.XMLConstants; +import javax.xml.namespace.NamespaceContext; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpression; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.slbinding.impl.SignatureLocationType; + +/** + * This class implements the SignatureLocation of an XML-Signature + * to be created by the security layer command CreateXMLSignature. + * + * @author mcentner + */ +public class SignatureLocation { + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(SignatureLocation.class); + + /** + * The SignatureContext for the XML signature + */ + private SignatureContext ctx; + + /** + * The parent node for the XML signature. + */ + private Node parent; + + /** + * The next sibling node for the XML signature. + */ + private Node nextSibling; + + /** + * Creates a new SignatureLocation with the given signatureContext + * + * @param signatureContext the context for the XML signature creation + */ + public SignatureLocation(SignatureContext signatureContext) { + this.ctx = signatureContext; + } + + /** + * @return the parent node for the XML signature + */ + public Node getParent() { + return parent; + } + + /** + * @param parent the parent for the XML signature + */ + public void setParent(Node parent) { + this.parent = parent; + } + + /** + * @return the next sibling node for the XML signature + */ + public Node getNextSibling() { + return nextSibling; + } + + /** + * @param nextSibling the next sibling node for the XML signature + */ + public void setNextSibling(Node nextSibling) { + this.nextSibling = nextSibling; + } + + /** + * Configures this SignatureLocation with the information provided by the + * given SignatureInfo element. + * + * @param signatureInfo + * the SignatureInfo element + * + * @throws SLCommandException + * if configuring this SignatureLocation with given + * signatureInfofails + */ + public void setSignatureInfo(SignatureInfoCreationType signatureInfo) + throws SLCommandException { + + // evaluate signature location XPath ... + SignatureLocationType signatureLocation = (SignatureLocationType) signatureInfo + .getSignatureLocation(); + + NamespaceContext namespaceContext = new MOAIDWorkaroundNamespaceContext( + signatureLocation.getNamespaceContext()); + + parent = evaluateSignatureLocation(signatureInfo.getSignatureLocation() + .getValue(), namespaceContext, ctx.getDocument().getDocumentElement()); + + // ... and index + nextSibling = findNextSibling(parent, signatureInfo.getSignatureLocation() + .getIndex().intValue()); + + } + + /** + * Evaluates the given xpath with the document element as context node + * and returns the resulting node. + * + * @param xpath the XPath expression + * @param nsContext the namespace context of the XPath expression + * @param contextNode the context node for the XPath evaluation + * + * @return the result of evaluating the XPath expression + * + * @throws SLCommandException + */ + private Node evaluateSignatureLocation(String xpath, NamespaceContext nsContext, Node contextNode) throws SLCommandException { + + Node node = null; + try { + XPathFactory xpathFactory = XPathFactory.newInstance(); + XPath xPath = xpathFactory.newXPath(); + xPath.setNamespaceContext(nsContext); + XPathExpression xpathExpr = xPath.compile(xpath); + node = (Node) xpathExpr.evaluate(contextNode, XPathConstants.NODE); + } catch (XPathExpressionException e) { + log.info("Failed to evaluate SignatureLocation XPath expression '" + xpath + "' on context node.", e); + throw new SLCommandException(4102); + } + + if (node == null) { + log.info("Failed to evaluate SignatureLocation XPath expression '" + xpath + "'. Result is empty."); + throw new SLCommandException(4102); + } + + return node; + + } + + /** + * Finds the next sibling node of the parent's n-th child node + * or null if there is no next sibling. + * + * @param parent the parent node + * @param n the index of the child node + * + * @return the next sibling node of the node specified by parent and index n, + * or null if there is no next sibling node. + * + * @throws SLCommandException if the n-th child of parent does not exist + */ + private Node findNextSibling(Node parent, int n) throws SLCommandException { + + NodeList childNodes = parent.getChildNodes(); + Node childNode = childNodes.item(n); + if (childNode == null) { + log.info("SingatureLocation Index '" + n + "' not found in document."); + throw new SLCommandException(4102); + } else { + return childNode.getNextSibling(); + } + + } + + /** + * Workaround for a missing namespace prefix declaration in MOA-ID. + * + * @author mcentner + */ + private class MOAIDWorkaroundNamespaceContext implements NamespaceContext { + + private NamespaceContext namespaceContext; + + public MOAIDWorkaroundNamespaceContext(NamespaceContext namespaceContext) { + super(); + this.namespaceContext = namespaceContext; + } + + @Override + public String getNamespaceURI(String prefix) { + + String namespaceURI = namespaceContext.getNamespaceURI(prefix); + + if ((namespaceURI == null || XMLConstants.NULL_NS_URI.equals(namespaceURI)) && "saml".equals(prefix)) { + namespaceURI = "urn:oasis:names:tc:SAML:1.0:assertion"; + log.debug("Namespace prefix '" + prefix + "' resolved to '" + namespaceURI + "' (MOA-ID Workaround)."); + } else { + log.trace("Namespace prefix '" + prefix + "' resolved to '" + namespaceURI + "'."); + } + + return namespaceURI; + } + + @Override + public String getPrefix(String namespaceURI) { + return namespaceContext.getPrefix(namespaceURI); + } + + @SuppressWarnings("unchecked") + @Override + public Iterator getPrefixes(String namespaceURI) { + return namespaceContext.getPrefixes(namespaceURI); + } + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java new file mode 100644 index 00000000..0d54adce --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java @@ -0,0 +1,98 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import java.util.ArrayList; +import java.util.List; + +import org.w3c.dom.DOMError; +import org.w3c.dom.DOMErrorHandler; + +/** + * A simple DOMErrorHandler implementation. + * + * @author mcentner + */ +public class SimpleDOMErrorHandler implements DOMErrorHandler { + + /** + * Have there been errors reported? + */ + private boolean errors = false; + + /** + * Have there been fatal error reported? + */ + private boolean fatalErrors = false; + + /** + * The list of error messages of reported errors. + */ + private List errorMessages = new ArrayList(); + + /** + * @return true if errors have been reported, or false otherwise + */ + public boolean hasErrors() { + return errors; + } + + /** + * @return true if fatal errors have been reported, or false otherwise + */ + public boolean hasFatalErrors() { + return fatalErrors; + } + + /** + * @return a list of error messages that have been reported + */ + public List getErrorMessages() { + return errorMessages; + } + + /* (non-Javadoc) + * @see org.w3c.dom.DOMErrorHandler#handleError(org.w3c.dom.DOMError) + */ + @Override + public boolean handleError(DOMError error) { + + switch (error.getSeverity()) { + + case DOMError.SEVERITY_WARNING : +// log.debug("[warning] " + error.getMessage()); + return true; + + case DOMError.SEVERITY_ERROR : +// log.debug("[error] " + error.getMessage()); + errorMessages.add(error.getMessage()); + errors = true; + return false; + + case DOMError.SEVERITY_FATAL_ERROR : +// log.debug("[fatal error] " + error.getMessage()); + errorMessages.add(error.getMessage()); + fatalErrors = true; + return false; + + default: + return false; + } + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java new file mode 100644 index 00000000..c94937be --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java @@ -0,0 +1,103 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import iaik.xml.crypto.utils.URIDereferencerImpl; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import javax.xml.crypto.Data; +import javax.xml.crypto.OctetStreamData; +import javax.xml.crypto.URIDereferencer; +import javax.xml.crypto.URIReference; +import javax.xml.crypto.URIReferenceException; +import javax.xml.crypto.XMLCryptoContext; + +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; + +/** + * An URIDereferencer implementation that uses an {@link URLDereferencer} to + * dereference. + * + * @author mcentner + */ +public class URIDereferncerAdapter implements URIDereferencer { + + /** + * The context for dereferencing. + */ + protected URLDereferencerContext urlDereferencerContext; + + /** + * Creates a new URIDereferencerAdapter instance with the given + * urlDereferencerContext. + * + * @param urlDereferencerContext the context to be used for dereferencing + */ + public URIDereferncerAdapter(URLDereferencerContext urlDereferencerContext) { + super(); + this.urlDereferencerContext = urlDereferencerContext; + } + + /* (non-Javadoc) + * @see javax.xml.crypto.URIDereferencer#dereference(javax.xml.crypto.URIReference, javax.xml.crypto.XMLCryptoContext) + */ + @Override + public Data dereference(URIReference uriReference, XMLCryptoContext context) + throws URIReferenceException { + + String uriString = uriReference.getURI(); + if (uriString == null) { + return null; + } + + URI uri; + try { + uri = new URI(uriString); + } catch (URISyntaxException e) { + throw new URIReferenceException(e.getMessage(), e); + } + + if (uri.isAbsolute()) { + + URLDereferencer dereferencer = URLDereferencer.getInstance(); + StreamData streamData; + try { + streamData = dereferencer.dereference(uriString, urlDereferencerContext); + } catch (IOException e) { + throw new URIReferenceException(e.getMessage(), e); + } + return new OctetStreamData(streamData.getStream(), uriString, streamData.getContentType()); + + } else { + + URIDereferencer uriDereferencer = context.getURIDereferencer(); + if (uriDereferencer == null || uriDereferencer == this) { + uriDereferencer = new URIDereferencerImpl(); + } + + return uriDereferencer.dereference(uriReference, context); + + } + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java new file mode 100644 index 00000000..6b388f2a --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import iaik.xml.crypto.dsig.DigestMethodImpl; +import iaik.xml.crypto.dsig.DigestValueImpl; +import iaik.xml.crypto.dsig.ReferenceImpl; +import iaik.xml.crypto.dsig.TransformImpl; +import iaik.xml.crypto.dsig.TransformsImpl; + +import javax.xml.crypto.Data; +import javax.xml.crypto.URIDereferencer; +import javax.xml.crypto.URIReferenceException; +import javax.xml.crypto.XMLCryptoContext; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.TransformException; + +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLExceptionMessages; + +/** + * This class extends the XSECT ReferenceImpl to allow for the use + * of already marshalled ds:Transforms elements for initialization. + * + * @author mcentner + */ +public class XSECTReference extends ReferenceImpl { + + /** + * The URIDereferencer to be used for dereferencing. + */ + protected URIDereferencer dereferencer; + + /** + * Creates a new instance of this XSECTReference with the given + * uri, digest method, transforms, type + * and id value. + * + * @param uri + * the URI-attribute value (may be null) + * @param dm + * the digest method + * @param transforms + * a TransformsImpl element (may be null) + * @param type + * the Type-attribute value (may be null) + * @param id + * the Id-attribute value (may be null) + * + * @throws NullPointerException + * if digestMethod is null + * @throws IllegalArgumentException + * if uri is not RFC 2396 compliant + * @throws ClassCastException + * if any of the transforms is not of type + * {@link TransformImpl} + */ + public XSECTReference(String uri, DigestMethod dm, TransformsImpl transforms, String type, + String id) { + super(uri, transforms, type, id); + digestMethod_ = (DigestMethodImpl) dm; + digestValue_ = new DigestValueImpl(); + } + + /* (non-Javadoc) + * @see iaik.xml.crypto.dsig.ReferenceType#dereference(javax.xml.crypto.XMLCryptoContext) + */ + @Override + public Data dereference(XMLCryptoContext context) throws TransformException, + URIReferenceException { + if (dereferencer != null) { + return dereferencer.dereference(this, context); + } else { + try { + return super.dereference(context); + } catch (URIReferenceException e) { + SLCommandException commandException = new SLCommandException(4003, + SLExceptionMessages.EC4003_NOT_RESOLVED, new Object[] { getURI() }); + throw new URIReferenceException("Failed to dereference data to-be signed.", commandException); + } + } + } + + /** + * @return the dereferencer to be used for dereferencing this reference + */ + public URIDereferencer getDereferencer() { + return dereferencer; + } + + /** + * @param dereferencer the dereferencer to be used for dereferencing this reference + */ + public void setDereferencer(URIDereferencer dereferencer) { + this.dereferencer = dereferencer; + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java new file mode 100644 index 00000000..a98e4236 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java @@ -0,0 +1,124 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import iaik.xml.crypto.dsig.TransformImpl; +import iaik.xml.crypto.dsig.TransformsImpl; + +import java.util.List; + +import javax.xml.crypto.MarshalException; +import javax.xml.crypto.dom.DOMCryptoContext; +import javax.xml.crypto.dsig.Transform; + +import org.w3c.dom.Node; + +/** + * This class extends the XSECT TransformsImpl to allow for the use of an + * unmarshalled ds:Transforms element for initalization. + * + * @author mcentner + */ +public class XSECTTransforms extends TransformsImpl { + + /** + * Creates a new XSECTTransforms with the given list of transforms. + * + * @param transforms a list of {@link TransformImpl}s + * @see TransformsImpl#TransformsImpl(List) + */ + @SuppressWarnings("unchecked") + public XSECTTransforms(List transforms) { + super(transforms); + } + + /** + * Creates a new XSECTTransforms and initializes it from the given + * ds:Transforms node. + * + * @param context the context used for unmarshalling + * @param node the ds:Transforms node + * + * @throws MarshalException if unmarshalling the ds:Transforms fails + */ + public XSECTTransforms(DOMCryptoContext context, Node node) + throws MarshalException { + super(context, node); + } + + /** + * Inserts the given transform at the top of the + * transform list. + * + * @param transform the ds:Transform to instert + */ + @SuppressWarnings("unchecked") + public void insertTransform(Transform transform) { + if (transform == null) { + throw new NullPointerException("Parameter 'transform' must not be null."); + } + if (!(transform instanceof TransformImpl)) { + throw new ClassCastException("Transform 'transform' must be of type '" + TransformImpl.class.getName() + "'."); + } + transforms_.add(0, transform); + } + + /** + * @return + */ + @SuppressWarnings("unchecked") + private List getTransformImpls() { + return transforms_; + } + + /* (non-Javadoc) + * @see iaik.xml.crypto.dsig.TransformsType#marshal(javax.xml.crypto.dom.DOMCryptoContext, org.w3c.dom.Node, org.w3c.dom.Node) + */ + @Override + public Node marshal(DOMCryptoContext context, Node parent, Node nextSibling) + throws MarshalException { + + if (getNode() != null) { + // If this TransformsImpl has been unmarshalled from exiting nodes, + // we don't want to re-marshal ... + state_ = STATE_MARSHALED; + + // ... but append the existing node to the parent ... + Node transformsNode = parent.insertBefore(getNode(), nextSibling); + + // ... and marshal any Transforms not yet marshalled (e.g. that + // have been added via insertTransform(). + Node transformNextSibling = transformsNode.getFirstChild(); + List transforms = getTransformImpls(); + for (int i = 0; i < transforms.size(); i++) { + TransformImpl transform = transforms.get(i); + Node transformNode = transform.getNode(); + if (transformNode == null) { + // marshall TransformImpl + transformNode = transform.marshal(context, transformsNode, transformNextSibling); + } + transformNextSibling = transformNode.getNextSibling(); + } + + return transformsNode; + } else { + return super.marshal(context, parent, nextSibling); + } + + } + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java new file mode 100644 index 00000000..3f1732ba --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java @@ -0,0 +1,31 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +/** + * Error in the binding to the transport protocol (2xxx) + */ +public class SLBindingException extends SLException { + + public SLBindingException(int errorCode) { + super(errorCode); + } + + public SLBindingException(int errorCode, String msg, Object[] args) { + super(errorCode, msg, args); + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java new file mode 100644 index 00000000..8136a093 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java @@ -0,0 +1,26 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +public class SLCanceledException extends + at.gv.egiz.bku.slexceptions.SLException { + + public SLCanceledException(int errorCode, String msg, Object[] args) { + super(errorCode, msg, args); + // TODO Auto-generated constructor stub + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java new file mode 100644 index 00000000..73ae3325 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java @@ -0,0 +1,30 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +public class SLCommandException extends at.gv.egiz.bku.slexceptions.SLException { + + private static final long serialVersionUID = 1L; + + public SLCommandException(int errorCode) { + super(errorCode); + } + + public SLCommandException(int errorCode, String msg, Object[] args) { + super(errorCode, msg, args); + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java new file mode 100644 index 00000000..4b541deb --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +import java.text.MessageFormat; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +public class SLException extends Exception { + + private static String RESOURCE_BUNDLE_BASE_NAME = "at.gv.egiz.bku.slexceptions.SLExceptionMessages"; + + private static String MISSING_RESOURCE_PATTERN = "MISSING RESOURCE FOR ERROR MESSAGE: {0} ({1})"; + + private static String ILLEGAL_ARGUMENT_MESSAGE = "MESSAGE FORMAT FAILED"; + + private static final long serialVersionUID = 1L; + + private int errorCode; + + private String message; + + private Object[] arguments; + + public SLException(int errorCode) { + this.errorCode = errorCode; + this.message = SLExceptionMessages.STANDARD_PREFIX + Integer.toString(errorCode); + } + + public SLException(int errorCode, String message, Object[] arguments) { + this.errorCode = errorCode; + this.message = message; + this.arguments = arguments; + } + + public int getErrorCode() { + return errorCode; + } + + public String getDetailedMsg() { + return getLocalizedMessage(); + } + + @Override + public String getLocalizedMessage() { + return getLocalizedMessage(Locale.getDefault()); + } + + public String getLocalizedMessage(Locale locale) { + + String pattern; + Object[] arguments = this.arguments; + try { + ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE_NAME, locale); + pattern = bundle.getString(message); + } catch (MissingResourceException e) { + pattern = MISSING_RESOURCE_PATTERN; + arguments = new Object[]{message, e.getMessage()}; + } + + String localizedMessage; + try { + localizedMessage = MessageFormat.format(pattern, arguments); + } catch (IllegalArgumentException e) { + localizedMessage = ILLEGAL_ARGUMENT_MESSAGE + ": " + pattern; + } + + return localizedMessage; + + } + + +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java new file mode 100644 index 00000000..5ce5cba1 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java @@ -0,0 +1,50 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +public final class SLExceptionMessages { + + private SLExceptionMessages() { + } + + public static final String STANDARD_PREFIX = "ec"; + + // + // 3xxx + // + // Error in the XML structure of the command request + + public static final String EC3000_UNCLASSIFIED = "ec3000.unclassified"; + + public static final String EC3002_INVALID = "ec3002.invalid"; + + // + // 4xxx + // + // Error during command execution + + public static final String EC4000_UNCLASSIFIED_INFOBOX_INVALID = "ec4000.infobox.invalid"; + + public static final String EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED = "ec4000.idlink.transfomation.failed"; + + public static final String EC4002_INFOBOX_UNKNOWN = "ec4002.infobox.unknown"; + + public static final String EC4003_NOT_RESOLVED = "ec4003.not.resolved"; + + public static final String EC4011_NOTIMPLEMENTED = "ec4011.notimplemented"; + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java new file mode 100644 index 00000000..548732e6 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java @@ -0,0 +1,30 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +public class SLRequestException extends SLException { + + public SLRequestException(int errorCode) { + super(errorCode); + // TODO Auto-generated constructor stub + } + + public SLRequestException(int errorCode, String msg, Object[] args) { + super(errorCode, msg, args); + // TODO Auto-generated constructor stub + } +} \ No newline at end of file diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java new file mode 100644 index 00000000..d09ca418 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java @@ -0,0 +1,37 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +public class SLRuntimeException extends RuntimeException { + + public SLRuntimeException(String message, Throwable cause) { + super(message, cause); + } + + public SLRuntimeException(String message) { + super(message); + } + + public SLRuntimeException(Throwable cause) { + super(cause); + } + + public SLRuntimeException() { + } + + +} diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java new file mode 100644 index 00000000..1d128a00 --- /dev/null +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slexceptions; + +public class SLViewerException extends SLException { + + public SLViewerException(int errorCode, String msg, Object[] args) { + super(errorCode, msg, args); + // TODO Auto-generated constructor stub + } +} \ No newline at end of file diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd new file mode 100644 index 00000000..594e4415 --- /dev/null +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd @@ -0,0 +1,877 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd new file mode 100644 index 00000000..eeb9db56 --- /dev/null +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd @@ -0,0 +1,145 @@ + + + + + + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + id (as an attribute name): denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + + + + + This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang, xml:space or xml:id + attributes on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes + + + + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2007/08/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself, or with the XML namespace itself. In other words, if the XML + Schema or XML namespaces change, the version of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2007/08/xml.xsd will not change. + + + + + + Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. See + RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry + at http://www.iana.org/assignments/lang-tag-apps.htm for + further information. + + The union allows for the 'un-declaration' of xml:lang with + the empty string. + + + + + + + + + + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for + information about this attribute. + + + + + + See http://www.w3.org/TR/xml-id/ for + information about this attribute. + + + + + + + + + + + diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd new file mode 100644 index 00000000..8422fdfa --- /dev/null +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd new file mode 100644 index 00000000..25fdec88 --- /dev/null +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties new file mode 100644 index 00000000..8e0a09bc --- /dev/null +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties @@ -0,0 +1,97 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +test.noerror=This is a test error-message. No error occurred. + +ec1000=Unclassified error. +ec2000=Unclassified error in the transport binding. +ec2001=HTTP/HTTPS binding: DataURL cannot be resolved. +ec2002=HTTP/HTTPS binding: StylesheetURL cannot be resolved. +ec2003=HTTP/HTTPS binding: RedirectURL cannot be resolved. +ec2004=HTTP/HTTPS binding: XMLRequest parameter missing. +ec2005=HTTP/HTTPS binding: Unknown parameter encoding. +ec2006=HTTP/HTTPS binding: Incorrect parameter encoding. +ec2007=HTTP/HTTPS binding: DataURL server transmits error or unexpected response. +ec2008=HTTP/HTTPS binding: Error in stylesheet obtained from the StylesheetURL. +ec2009=HTTP/HTTPS binding: HTTP request to local CCE directed to unauthorised URL. +ec2010=HTTPS binding: Error while establishing the TLS connection. +ec3000=Unclassified error in the XML structure of the command request. +ec3001=XML structure of the command request is not well formed. +ec3002=XML structure of the command request does not comply with the Security Layer schema. +ec3003=XML structure of the command request contains an invalid combination of optional elements or attributes. +ec3004=XML structure contains an element or attribute whose syntax does not match the Security Layer specification. +ec3005=Protocol version of Security Layer not supported. +ec4000=Unclassified error while processing command. +ec4001=Unknown key box identifier. +ec4002=Unknown info box identifier. +ec4003=Date to be signed cannot be resolved. +ec4004=Supplementary object cannot be resolved. +ec4005=Date to be encrypted cannot be resolved. +ec4006=Algorithm (signature, encryption, digest, canonicalisation, transformation) not supported. +ec4007=Error while executing algorithm (signature, encryption, digest, canonicalisation, transformation). +ec4008=Error while parsing CMS message +ec4009=No matching decryption key. +ec4010=Info box command parameters do not match info box type. +ec4011=Command not implemented. +ec4100=XML document in which the signature is to be integrated cannot be resolved. +ec4101=XML document in which the signature is to be integrated cannot be parsed. +ec4102=Signature cannot be integrated in the existing XML document at the specified location. +ec4103=Signature certificate not contained in the CMS signature. +ec4104=Signed data not contained in the CMS signature or XML request. +ec4105=XML document containing the signature to be verified cannot be resolved. +ec4106=XML document containing the signature to be verified cannot be parsed. +ec4107=There is no XML signature at the specified location within the XML document. +ec4108=Encrypted date cannot be inserted in the existing XML document at the specified location. +ec4109=Existing XML document is required but missing. +ec4110=Existing XML document cannot be resolved. +ec4111=Existing XML document cannot be parsed. +ec4112=Encrypted data encryption keys cannot be inserted in the existing XML document at the specified location. +ec4113=Data to be decrypted not contained in either the CMS message or XML request. +ec4114=XML document to be decrypted cannot be resolved. +ec4115=XML document to be decrypted cannot be parsed. +ec4116=At least one specified encryption element cannot be found in the XML document to be decrypted. +ec4117=No encryption element for binary response. +ec4118=Date to be hashed cannot be resolved. +ec4119=Date for which the hash value is to be verified cannot be resolved. +ec4120=Selected info box identifier already allocated. +ec4121=Info box with specified identifier does not exist. +ec4122=Contents of the selected info box cannot be displayed as XML. +ec4123=Associative array: No entry for the specified key. +ec5000=Unclassified error in the viewer component. +ec5001=Display of data of the mime type specified in the command request not supported. +ec5002=Character encoding of the data to be displayed is invalid or not supported. +ec5003=Data to be displayed contains unsupported characters. +ec5004=Standard display format: HTML does not conform to specification. +ec5005=Standard display format: CSS does not conform to specification. +ec5006=Standard display format: Format of an embedded image does not conform to specification. +ec5007=Standard display format: Signature for embedded images missing or does not conform to specification. +ec6000=Unclassified cancelling by the citizen. +ec6001=Cancelled by the citizen via the user interface. +ec6002=Cancelled because of insufficient rights to execute command. + +# 3xxx +# + +ec3000.unclassified=Error in the XML structure of the command request. {0} +ec3002.invalid=XML structure of the command request does not comply with the Security Layer schema. {0} + +# 4xxx +# + +ec4000.infobox.invalid=The infobox '{0}' contains invalid content. +ec4000.idlink.transfomation.failed=Failed to transform CompressedIdentityLink with Stylesheet {0}. +ec4002.infobox.unknown=Unknown info box identifier {0}. +ec4003.not.resolved=Data to be signed cannot be resolved from URI={0}. +ec4011.notimplemented=Command {0} not implemented. diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties new file mode 100644 index 00000000..cf52a4c3 --- /dev/null +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties @@ -0,0 +1,98 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +test.noerror=Das ist eine Test-Fehlermeldung. Es ist kein Fehler aufgetreten. + +ec1000=Unklassifizierter Fehler. +ec2000=Unklassifizierter Fehler in der Transportbindung. +ec2001=HTTP/HTTPS-Bindung: DataURL kann nicht aufgelöst werden. +ec2002=HTTP/HTTPS-Bindung: StylesheetURL kann nicht aufgelöst werden. +ec2003=HTTP/HTTPS-Bindung: RedirectURL kann nicht aufgelöst werden. +ec2004=HTTP/HTTPS-Bindung: Parameter XMLRequest fehlt. +ec2005=HTTP/HTTPS-Bindung: Unbekannte Kodierung der Parameter. +ec2006=HTTP/HTTPS-Bindung: Fehlerhafte Kodierung der Parameter. +ec2007=HTTP/HTTPS-Bindung: DataURL-Server sendet Fehler oder unerwartete Antwort. +ec2008=HTTP/HTTPS-Bindung: Fehler im Stylesheet, der von der StylesheetURL bezogen wurde. +ec2009=HTTP/HTTPS-Bindung: HTTP-Anfrage an lokale BKU wurde an unerlaubte URL gerichtet. +ec2010=HTTPS-Bindung: Fehler beim Aufbau der TLS-Verbindung. +ec3000=Unklassifizierter Fehler in der XML-Struktur der Befehlsanfrage. +ec3001=XML-Struktur der Befehlsanfrage ist nicht wohlgeformt. +ec3002=XML-Struktur der Befehlsanfrage entspricht nicht dem Schema des Security-Layers. +ec3003=XML-Struktur der Befehlsanfrage enthält eine unerlaubte Kombination aus optionalen Elementen oder Attributen. +ec3004=XML-Struktur enthält ein Element oder Attribut, dessen Syntax nicht der Spezifikation des Security-Layer entspricht. +ec3005=Protokollversion des Security-Layer wird nicht unterstützt. +ec4000=Unklassifizierter Fehler in der Befehlsabarbeitung. +ec4001=Unbekannter Keyboxbezeichner. +ec4002=Unbekannter Infoboxbezeichner. +ec4003=Zu signierendes Datum kann nicht aufgelöst werden. +ec4004=Ergänzungsobjekt kann nicht aufgelöst werden. +ec4005=Zu verschlüsselndes Datum kann nicht aufgelöst werden. +ec4006=Algorithmus (Signatur, Verschlüsselung, Digest, Kanonisierung, Transformation) wird nicht unterstützt. +ec4007=Fehler bei der Algorithmusausführung (Signatur, Verschlüsselung, Digest, Kanonisierung, Transformation). +ec4008=Fehler beim Parsen der CMS-Nachricht. +ec4009=Kein passender Entschlüsselungsschlüssel vorhanden. +ec4010=Parameter des Infobox-Befehls passen nicht zum Typ der Infobox. +ec4011=Befehl ist nicht implementiert. +ec4100=XML-Dokument, in das die Signatur integriert werden soll, kann nicht aufgelöst werden. +ec4101=XML-Dokument, in das die Signatur integriert werden soll, kann nicht geparst werden. +ec4102=Signatur kann nicht am spezifizierten Ort in das bestehende XML-Dokument integriert werden. +ec4103=Signatorzertifikat ist nicht in der CMS-Signatur enthalten. +ec4104=Signierte Daten sind weder in der CMS-Signatur noch im XML-Request enthalten. +ec4105=XML-Dokument, das die zu prüfende Signatur enthält, kann nicht aufgelöst werden. +ec4106=XML-Dokument, das die zu prüfende Signatur enthält, kann nicht geparst werden. +ec4107=Am spezifizierten Ort innerhalb des XML-Dokuments befindet sich keine XML-Signatur. +ec4108=Verschlüsseltes Datum kann nicht am spezifizierten Ort in das bestehende XML-Dokument eingefügt werden. +ec4109=Bestehendes XML-Dokument ist notwendig, aber nicht vorhanden. +ec4110=Bestehendes XML-Dokument kann nicht aufgelöst werden. +ec4111=Bestehendes XML-Dokument kann nicht geparst werden. +ec4112=Verschlüsselte Datenverschlüsselungsschlüssel können nicht am spezifizierten Ort in das bestehende XML-Dokument eingefügt werden. +ec4113=Zu entschlüsselnde Daten sind weder in der CMS-Nachricht noch im XML-Request enthalten. +ec4114=Zu entschlüsselndes XML-Dokument kann nicht aufgelöst werden. +ec4115=Zu entschlüsselndes XML-Dokument kann nicht geparst werden. +ec4116=Zumindest ein spezifiziertes Verschlüsselungselement kann nicht im zu entschlüsselnden XML-Dokument gefunden werden. +ec4117=Kein Verschlüsselungselement für Binärantwort vorhanden. +ec4118=Zu hashendes Datum kann nicht aufgelöst werden. +ec4119=Datum, für das der Hashwert zu prüfen ist, kann nicht aufgelöst werden. +ec4120=Gewählter Infoboxbezeichner bereits vergeben. +ec4121=Infobox mit spezifiziertem Bezeichner existiert nicht. +ec4122=Inhalt der ausgewählten Infobox kann nicht als XML dargestellt werden. +ec4123=Assoziatives Array: Zum spezifizierten Schlüssel existiert kein Eintrag. +ec5000=Unklassifizierter Fehler in der Anzeigekomponente. +ec5001=Anzeige von Daten des in der Befehlsanfrage angegebenen Mime-Types wird nicht unterstützt. +ec5002=Zeichenkodierung der anzuzeigenden Daten ist fehlerhaft oder wird nicht unterstützt. +ec5003=Anzuzeigende Daten enhalten nicht unterstützte Zeichen. +ec5004=Standardanzeigeformat: HTML ist nicht spezifikationskonform. +ec5005=Standardanzeigeformat: CSS ist nicht spezifikationskonform. +ec5006=Standardanzeigeformat: Format eines eingebundenen Bildes ist nicht spezifikationskonform. +ec5007=Standardanzeigeformat: Signatur über eingebundene Bilder fehlt oder ist nicht spezifikationskonform. +ec6000=Unklassifizierter Abbruch durch den Bürger. +ec6001=Abbruch durch den Bürger über die Benutzerschnittstelle. +ec6002=Abbruch auf Grund mangelnder Rechte zur Befehlsausführung. + +# 3xxx +# + +ec3000.unclassified=Unklassifizierter Fehler in der XML-Struktur der Befehlsanfrage. {0} +ec3002.invalid=XML-Struktur der Befehlsanfrage entspricht nicht dem Schema des Security-Layers. {0} + +# 4xxx +# + +ec4000.infobox.invalid=Die Infobox '{0}' enthält ungültige Daten. +ec4000.idlink.transfomation.failed=Die komprimierte Personenbindung konnte mit dem Stylesheet {0} nicht transformiert werden. +ec4002.infobox.unknown=Unbekannter Infoboxbezeichner {0}. +ec4003.not.resolved=Zu signierendes Datum kann nicht aufgelöst werden (URI={0}). +ec4011.notimplemented=Befehl {0} ist nicht implementiert. + diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java new file mode 100644 index 00000000..16d5451a --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java @@ -0,0 +1,46 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +public class BindingProcessorManagerTest { + + @Before + public void setUp() { + IdFactory.getInstance().setNumberOfBits(24*10); + } + + + @Test(expected = UnsupportedOperationException.class) + public void basicCreationTest() { + BindingProcessorManager manager = new BindingProcessorManagerImpl(new DummyStalFactory(), new SLCommandInvokerImpl()); + BindingProcessor bp = manager.createBindingProcessor("http", null); + assertNotNull(bp.getId().toString()); + assertEquals(40, bp.getId().toString().length()); + String hansi = "Hansi"; + bp = manager.createBindingProcessor("http",hansi); + assertEquals(hansi, bp.getId().toString()); + bp = manager.createBindingProcessor("HtTp", null); + assertNotNull(bp); + manager.createBindingProcessor("seppl", null); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java new file mode 100644 index 00000000..d9995fdd --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java @@ -0,0 +1,186 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.bku.binding; + +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slcommands.SLResult; + +import com.sun.net.httpserver.Headers; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.net.InetSocketAddress; +import java.net.URL; +import java.net.URLConnection; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.After; +import static org.junit.Assert.*; + +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * + * @author clemens + */ +public class DataUrlConnectionTest { + + public static final String REQUEST_RESOURCE = "at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt"; + + private static final Log log = LogFactory.getLog(DataUrlConnectionTest.class); + + static HttpServer server; + static BindingProcessor bindingProcessor; + static BindingProcessorManager manager; + + protected InputStream requestStream; + + @BeforeClass + public static void setUpHTTPServer() throws IOException { + log.debug("setting up HTTPServer"); + InetSocketAddress addr = new InetSocketAddress("localhost", 8081); + server = HttpServer.create(addr, 0); + server.createContext("/", new DataUrlHandler()); + server.start(); + + log.debug("setting up HTTPBindingProcessor"); + manager = new BindingProcessorManagerImpl(new DummyStalFactory(), + new SLCommandInvokerImpl()); + bindingProcessor = (HTTPBindingProcessor) manager.createBindingProcessor( + "http", null); + Map headers = new HashMap(); + headers.put("Content-Type", InputDecoderFactory.MULTIPART_FORMDATA + + ";boundary=---------------------------2330864292941"); + ((HTTPBindingProcessor) bindingProcessor).setHTTPHeaders(headers); + } + + @Before + public void setUp() { + requestStream = getClass().getClassLoader().getResourceAsStream( + REQUEST_RESOURCE); + } + + @AfterClass + public static void stopServer() { + if (server != null) { + log.debug("stopping HTTPServer"); + server.stop(0); + } + } + + @Test + public void testBasicNop() { + bindingProcessor.consumeRequestStream(requestStream); + // manager.process(bindingProcessor); + bindingProcessor.run(); + } + +// @Test + public void openConnectionTest() throws Exception { + + URL dataUrl = new URL("http://localhost:8081/"); + + log.debug("creating DataUrlConnection " + dataUrl.toString()); + DataUrlConnectionImpl c = new DataUrlConnectionImpl(); + c.init(dataUrl); + + c.setHTTPHeader("httpHeader_1", "001"); + ByteArrayInputStream bais = new ByteArrayInputStream("Hello, world!" + .getBytes()); + c.setHTTPFormParameter("formParam_1", bais, "text/plain", "UTF-8", null); + + log.debug("open dataUrl connection"); + c.connect(); + //TODO mock SLResult and c.transmit(result); + } + + static class DataUrlHandler implements HttpHandler { + + public DataUrlHandler() { + log.debug("setting up DataUrlHandler"); + } + + @Override + public void handle(HttpExchange exchange) throws IOException { + log.debug("handling incoming request"); + logHTTPHeaders(exchange.getRequestHeaders()); + logRequest(exchange.getRequestBody()); + + log.debug("sending dummy response"); + exchange.getResponseHeaders().add("Content-type", "text/html"); + String response = "" + new Date() + " for " + + exchange.getRequestURI(); + exchange.sendResponseHeaders(200, response.length()); + + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + private void logRequest(InputStream in) throws IOException { + StringBuilder reqLogMsg = new StringBuilder("HTTP request: \n"); + int c = 0; + while ((c = in.read()) != -1) { + reqLogMsg.append((char) c); + } + log.debug(reqLogMsg.toString()); + in.close(); + } + + private void logHTTPHeaders(Headers headers) { + StringBuilder headersLogMsg = new StringBuilder("HTTP headers: \n"); + Set keys = headers.keySet(); + Iterator keysIt = keys.iterator(); + while (keysIt.hasNext()) { + String key = keysIt.next(); + List values = headers.get(key); + Iterator valuesIt = values.iterator(); + headersLogMsg.append(' '); + headersLogMsg.append(key); + headersLogMsg.append(": "); + while (valuesIt.hasNext()) { + headersLogMsg.append(valuesIt.next()); + headersLogMsg.append(' '); + } + headersLogMsg.append('\n'); + } + log.debug(headersLogMsg.toString()); + } + } +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java new file mode 100644 index 00000000..45dcdc3a --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java @@ -0,0 +1,30 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALFactory; + +public class DummyStalFactory implements STALFactory { + + @Override + public STAL createSTAL() { + // TODO Auto-generated method stub + return new at.gv.egiz.stal.dummy.DummySTAL(); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java new file mode 100644 index 00000000..41c69a1d --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java @@ -0,0 +1,65 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import org.junit.Test; +import static org.junit.Assert.*; + +public class ExpiryRemoverTest { + + @Test + public void testMe() throws InterruptedException { + BindingProcessorManager manager = new BindingProcessorManagerImpl(new DummyStalFactory(), + new SLCommandInvokerImpl()); + BindingProcessor bp = manager.createBindingProcessor("http", null); + ExpiryRemover remover = new ExpiryRemover(); + remover.setBindingProcessorManager(manager); + remover.execute(); + manager.process(bp); + remover.execute(); + assertTrue(manager.getManagedIds().size() == 1); + remover.setMaxAcceptedAge(1000); + Thread.sleep(500); + remover.execute(); + assertTrue(manager.getManagedIds().size() == 1); + Thread.sleep(510); + remover.execute(); + assertTrue(manager.getManagedIds().size() == 0); + } + + @Test + public void testMe2() throws InterruptedException { + BindingProcessorManager manager = new BindingProcessorManagerImpl(new DummyStalFactory(), + new SLCommandInvokerImpl()); + BindingProcessor bp = manager.createBindingProcessor("http", null); + ExpiryRemover remover = new ExpiryRemover(); + remover.setBindingProcessorManager(manager); + remover.execute(); + manager.process(bp); + remover.execute(); + assertTrue(manager.getManagedIds().size() == 1); + remover.setMaxAcceptedAge(1000); + Thread.sleep(500); + remover.execute(); + assertTrue(manager.getManagedIds().size() == 1); + bp.updateLastAccessTime(); + Thread.sleep(510); + remover.execute(); + assertTrue(manager.getManagedIds().size() == 1); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java new file mode 100644 index 00000000..38f61aa2 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java @@ -0,0 +1,315 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; + +import at.gv.egiz.bku.binding.MultiTestDataUrlConnection.DataSourceProvider; +import at.gv.egiz.bku.utils.StreamUtil; + +public class HttpBindingProcessorTest { + + public static class TestDataSource implements DataSourceProvider { + + private List responseCodes = new ArrayList(); + private List content = new ArrayList(); + private List> responseHeaders = new ArrayList>(); + private int counter = -1; + + public void resetCounter() { + counter = -1; + } + + public void addResponse(int responseCode, String content, + Map headerMap) { + responseCodes.add(new Integer(responseCode)); + this.content.add(content); + this.responseHeaders.add(headerMap); + } + + @Override + public int getResponseCode() { + return responseCodes.get(counter); + } + + @Override + public String getResponseContent() { + return content.get(counter); + } + + @Override + public Map getResponseHeaders() { + return responseHeaders.get(counter); + } + + @Override + public void nextEvent() { + if (++counter >= responseCodes.size()) { + counter = 0; + } + } + } + + protected BindingProcessorManager manager; + protected HTTPBindingProcessor bindingProcessor; + protected Map serverHeaderMap; + protected Map clientHeaderMap; + protected TestDataUrlConnection server; + + @Before + public void setUp() throws IOException { + server = new TestDataUrlConnection(); + DataUrl.setDataUrlConnectionClass(server); + serverHeaderMap = new HashMap(); + serverHeaderMap.put("Content-Type", HttpUtil.TXT_XML); + server.setResponseCode(200); + server.setResponseContent(""); + server.setResponseHeaders(serverHeaderMap); + manager = new BindingProcessorManagerImpl(new DummyStalFactory(), + new SLCommandInvokerImpl()); + bindingProcessor = (HTTPBindingProcessor) manager.createBindingProcessor( + "http", null); + clientHeaderMap = new HashMap(); + clientHeaderMap.put("Content-Type", + "application/x-www-form-urlencoded;charset=utf8"); + bindingProcessor.setHTTPHeaders(clientHeaderMap); + } + + protected String resultAsString(String encoding) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + bindingProcessor.writeResultTo(baos, encoding); + return new String(baos.toByteArray(), encoding); + } + + @Test + public void testWithoutDataUrlWithoutStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm("Haßnsi", "Wüurzel"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullOperationResponse") != -1); + assertEquals(200, bindingProcessor.getResponseCode()); + assertEquals(0, bindingProcessor.getResponseHeaders().size()); + } + + @Test + public void testWithoutDataUrlWithStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm("Hansi", "Wurzel"); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_HTML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullKommaJosef") != -1); + assertEquals(200, bindingProcessor.getResponseCode()); + assertEquals(0, bindingProcessor.getResponseHeaders().size()); + } + + @Test + public void testWithDataUrl301WithStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(301); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); + assertEquals(301, bindingProcessor.getResponseCode()); + assertTrue(bindingProcessor.getResponseHeaders().size() > 0); + } + + @Test + public void testWithDataUrl302WithStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(302); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); + assertEquals(302, bindingProcessor.getResponseCode()); + assertTrue(bindingProcessor.getResponseHeaders().size() > 0); + } + + @Test + public void testWithDataUrl303WithStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(303); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); + assertEquals(303, bindingProcessor.getResponseCode()); + assertTrue(bindingProcessor.getResponseHeaders().size() > 0); + } + + @Test + public void testWithDataUrl306WithStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(306); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("ErrorResponse") != -1); + assertEquals(200, bindingProcessor.getResponseCode()); + assertTrue(bindingProcessor.getResponseHeaders().size() == 0); + } + + @Test + public void testWithDataUrl307NonXML() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(307); + serverHeaderMap.put("Content-Type", HttpUtil.TXT_PLAIN); + server.setResponseHeaders(serverHeaderMap); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_PLAIN, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); + assertEquals(307, bindingProcessor.getResponseCode()); + assertTrue(bindingProcessor.getResponseHeaders().size() > 0); + } + + @Test + public void testWithInvalidDataUrl307XML() throws IOException { + RequestFactory rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(307); + serverHeaderMap.put("Content-Type", HttpUtil.TXT_XML); + serverHeaderMap.put("Location", "noUrl"); + server.setResponseHeaders(serverHeaderMap); + rf = new RequestFactory(); + server.setResponseContent(rf.getNullOperationXML()); + bindingProcessor.run(); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("ErrorResponse") != -1); + assertEquals(200, bindingProcessor.getResponseCode()); + assertTrue(bindingProcessor.getResponseHeaders().size() == 0); + } + + @Test + public void testWithValidDataUrl307XML() throws IOException, InterruptedException { + server = new MultiTestDataUrlConnection(); + DataUrl.setDataUrlConnectionClass(server); + TestDataSource tds = new TestDataSource(); + ((MultiTestDataUrlConnection)server).setDataSource(tds); + + // first server response with 307 xml and location + RequestFactory rf = new RequestFactory(); + serverHeaderMap = new HashMap(); + serverHeaderMap.put("Location", "http://localhost:8080"); + serverHeaderMap.put("Content-Type", HttpUtil.TXT_XML); + tds.addResponse(307, rf.getNullOperationXML(), serverHeaderMap); + + // 2nd response with 200 text/plain and != + String testString = "CheckMe"; + serverHeaderMap = new HashMap(); + serverHeaderMap.put("Content-Type", HttpUtil.TXT_PLAIN); + String testHeader ="DummyHeader"; + String testHeaderVal ="DummyHeaderVal"; + serverHeaderMap.put(testHeader, testHeaderVal); + tds.addResponse(200, testString, serverHeaderMap); + + rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + bindingProcessor.run(); + + assertTrue(bindingProcessor.getResponseHeaders().size()>0); + assertEquals(testHeaderVal, bindingProcessor.getResponseHeaders().get(testHeader)); + assertEquals(200,bindingProcessor.getResponseCode()); + assertEquals(HttpUtil.TXT_PLAIN, bindingProcessor.getResultContentType()); + assertEquals(testString ,resultAsString("UTF-8")); + } + + @Test + public void testWithValidDataUrl200Urlencoded() throws IOException { + RequestFactory rf = new RequestFactory(); + rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(200); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + serverHeaderMap.put("Content-Type", HttpUtil.APPLICATION_URL_ENCODED); + server.setResponseHeaders(serverHeaderMap); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertTrue(bindingProcessor.getResponseHeaders().size()==0); + assertEquals(200,bindingProcessor.getResponseCode()); + assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullOperationResponse") != -1); + } + + @Test + public void testWithValidDataUrl200UrlencodedAndStylesheet() throws IOException { + RequestFactory rf = new RequestFactory(); + rf = new RequestFactory(); + rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); + bindingProcessor.consumeRequestStream(rf.getURLencoded()); + server.setResponseCode(200); + rf = new RequestFactory(); + rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); + rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); + serverHeaderMap.put("Content-Type", HttpUtil.APPLICATION_URL_ENCODED); + server.setResponseHeaders(serverHeaderMap); + server.setResponseContent(rf.getURLencodedAsString()); + bindingProcessor.run(); + assertTrue(bindingProcessor.getResponseHeaders().size()==0); + assertEquals(200,bindingProcessor.getResponseCode()); + assertEquals(HttpUtil.TXT_HTML, bindingProcessor.getResultContentType()); + assertTrue(resultAsString("UTF-8").indexOf("NullKommaJosef") != -1); + } + + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java new file mode 100644 index 00000000..cd75ec38 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java @@ -0,0 +1,63 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +public class IdFactoryTest { + + @Before + public void setUp() { + IdFactory.getInstance().setNumberOfBits(168); + + } + + @Test + public void testWithString() { + String testString = "Hansi"; + Id hansi = IdFactory.getInstance().createId(testString); + assertEquals(hansi.toString(), testString); + } + + @Test(expected = NullPointerException.class) + public void testFactory() { + IdFactory.getInstance().setSecureRandom(null); + } + + @Test + public void testRandom() { + IdFactory fab = IdFactory.getInstance(); + Id id = fab.createId(); + assertEquals(id.toString().length(), 28); + fab.setNumberOfBits(24); + id = fab.createId(); + assertEquals(id.toString().length(), 4); + } + + @Test + public void testEquals() { + String idString = "Hansi"; + IdFactory fab = IdFactory.getInstance(); + Id id1 = fab.createId(idString); + Id id2 = fab.createId(idString); + assertEquals(id1, id2); + assertEquals(id1.hashCode(), id2.hashCode()); + } +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java new file mode 100644 index 00000000..7d79889d --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java @@ -0,0 +1,96 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Iterator; + +import org.junit.Before; +import org.junit.Test; + +import at.gv.egiz.bku.utils.StreamUtil; + +public class InputDecoderFactoryTest { + + protected String resourceName = "at/gv/egiz/bku/binding/Multipart.txt.bin"; + protected byte[] data; + + @Before + public void setUp() throws IOException { + InputStream is = getClass().getClassLoader().getResourceAsStream( + resourceName); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + byte[] buffer = new byte[1024]; + int i; + + while ((i = is.read(buffer)) != -1) { + bos.write(buffer, 0, i); + } + is.close(); + data = bos.toByteArray(); + } + + @Test + public void testPrefix() { + InputDecoder dec = InputDecoderFactory.getDecoder( + "multipart/form-data; boundary=AaB03x", null); + assertTrue(dec instanceof MultiPartFormDataInputDecoder); + } + + @Test + public void testMultipart() throws IOException { + InputDecoder dec = InputDecoderFactory + .getDecoder( + "multipart/form-data; boundary=---------------------------15671293698853", + new ByteArrayInputStream(data)); + assertNotNull(dec); + for (Iterator fpi = dec.getFormParameterIterator(); fpi + .hasNext();) { + FormParameter fp = fpi.next(); + if (fp.getFormParameterName().equals("XMLRequest")) { + assertEquals("text/xml", fp.getFormParameterContentType()); + return; + } + } + assertTrue(false); + } + + @Test + public void testUrlEncoded() throws IOException { + InputDecoder dec = InputDecoderFactory.getDecoder( + "application/x-www-form-urlencoded", null); + assertTrue(dec instanceof XWWWFormUrlInputDecoder); + dec = InputDecoderFactory.getDecoder( + "application/x-WWW-form-urlencoded;charset=UTF-8", + new ByteArrayInputStream( + "your_name=hansi+wurzel&userid=123&form_name=wasinet".getBytes())); + assertTrue(dec instanceof XWWWFormUrlInputDecoder); + Iterator fpi = dec.getFormParameterIterator(); + FormParameter fp = fpi.next(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + StreamUtil.copyStream(fp.getFormParameterValue(), os); + String value = new String(os.toByteArray(), "UTF-8"); + assertEquals("hansi wurzel", value); + } +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java new file mode 100644 index 00000000..5d2a7544 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java @@ -0,0 +1,49 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.IOException; +import java.util.Map; + +public class MultiTestDataUrlConnection extends TestDataUrlConnection { + + public static interface DataSourceProvider { + public Map getResponseHeaders(); + public String getResponseContent(); + public int getResponseCode(); + public void nextEvent(); + } + + + protected DataSourceProvider dataSource; + + public void setDataSource(DataSourceProvider dataSource) { + this.dataSource = dataSource; + } + + public DataUrlResponse getResponse() throws IOException { + if (dataSource == null) { + return super.getResponse(); + } + dataSource.nextEvent(); + responseHeaders = dataSource.getResponseHeaders(); + responseCode = dataSource.getResponseCode(); + responseContent = dataSource.getResponseContent(); + return super.getResponse(); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java new file mode 100644 index 00000000..7ef1a9bf --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; + +public class MultipartSLRequestTest { + + protected String resourceName = "at/gv/egiz/bku/binding/MultipartFromTutorial.txt"; + + protected BindingProcessor bindingProcessor; + protected InputStream dataStream; + protected BindingProcessorManager manager; + + @Before + public void setUp() { + manager = new BindingProcessorManagerImpl(new DummyStalFactory(), + new SLCommandInvokerImpl()); + HTTPBindingProcessor http = (HTTPBindingProcessor) manager + .createBindingProcessor("http", null); + Map headers = new HashMap(); + headers.put("Content-Type", InputDecoderFactory.MULTIPART_FORMDATA + + ";boundary=---------------------------2330864292941"); + http.setHTTPHeaders(headers); + dataStream = getClass().getClassLoader().getResourceAsStream(resourceName); + bindingProcessor = http; + } + + @Test + public void testBasicNop() { + bindingProcessor.consumeRequestStream(dataStream); + // manager.process(bindingProcessor); + bindingProcessor.run(); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java new file mode 100644 index 00000000..66b9dffb --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java @@ -0,0 +1,52 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; + +public class NullOperationTest { + + protected String resourceName = "at/gv/egiz/bku/binding/NulloperationRequest.txt.bin"; + + protected BindingProcessor bindingProcessor; + protected InputStream dataStream; + protected BindingProcessorManager manager; + + @Before + public void setUp() { + manager = new BindingProcessorManagerImpl(new DummyStalFactory(), new SLCommandInvokerImpl()); + HTTPBindingProcessor http = (HTTPBindingProcessor) manager.createBindingProcessor("http", null); + Map headers = new HashMap(); + headers.put("Content-Type", "application/x-www-form-urlencoded"); + http.setHTTPHeaders(headers); + dataStream = getClass().getClassLoader().getResourceAsStream(resourceName); + bindingProcessor = http; + } + + @Test + public void testBasicNop() { + bindingProcessor.consumeRequestStream(dataStream); + //manager.process(bindingProcessor); + bindingProcessor.run(); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java new file mode 100644 index 00000000..77157a41 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import at.gv.egiz.bku.utils.StreamUtil; + +public class RequestFactory implements FixedFormParameters { + + protected String requestResourceName = "at/gv/egiz/bku/binding/Nulloperation.xml"; + + protected Map formString = new HashMap(); + protected Map formResources = new HashMap(); + + public RequestFactory() { + formResources.put(XMLREQUEST, requestResourceName); + } + + public void addForm(String formName, String content) { + formString.put(formName, content); + } + + public void addFormAsResource(String formName, String resourceName) { + formResources.put(formName, resourceName); + } + + public InputStream getURLencoded() throws IOException { + StringBuffer sb = new StringBuffer(); + for (Iterator si = formString.keySet().iterator(); si.hasNext();) { + String formName = si.next(); + String formVal = formString.get(formName); + sb.append(URLEncoder.encode(formName, "UTF-8")); + sb.append("="); + sb.append(URLEncoder.encode(formVal, "UTF-8")); + if (si.hasNext()) { + sb.append("&"); + } else { + if (formResources.keySet().iterator().hasNext()) { + sb.append("&"); + } + } + } + + for (Iterator si = formResources.keySet().iterator(); si.hasNext();) { + String formName = si.next(); + String formVal = URLEncoder.encode(StreamUtil.asString(getClass() + .getClassLoader().getResourceAsStream(formResources.get(formName)), + "UTF-8"), "UTF-8"); + sb.append(URLEncoder.encode(formName, "UTF-8")); + sb.append("="); + sb.append(formVal); + if (si.hasNext()) { + sb.append("&"); + } + } + return new ByteArrayInputStream(sb.toString().getBytes("UTF-8")); + } + + public String getURLencodedAsString() throws IOException { + StringBuffer sb = new StringBuffer(); + for (Iterator si = formString.keySet().iterator(); si.hasNext();) { + String formName = si.next(); + String formVal = formString.get(formName); + sb.append(URLEncoder.encode(formName, "UTF-8")); + sb.append("="); + sb.append(URLEncoder.encode(formVal, "UTF-8")); + if (si.hasNext()) { + sb.append("&"); + } else { + if (formResources.keySet().iterator().hasNext()) { + sb.append("&"); + } + } + } + + for (Iterator si = formResources.keySet().iterator(); si.hasNext();) { + String formName = si.next(); + String formVal = URLEncoder.encode(StreamUtil.asString(getClass() + .getClassLoader().getResourceAsStream(formResources.get(formName)), + "UTF-8"), "UTF-8"); + sb.append(URLEncoder.encode(formName, "UTF-8")); + sb.append("="); + sb.append(formVal); + if (si.hasNext()) { + sb.append("&"); + } + } + return sb.toString(); + } + + public String getNullOperationXML() throws IOException { + return StreamUtil.asString(getClass().getClassLoader().getResourceAsStream( + requestResourceName), "UTF-8"); + } +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java new file mode 100644 index 00000000..407a556a --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java @@ -0,0 +1,39 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import static org.junit.Assert.assertNotNull; + +import java.io.IOException; +import java.net.URL; + +import org.junit.Test; + + +public class SSLDataUrlConnectionTest { + + @Test + public void testVerisign() throws IOException { + URL url = new URL("https://www.verisign.com:443"); + DataUrlConnectionImpl uc = new DataUrlConnectionImpl(); + uc.init(url); + uc.connect(); + assertNotNull(uc.getServerCertificate()); + //uc.transmit(null); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java b/bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java new file mode 100644 index 00000000..e644f964 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java @@ -0,0 +1,123 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.binding; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.SocketTimeoutException; +import java.net.URL; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Ignore; + +import at.gv.egiz.bku.slcommands.SLResult; + +@Ignore +public class TestDataUrlConnection implements DataUrlConnectionSPI { + + + protected Log log = LogFactory.getLog(TestDataUrlConnection.class); + protected X509Certificate serverCertificate; + protected Map responseHeaders = Collections.EMPTY_MAP; + protected Map requestHeaders = new HashMap(); + protected String responseContent = ""; + protected int responseCode = 200; + + protected URL url; + + @Override + public void init(URL url) { + log.debug("Init Testdataurlconnection to url: " + url); + this.url = url; + } + + @Override + public void connect() throws SocketTimeoutException, IOException { + log.debug("Dummy connect to Testdataurlconnection to url: " + url); + + } + + @Override + public String getProtocol() { + return url.getProtocol(); + } + + @Override + public DataUrlResponse getResponse() throws IOException { + String ct = responseHeaders.get(HttpUtil.HTTP_HEADER_CONTENT_TYPE); + if (ct != null) { + ct = HttpUtil.getCharset(ct, true); + } else { + ct = HttpUtil.DEFAULT_CHARSET; + } + DataUrlResponse response = new DataUrlResponse(url.toString(), responseCode, new ByteArrayInputStream(responseContent.getBytes(ct))); + response.setResponseHttpHeaders(responseHeaders); + return response; + } + + @Override + public X509Certificate getServerCertificate() { + return serverCertificate; + } + + @Override + public void setHTTPFormParameter(String name, InputStream data, + String contentType, String charSet, String transferEncoding) { + // TODO Auto-generated method stub + } + + @Override + public void setHTTPHeader(String key, String value) { + requestHeaders.put(key, value); + } + + @Override + public void transmit(SLResult slResult) throws IOException { + log.debug("Dummy transmit to url: " + url); + } + + public void setServerCertificate(X509Certificate serverCertificate) { + this.serverCertificate = serverCertificate; + } + + public void setResponseHeaders(Map responseHeaders) { + this.responseHeaders = responseHeaders; + } + + public void setResponseContent(String responseContent) { + this.responseContent = responseContent; + } + + public void setResponseCode(int responseCode) { + this.responseCode = responseCode; + } + + public Map getRequestHeaders() { + return requestHeaders; + } + + @Override + public DataUrlConnectionSPI newInstance() { + return this; + } + } diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java new file mode 100644 index 00000000..7b35723d --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java @@ -0,0 +1,78 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands; + +import static org.junit.Assert.assertTrue; + +import java.io.Reader; +import java.io.StringReader; + +import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; + +import org.junit.Before; +import org.junit.Test; + +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; + +public class SLCommandFactoryTest { + + SLCommandFactory factory; + SLCommandContext context; + + @Before + public void setUp() { + factory = SLCommandFactory.getInstance(); + context = new SLCommandContext(); + } + + @Test + public void createNullOperationCommand() throws SLCommandException, SLRuntimeException, SLRequestException { + Reader requestReader = new StringReader( + ""); + Source source = new StreamSource(requestReader); + + SLCommand slCommand = factory.createSLCommand(source, context); + + assertTrue(slCommand instanceof NullOperationCommand); + } + + @Test(expected=SLCommandException.class) + public void createUnsupportedCommand() throws SLCommandException, SLRuntimeException, SLRequestException { + Reader requestReader = new StringReader( + ""); + Source source = new StreamSource(requestReader); + + factory.createSLCommand(source, context); + + } + + @Test(expected=SLRequestException.class) + public void createMalformedCommand() throws SLCommandException, SLRuntimeException, SLRequestException { + Reader requestReader = new StringReader( + "" + + "missplacedContent" + + ""); + Source source = new StreamSource(requestReader); + + factory.createSLCommand(source, context); + + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java new file mode 100644 index 00000000..e97b732e --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java @@ -0,0 +1,100 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import static org.junit.Assert.*; + +import iaik.xml.crypto.XSecProvider; + +import java.io.InputStream; +import java.security.Security; + +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import at.gv.egiz.bku.slcommands.CreateXMLSignatureCommand; +import at.gv.egiz.bku.slcommands.InfoboxReadCommand; +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandContext; +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.dummy.DummySTAL; + +public class CreateXMLSignatureComandImplTest { + + private SLCommandFactory factory; + + private STAL stal; + + @BeforeClass + public static void setUpClass() { + + + Security.addProvider(new STALProvider()); + XSecProvider.addAsProvider(true); + } + + @Before + public void setUp() { + factory = SLCommandFactory.getInstance(); + stal = new DummySTAL(); + } + + @Test + public void testCreateXMLSignatureRequest() throws SLCommandException, SLRuntimeException, SLRequestException { + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml"); + assertNotNull(inputStream); + + SLCommandContext context = new SLCommandContext(); + context.setSTAL(stal); + SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context); + assertTrue(command instanceof CreateXMLSignatureCommand); + + SLResult result = command.execute(); + result.writeTo(new StreamResult(System.out)); + } + +// @Test(expected=SLCommandException.class) + public void testInfboxReadRequestInvalid1() throws SLCommandException, SLRuntimeException, SLRequestException { + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml"); + assertNotNull(inputStream); + + SLCommandContext context = new SLCommandContext(); + SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context); + assertTrue(command instanceof InfoboxReadCommand); + } + +// @Test(expected=SLCommandException.class) + public void testInfboxReadRequestInvalid2() throws SLCommandException, SLRuntimeException, SLRequestException { + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml"); + assertNotNull(inputStream); + + SLCommandContext context = new SLCommandContext(); + SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context); + assertTrue(command instanceof InfoboxReadCommand); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java new file mode 100644 index 00000000..8455e934 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java @@ -0,0 +1,45 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import java.io.ByteArrayOutputStream; + +import javax.xml.transform.stream.StreamResult; + +import org.junit.Test; + +import at.gv.egiz.bku.slcommands.ErrorResult; +import at.gv.egiz.bku.slexceptions.SLException; + +public class ErrorResultImplTest { + + @Test + public void writeTo() { + + SLException slException = new SLException(0,"test.noerror", null); + ErrorResult errorResult = new ErrorResultImpl(slException); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + StreamResult result = new StreamResult(stream); + errorResult.writeTo(result); + + System.out.println(stream.toString()); + + } + + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java new file mode 100644 index 00000000..aadf8d54 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import static org.junit.Assert.*; + +import java.io.InputStream; + +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.junit.Before; +import org.junit.Test; + +import at.gv.egiz.bku.slcommands.InfoboxReadCommand; +import at.gv.egiz.bku.slcommands.SLCommand; +import at.gv.egiz.bku.slcommands.SLCommandContext; +import at.gv.egiz.bku.slcommands.SLCommandFactory; +import at.gv.egiz.bku.slcommands.SLResult; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.slexceptions.SLRuntimeException; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.dummy.DummySTAL; + +public class InfoboxReadComandImplTest { + + private SLCommandFactory factory; + + private STAL stal; + + @Before + public void setUp() { + factory = SLCommandFactory.getInstance(); + stal = new DummySTAL(); + } + + @Test + public void testInfboxReadRequest() throws SLCommandException, SLRuntimeException, SLRequestException { + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml"); + assertNotNull(inputStream); + + SLCommandContext context = new SLCommandContext(); + context.setSTAL(stal); + SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context); + assertTrue(command instanceof InfoboxReadCommand); + + SLResult result = command.execute(); + result.writeTo(new StreamResult(System.out)); + } + + @Test(expected=SLCommandException.class) + public void testInfboxReadRequestInvalid1() throws SLCommandException, SLRuntimeException, SLRequestException { + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml"); + assertNotNull(inputStream); + + SLCommandContext context = new SLCommandContext(); + SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context); + assertTrue(command instanceof InfoboxReadCommand); + } + + @Test(expected=SLCommandException.class) + public void testInfboxReadRequestInvalid2() throws SLCommandException, SLRuntimeException, SLRequestException { + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml"); + assertNotNull(inputStream); + + SLCommandContext context = new SLCommandContext(); + SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context); + assertTrue(command instanceof InfoboxReadCommand); + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java new file mode 100644 index 00000000..8632b67c --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java @@ -0,0 +1,42 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl; + +import java.io.ByteArrayOutputStream; + +import javax.xml.transform.stream.StreamResult; + +import org.junit.Test; + +import at.gv.egiz.bku.slcommands.NullOperationResult; + +public class NullOperationResultImplTest { + + @Test + public void writeTo() { + + NullOperationResult nullOperationResult = new NullOperationResultImpl(); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + StreamResult result = new StreamResult(stream); + nullOperationResult.writeTo(result); + + System.out.println(stream.toString()); + + } + +} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java new file mode 100644 index 00000000..a650d67f --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java @@ -0,0 +1,747 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slcommands.impl.xsect; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import iaik.xml.crypto.XSecProvider; + +import java.io.IOException; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.List; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.crypto.MarshalException; +import javax.xml.crypto.dsig.CanonicalizationMethod; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.Reference; +import javax.xml.crypto.dsig.SignatureMethod; +import javax.xml.crypto.dsig.Transform; +import javax.xml.crypto.dsig.XMLObject; +import javax.xml.crypto.dsig.XMLSignatureException; +import javax.xml.crypto.dsig.XMLSignatureFactory; +import javax.xml.crypto.dsig.dom.DOMSignContext; +import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; +import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec; +import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; + +import org.junit.BeforeClass; +import org.junit.Test; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSOutput; +import org.w3c.dom.ls.LSSerializer; + +import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; +import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; +import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType; +import at.gv.egiz.bku.slexceptions.SLCommandException; +import at.gv.egiz.bku.slexceptions.SLRequestException; +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; +import at.gv.egiz.bku.utils.urldereferencer.URLProtocolHandler; +import at.gv.egiz.dom.DOMUtils; +import at.gv.egiz.slbinding.RedirectEventFilter; +import at.gv.egiz.slbinding.RedirectUnmarshallerListener; + +public class SignatureTest { + + private class AlgorithmMethodFactoryImpl implements AlgorithmMethodFactory { + + @Override + public CanonicalizationMethod createCanonicalizationMethod( + SignatureContext signatureContext) { + + XMLSignatureFactory signatureFactory = signatureContext.getSignatureFactory(); + + try { + return signatureFactory.newCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + public DigestMethod createDigestMethod(SignatureContext signatureContext) { + + XMLSignatureFactory signatureFactory = signatureContext.getSignatureFactory(); + + try { + return signatureFactory.newDigestMethod(DigestMethod.SHA1, (DigestMethodParameterSpec) null); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + public SignatureMethod createSignatureMethod( + SignatureContext signatureContext) { + + XMLSignatureFactory signatureFactory = signatureContext.getSignatureFactory(); + + try { + return signatureFactory.newSignatureMethod(SignatureMethod.RSA_SHA1, (SignatureMethodParameterSpec) null); + } catch (Exception e) { + throw new RuntimeException(e); + } + + } + + } + + private static final String RESOURCE_PREFIX = "at/gv/egiz/bku/slcommands/impl/"; + + private static Unmarshaller unmarshaller; + + private static PrivateKey privateKey; + + private static X509Certificate certificate; + + @BeforeClass + public static void setUpClass() throws JAXBException, NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException, UnrecoverableKeyException { + + XSecProvider.addAsProvider(true); + + String packageName = ObjectFactory.class.getPackage().getName(); + packageName += ":" + + org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); + JAXBContext jaxbContext = JAXBContext.newInstance(packageName); + + unmarshaller = jaxbContext.createUnmarshaller(); + + initURLDereferencer(); + + ClassLoader classLoader = SignatureTest.class.getClassLoader(); + InputStream certStream = classLoader.getResourceAsStream(RESOURCE_PREFIX + "Cert.p12"); + assertNotNull("Certificate not found.", certStream); + + char[] passwd = "1622".toCharArray(); + + KeyStore keystore = KeyStore.getInstance("PKCS12"); + keystore.load(certStream, passwd); + String firstAlias = keystore.aliases().nextElement(); + certificate = (X509Certificate) keystore.getCertificate(firstAlias); + privateKey = (PrivateKey) keystore.getKey(firstAlias, passwd); + + } + + private static void initURLDereferencer() { + + URLDereferencer.getInstance().registerHandler("testlocal", new URLProtocolHandler() { + + @Override + public StreamData dereference(String url, URLDereferencerContext context) + throws IOException { + + ClassLoader classLoader = SignatureTest.class.getClassLoader(); + + String filename = url.split(":", 2)[1]; + + InputStream stream = classLoader.getResourceAsStream(RESOURCE_PREFIX + filename); + + if (stream == null) { + + throw new IOException("Failed to resolve resource '" + url + "'."); + + } else { + + String contentType; + if (filename.endsWith(".xml")) { + contentType = "text/xml"; + } else if (filename.endsWith(".txt")) { + contentType = "text/plain"; + } else { + contentType = ""; + } + + return new StreamData(url, contentType, stream); + + } + + } + + }); + + } + + private Object unmarshal(String file) throws XMLStreamException, JAXBException { + + ClassLoader classLoader = SignatureTest.class.getClassLoader(); + InputStream resourceStream = classLoader.getResourceAsStream(RESOURCE_PREFIX + file); + assertNotNull(resourceStream); + + XMLInputFactory inputFactory = XMLInputFactory.newInstance(); + XMLEventReader eventReader = inputFactory.createXMLEventReader(resourceStream); + RedirectEventFilter redirectEventFilter = new RedirectEventFilter(); + XMLEventReader filteredReader = inputFactory.createFilteredReader(eventReader, redirectEventFilter); + + unmarshaller.setListener(new RedirectUnmarshallerListener(redirectEventFilter)); + + return unmarshaller.unmarshal(filteredReader); + + } + + // + // + // SignatureInfo + // + // + + @SuppressWarnings("unchecked") + private SignatureInfoCreationType unmarshalSignatureInfo(String file) throws JAXBException, XMLStreamException { + + Object object = unmarshal(file); + + Object requestType = ((JAXBElement) object).getValue(); + + assertTrue(requestType instanceof CreateXMLSignatureRequestType); + + SignatureInfoCreationType signatureInfo = ((CreateXMLSignatureRequestType) requestType).getSignatureInfo(); + + assertNotNull(signatureInfo); + + return signatureInfo; + + } + + @Test + public void testSetSignatureInfo_Base64_1() throws JAXBException, SLCommandException, XMLStreamException { + + SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Base64_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), null); + + signature.setSignatureInfo(signatureInfo); + + Node parent = signature.getParent(); + Node nextSibling = signature.getNextSibling(); + + assertNotNull(parent); + assertTrue("urn:document".equals(parent.getNamespaceURI())); + assertTrue("XMLDocument".equals(parent.getLocalName())); + + assertNotNull(nextSibling); + assertTrue("urn:document".equals(nextSibling.getNamespaceURI())); + assertTrue("Paragraph".equals(nextSibling.getLocalName())); + + } + + @Test + public void testSetSignature_Base64_2() throws JAXBException, SLCommandException, XMLStreamException { + + SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Base64_2.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), null); + + signature.setSignatureInfo(signatureInfo); + + Node parent = signature.getParent(); + Node nextSibling = signature.getNextSibling(); + + assertNotNull(parent); + assertTrue("XMLDocument".equals(parent.getLocalName())); + + assertNotNull(nextSibling); + assertTrue("Paragraph".equals(nextSibling.getLocalName())); + + } + + @Test + public void testSetSignature_Base64_3() throws JAXBException, SLCommandException, XMLStreamException { + + SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Base64_3.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), null); + + signature.setSignatureInfo(signatureInfo); + + Node parent = signature.getParent(); + Node nextSibling = signature.getNextSibling(); + + assertNotNull(parent); + assertTrue("XMLDocument".equals(parent.getLocalName())); + + assertNotNull(nextSibling); + assertTrue("Paragraph".equals(nextSibling.getLocalName())); + + } + + @Test + public void testSetSignatureInfo_XMLContent_1() throws JAXBException, SLCommandException, XMLStreamException { + + SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_XMLContent_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), null); + + signature.setSignatureInfo(signatureInfo); + + Node parent = signature.getParent(); + Node nextSibling = signature.getNextSibling(); + + assertNotNull(parent); + assertTrue("urn:document".equals(parent.getNamespaceURI())); + assertTrue("Whole".equals(parent.getLocalName())); + + assertNull(nextSibling); + + } + + @Test + public void testSetSignature_Reference_1() throws JAXBException, SLCommandException, XMLStreamException { + + SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Reference_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), null); + + signature.setSignatureInfo(signatureInfo); + + Node parent = signature.getParent(); + Node nextSibling = signature.getNextSibling(); + + assertNotNull(parent); + assertTrue("urn:document".equals(parent.getNamespaceURI())); + assertTrue("Paragraph".equals(parent.getLocalName())); + + assertNull(nextSibling); + + } + + // + // + // DataObject + // + // + + @SuppressWarnings("unchecked") + private List unmarshalDataObjectInfo(String file) throws JAXBException, XMLStreamException { + + Object object = unmarshal(file); + + Object requestType = ((JAXBElement) object).getValue(); + + assertTrue(requestType instanceof CreateXMLSignatureRequestType); + + List dataObjectInfos = ((CreateXMLSignatureRequestType) requestType).getDataObjectInfo(); + + assertNotNull(dataObjectInfos); + + return dataObjectInfos; + + } + + private void signAndMarshalSignature(Signature signature) throws MarshalException, XMLSignatureException, SLCommandException { + + Node parent = signature.getParent(); + Node nextSibling = signature.getNextSibling(); + + DOMSignContext signContext = (nextSibling == null) + ? new DOMSignContext(privateKey, parent) + : new DOMSignContext(privateKey, parent, nextSibling); + + signature.sign(signContext); + + Document document = signature.getDocument(); + + DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); + LSOutput output = domImplLS.createLSOutput(); + output.setByteStream(System.out); + + LSSerializer serializer = domImplLS.createLSSerializer(); +// serializer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE); + serializer.getDomConfig().setParameter("namespaces", Boolean.FALSE); + serializer.write(document, output); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_Base64Content_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Base64Content_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.setSignerCeritifcate(certificate); + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 1); + + Transform transform = transforms.get(0); + assertTrue(Transform.BASE64.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); + + XMLObject object = objects.get(0); + + assertTrue(("#" + object.getId()).equals(reference.getURI())); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_XMLContent_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_XMLContent_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.setSignerCeritifcate(certificate); + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 2); + + Transform transform = transforms.get(0); + assertTrue(Transform.XPATH2.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); + + XMLObject object = objects.get(0); + + assertTrue(("#" + object.getId()).equals(reference.getURI())); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_XMLContent_2() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_XMLContent_2.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.setSignerCeritifcate(certificate); + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 2); + + Transform transform = transforms.get(0); + assertTrue(Transform.XPATH2.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); + + XMLObject object = objects.get(0); + + assertTrue(("#" + object.getId()).equals(reference.getURI())); + + } + + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_LocRefContent_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_LocRefContent_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 2); + + Transform transform = transforms.get(0); + assertTrue(Transform.XPATH2.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); + + XMLObject object = objects.get(0); + + assertTrue(("#" + object.getId()).equals(reference.getURI())); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_LocRefContent_2() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_LocRefContent_2.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 1); + + Transform transform = transforms.get(0); + assertTrue(Transform.BASE64.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); + + XMLObject object = objects.get(0); + + assertTrue(("#" + object.getId()).equals(reference.getURI())); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_Reference_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Reference_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 1); + + Transform transform = transforms.get(0); + assertTrue(Transform.BASE64.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); + + XMLObject object = objects.get(0); + + assertTrue(("#" + object.getId()).equals(reference.getURI())); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_Detached_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Detached_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 0); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue(objects.size() == 1); + + } + + @SuppressWarnings("unchecked") + @Test + public void testDataObject_Detached_Base64Content() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + List dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Detached_Base64Content.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue(transforms.size() == 0); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue(objects.size() == 1); + + } + + // + // + // TransformsInfo + // + // + + @SuppressWarnings("unchecked") + private CreateXMLSignatureRequestType unmarshalCreateXMLSignatureRequest(String file) throws JAXBException, XMLStreamException { + + Object object = unmarshal(file); + + Object requestType = ((JAXBElement) object).getValue(); + + assertTrue(requestType instanceof CreateXMLSignatureRequestType); + + return (CreateXMLSignatureRequestType) requestType; + + } + + + @SuppressWarnings("unchecked") + @Test + public void testTransformsInfo_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException { + + CreateXMLSignatureRequestType requestType = unmarshalCreateXMLSignatureRequest("TransformsInfo_1.xml"); + + Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); + + + signature.setSignatureInfo(requestType.getSignatureInfo()); + + List dataObjectInfos = requestType.getDataObjectInfo(); + + for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { + signature.addDataObject(dataObjectInfo); + } + + signature.setSignerCeritifcate(certificate); + + signature.buildXMLSignature(); + + signAndMarshalSignature(signature); + + List references = signature.getReferences(); + assertTrue(references.size() == 2); + + Reference reference = references.get(0); + assertNotNull(reference.getId()); + + List transforms = reference.getTransforms(); + assertTrue("Size " + transforms.size() + "", transforms.size() == 3); + + Transform transform = transforms.get(0); + assertTrue(Transform.ENVELOPED.equals(transform.getAlgorithm())); + + List objects = signature.getXMLObjects(); + assertNotNull(objects); + assertTrue("Size " + objects.size() + " but should be 1.", objects.size() == 1); + + } + + +} diff --git a/bkucommon/src/test/java/moaspss/MOASPSSTest.java b/bkucommon/src/test/java/moaspss/MOASPSSTest.java new file mode 100644 index 00000000..21d42176 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/MOASPSSTest.java @@ -0,0 +1,119 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package moaspss; + +import static org.junit.Assert.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.List; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.namespace.QName; + +import moaspss.generated.ContentOptionalRefType; +import moaspss.generated.InputDataType; +import moaspss.generated.MOAFault; +import moaspss.generated.ObjectFactory; +import moaspss.generated.SignatureVerificationPortType; +import moaspss.generated.SignatureVerificationService; +import moaspss.generated.VerifyXMLSignatureRequestType; +import moaspss.generated.VerifyXMLSignatureResponseType; +import moaspss.generated.VerifyXMLSignatureRequestType.VerifySignatureInfo; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +@Ignore +public class MOASPSSTest { + + public static final String REQ_FILE = "TODO.xml"; + private static JAXBContext ctx; + private static SignatureVerificationPortType port; + + @BeforeClass + public static void setUp() throws JAXBException, MalformedURLException { + QName serviceName = new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationService"); + + URL wsdlURL = MOASPSSTest.class.getClassLoader().getResource("MOA-SPSS-1.3.wsdl"); + + assertNotNull(wsdlURL); + + SignatureVerificationService service = new SignatureVerificationService(wsdlURL, serviceName); + + port = service.getSignatureVerificationPort(); + assertNotNull(port); + ctx = JAXBContext.newInstance(VerifyXMLSignatureRequestType.class.getPackage().getName()); + } + + @Test + public void verifySignature() throws JAXBException, IOException { + + InputStream stream = MOASPSSTest.class.getClassLoader().getResourceAsStream("Untitled1.xml"); + assertNotNull(stream); + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + int b; + while ((b = stream.read()) != -1) { + bos.write(b); + } + stream.close(); + + ObjectFactory factory = new ObjectFactory(); + + ContentOptionalRefType contentOptionalRefType = factory.createContentOptionalRefType(); + contentOptionalRefType.setBase64Content(bos.toByteArray()); + + VerifySignatureInfo verifySignatureInfo = factory.createVerifyXMLSignatureRequestTypeVerifySignatureInfo(); + verifySignatureInfo.setVerifySignatureEnvironment(contentOptionalRefType); + verifySignatureInfo.setVerifySignatureLocation("/child::*[1]/child::*[2]"); + + VerifyXMLSignatureRequestType verifyXMLSignatureRequestType = factory.createVerifyXMLSignatureRequestType(); + verifyXMLSignatureRequestType.setVerifySignatureInfo(verifySignatureInfo); + verifyXMLSignatureRequestType.setTrustProfileID("IdentityLink"); + verifyXMLSignatureRequestType.setReturnHashInputData(Boolean.TRUE); + + VerifyXMLSignatureResponseType resp = null; + try { + resp = port.verifyXMLSignature(verifyXMLSignatureRequestType); + } catch (MOAFault e) { + e.printStackTrace(); + } + + JAXBElement verifyXMLSignatureResponse = factory.createVerifyXMLSignatureResponse(resp); + + Marshaller marshaller = ctx.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); + marshaller.marshal(verifyXMLSignatureResponse, System.out); + + List hashInputData = resp.getHashInputData(); + for (InputDataType inputDataType : hashInputData) { + System.out.println("------------------------------------------"); + System.out.println("HashInputData: " + inputDataType.getPartOf() + " " + inputDataType.getReferringSigReference()); + System.out.println("------------------------------------------"); + System.out.write(inputDataType.getBase64Content()); + System.out.println(); + } + } +} diff --git a/bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java b/bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java new file mode 100644 index 00000000..99e28c1a --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java @@ -0,0 +1,64 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for AllSignatoriesType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="AllSignatoriesType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="all"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "AllSignatoriesType") +@XmlEnum +public enum AllSignatoriesType { + + @XmlEnumValue("all") + ALL("all"); + private final String value; + + AllSignatoriesType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static AllSignatoriesType fromValue(String v) { + for (AllSignatoriesType c: AllSignatoriesType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java b/bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java new file mode 100644 index 00000000..81dd4472 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java @@ -0,0 +1,96 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for AnyChildrenType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AnyChildrenType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AnyChildrenType", propOrder = { + "content" +}) +@XmlSeeAlso({ + ReferencesCheckResultInfoType.class, + XMLContentType.class, + ManifestRefsCheckResultInfoType.class +}) +public class AnyChildrenType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Object } + * {@link Element } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java b/bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java new file mode 100644 index 00000000..7356b655 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java @@ -0,0 +1,51 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSContentBaseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSContentBaseType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSContentBaseType") +public class CMSContentBaseType + extends ContentOptionalRefType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java b/bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java new file mode 100644 index 00000000..887e7de5 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java @@ -0,0 +1,106 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSDataObjectOptionalMetaType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSDataObjectOptionalMetaType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}MetaInfoType" minOccurs="0"/>
+ *         <element name="Content" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CMSContentBaseType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSDataObjectOptionalMetaType", propOrder = { + "metaInfo", + "content" +}) +public class CMSDataObjectOptionalMetaType { + + @XmlElement(name = "MetaInfo") + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected CMSContentBaseType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link CMSContentBaseType } + * + */ + public CMSContentBaseType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link CMSContentBaseType } + * + */ + public void setContent(CMSContentBaseType value) { + this.content = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java b/bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java new file mode 100644 index 00000000..889419db --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java @@ -0,0 +1,118 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CanonicalizationMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CanonicalizationMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CanonicalizationMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class CanonicalizationMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CheckResultType.java b/bkucommon/src/test/java/moaspss/generated/CheckResultType.java new file mode 100644 index 00000000..48f28dac --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CheckResultType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CheckResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CheckResultType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *         <element name="Info" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CheckResultType", propOrder = { + "code", + "info" +}) +@XmlSeeAlso({ + ManifestRefsCheckResultType.class, + ReferencesCheckResultType.class +}) +public class CheckResultType { + + @XmlElement(name = "Code", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger code; + @XmlElement(name = "Info") + protected AnyChildrenType info; + + /** + * Gets the value of the code property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getCode() { + return code; + } + + /** + * Sets the value of the code property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setCode(BigInteger value) { + this.code = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link AnyChildrenType } + * + */ + public AnyChildrenType getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link AnyChildrenType } + * + */ + public void setInfo(AnyChildrenType value) { + this.info = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ContentBaseType.java b/bkucommon/src/test/java/moaspss/generated/ContentBaseType.java new file mode 100644 index 00000000..ffd96202 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ContentBaseType.java @@ -0,0 +1,139 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ContentBaseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ContentBaseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="XMLContent" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLContentType"/>
+ *         <element name="LocRefContent" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContentBaseType", propOrder = { + "base64Content", + "xmlContent", + "locRefContent" +}) +@XmlSeeAlso({ + ContentExLocRefBaseType.class, + ContentOptionalRefType.class +}) +public class ContentBaseType { + + @XmlElement(name = "Base64Content") + protected byte[] base64Content; + @XmlElement(name = "XMLContent") + protected XMLContentType xmlContent; + @XmlElement(name = "LocRefContent") + @XmlSchemaType(name = "anyURI") + protected String locRefContent; + + /** + * Gets the value of the base64Content property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getBase64Content() { + return base64Content; + } + + /** + * Sets the value of the base64Content property. + * + * @param value + * allowed object is + * byte[] + */ + public void setBase64Content(byte[] value) { + this.base64Content = ((byte[]) value); + } + + /** + * Gets the value of the xmlContent property. + * + * @return + * possible object is + * {@link XMLContentType } + * + */ + public XMLContentType getXMLContent() { + return xmlContent; + } + + /** + * Sets the value of the xmlContent property. + * + * @param value + * allowed object is + * {@link XMLContentType } + * + */ + public void setXMLContent(XMLContentType value) { + this.xmlContent = value; + } + + /** + * Gets the value of the locRefContent property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocRefContent() { + return locRefContent; + } + + /** + * Sets the value of the locRefContent property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocRefContent(String value) { + this.locRefContent = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java b/bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java new file mode 100644 index 00000000..00a884f0 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java @@ -0,0 +1,56 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ContentExLocRefBaseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ContentExLocRefBaseType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentBaseType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="XMLContent" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLContentType"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContentExLocRefBaseType") +@XmlSeeAlso({ + InputDataType.class +}) +public class ContentExLocRefBaseType + extends ContentBaseType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java b/bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java new file mode 100644 index 00000000..73cdfcf9 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java @@ -0,0 +1,84 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ContentOptionalRefType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ContentOptionalRefType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentBaseType">
+ *       <attribute name="Reference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContentOptionalRefType") +@XmlSeeAlso({ + CMSContentBaseType.class, + ContentRequiredRefType.class, + moaspss.generated.DataObjectInfoType.DataObject.class +}) +public class ContentOptionalRefType + extends ContentBaseType +{ + + @XmlAttribute(name = "Reference") + @XmlSchemaType(name = "anyURI") + protected String reference; + + /** + * Gets the value of the reference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReference() { + return reference; + } + + /** + * Sets the value of the reference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReference(String value) { + this.reference = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java b/bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java new file mode 100644 index 00000000..4b9f7524 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java @@ -0,0 +1,54 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ContentRequiredRefType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ContentRequiredRefType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="XMLContent" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLContentType"/>
+ *         <element name="LocRefContent" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *       </choice>
+ *       <attribute name="Reference" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContentRequiredRefType") +public class ContentRequiredRefType + extends ContentOptionalRefType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java b/bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java new file mode 100644 index 00000000..22d7ef7c --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java @@ -0,0 +1,115 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CreateSignatureLocation" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureLocationType"/>
+ *         <element name="Supplement" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLDataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "createSignatureLocation", + "supplement" +}) +@XmlRootElement(name = "CreateSignatureEnvironmentProfile") +public class CreateSignatureEnvironmentProfile { + + @XmlElement(name = "CreateSignatureLocation", required = true) + protected CreateSignatureLocationType createSignatureLocation; + @XmlElement(name = "Supplement") + protected List supplement; + + /** + * Gets the value of the createSignatureLocation property. + * + * @return + * possible object is + * {@link CreateSignatureLocationType } + * + */ + public CreateSignatureLocationType getCreateSignatureLocation() { + return createSignatureLocation; + } + + /** + * Sets the value of the createSignatureLocation property. + * + * @param value + * allowed object is + * {@link CreateSignatureLocationType } + * + */ + public void setCreateSignatureLocation(CreateSignatureLocationType value) { + this.createSignatureLocation = value; + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XMLDataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java b/bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java new file mode 100644 index 00000000..f6278d07 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java @@ -0,0 +1,109 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CreateSignatureLocationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateSignatureLocationType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>token">
+ *       <attribute name="Index" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateSignatureLocationType", propOrder = { + "value" +}) +public class CreateSignatureLocationType { + + @XmlValue + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String value; + @XmlAttribute(name = "Index", required = true) + protected BigInteger index; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the index property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getIndex() { + return index; + } + + /** + * Sets the value of the index property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setIndex(BigInteger value) { + this.index = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java b/bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java new file mode 100644 index 00000000..d39c2a63 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java @@ -0,0 +1,115 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CreateTransformsInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}TransformsInfoType"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}Supplement" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "createTransformsInfo", + "supplement" +}) +@XmlRootElement(name = "CreateTransformsInfoProfile") +public class CreateTransformsInfoProfile { + + @XmlElement(name = "CreateTransformsInfo", required = true) + protected TransformsInfoType createTransformsInfo; + @XmlElement(name = "Supplement") + protected List supplement; + + /** + * Gets the value of the createTransformsInfo property. + * + * @return + * possible object is + * {@link TransformsInfoType } + * + */ + public TransformsInfoType getCreateTransformsInfo() { + return createTransformsInfo; + } + + /** + * Sets the value of the createTransformsInfo property. + * + * @param value + * allowed object is + * {@link TransformsInfoType } + * + */ + public void setCreateTransformsInfo(TransformsInfoType value) { + this.createTransformsInfo = value; + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XMLDataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java b/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java new file mode 100644 index 00000000..92dc9b4b --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java @@ -0,0 +1,50 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateXMLSignatureRequestType">
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "CreateXMLSignatureRequest") +public class CreateXMLSignatureRequest + extends CreateXMLSignatureRequestType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java b/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java new file mode 100644 index 00000000..aad14567 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java @@ -0,0 +1,466 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CreateXMLSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateXMLSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="KeyIdentifier" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}KeyIdentifierType"/>
+ *         <element name="SingleSignatureInfo" maxOccurs="unbounded">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="DataObjectInfo" maxOccurs="unbounded">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}DataObjectInfoType">
+ *                           <attribute name="ChildOfManifest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                         </extension>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                   <element name="CreateSignatureInfo" minOccurs="0">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <sequence>
+ *                             <element name="CreateSignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/>
+ *                             <choice>
+ *                               <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureEnvironmentProfile"/>
+ *                               <element name="CreateSignatureEnvironmentProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/>
+ *                             </choice>
+ *                           </sequence>
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                 </sequence>
+ *                 <attribute name="SecurityLayerConformity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateXMLSignatureRequestType", propOrder = { + "keyIdentifier", + "singleSignatureInfo" +}) +@XmlSeeAlso({ + CreateXMLSignatureRequest.class +}) +public class CreateXMLSignatureRequestType { + + @XmlElement(name = "KeyIdentifier", required = true) + protected String keyIdentifier; + @XmlElement(name = "SingleSignatureInfo", required = true) + protected List singleSignatureInfo; + + /** + * Gets the value of the keyIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKeyIdentifier() { + return keyIdentifier; + } + + /** + * Sets the value of the keyIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKeyIdentifier(String value) { + this.keyIdentifier = value; + } + + /** + * Gets the value of the singleSignatureInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the singleSignatureInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSingleSignatureInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CreateXMLSignatureRequestType.SingleSignatureInfo } + * + * + */ + public List getSingleSignatureInfo() { + if (singleSignatureInfo == null) { + singleSignatureInfo = new ArrayList(); + } + return this.singleSignatureInfo; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="DataObjectInfo" maxOccurs="unbounded">
+     *           <complexType>
+     *             <complexContent>
+     *               <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}DataObjectInfoType">
+     *                 <attribute name="ChildOfManifest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *               </extension>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *         <element name="CreateSignatureInfo" minOccurs="0">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <sequence>
+     *                   <element name="CreateSignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/>
+     *                   <choice>
+     *                     <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureEnvironmentProfile"/>
+     *                     <element name="CreateSignatureEnvironmentProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/>
+     *                   </choice>
+     *                 </sequence>
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *       <attribute name="SecurityLayerConformity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "dataObjectInfo", + "createSignatureInfo" + }) + public static class SingleSignatureInfo { + + @XmlElement(name = "DataObjectInfo", required = true) + protected List dataObjectInfo; + @XmlElement(name = "CreateSignatureInfo") + protected CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo createSignatureInfo; + @XmlAttribute(name = "SecurityLayerConformity") + protected Boolean securityLayerConformity; + + /** + * Gets the value of the dataObjectInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dataObjectInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getDataObjectInfo().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo } + * + * + */ + public List getDataObjectInfo() { + if (dataObjectInfo == null) { + dataObjectInfo = new ArrayList(); + } + return this.dataObjectInfo; + } + + /** + * Gets the value of the createSignatureInfo property. + * + * @return + * possible object is + * {@link CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo } + * + */ + public CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo getCreateSignatureInfo() { + return createSignatureInfo; + } + + /** + * Sets the value of the createSignatureInfo property. + * + * @param value + * allowed object is + * {@link CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo } + * + */ + public void setCreateSignatureInfo(CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo value) { + this.createSignatureInfo = value; + } + + /** + * Gets the value of the securityLayerConformity property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isSecurityLayerConformity() { + if (securityLayerConformity == null) { + return true; + } else { + return securityLayerConformity; + } + } + + /** + * Sets the value of the securityLayerConformity property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setSecurityLayerConformity(Boolean value) { + this.securityLayerConformity = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+         * <complexType>
+         *   <complexContent>
+         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       <sequence>
+         *         <element name="CreateSignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/>
+         *         <choice>
+         *           <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureEnvironmentProfile"/>
+         *           <element name="CreateSignatureEnvironmentProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/>
+         *         </choice>
+         *       </sequence>
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "createSignatureEnvironment", + "createSignatureEnvironmentProfile", + "createSignatureEnvironmentProfileID" + }) + public static class CreateSignatureInfo { + + @XmlElement(name = "CreateSignatureEnvironment", required = true) + protected ContentOptionalRefType createSignatureEnvironment; + @XmlElement(name = "CreateSignatureEnvironmentProfile") + protected CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile; + @XmlElement(name = "CreateSignatureEnvironmentProfileID") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String createSignatureEnvironmentProfileID; + + /** + * Gets the value of the createSignatureEnvironment property. + * + * @return + * possible object is + * {@link ContentOptionalRefType } + * + */ + public ContentOptionalRefType getCreateSignatureEnvironment() { + return createSignatureEnvironment; + } + + /** + * Sets the value of the createSignatureEnvironment property. + * + * @param value + * allowed object is + * {@link ContentOptionalRefType } + * + */ + public void setCreateSignatureEnvironment(ContentOptionalRefType value) { + this.createSignatureEnvironment = value; + } + + /** + * Gets the value of the createSignatureEnvironmentProfile property. + * + * @return + * possible object is + * {@link CreateSignatureEnvironmentProfile } + * + */ + public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile() { + return createSignatureEnvironmentProfile; + } + + /** + * Sets the value of the createSignatureEnvironmentProfile property. + * + * @param value + * allowed object is + * {@link CreateSignatureEnvironmentProfile } + * + */ + public void setCreateSignatureEnvironmentProfile(CreateSignatureEnvironmentProfile value) { + this.createSignatureEnvironmentProfile = value; + } + + /** + * Gets the value of the createSignatureEnvironmentProfileID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateSignatureEnvironmentProfileID() { + return createSignatureEnvironmentProfileID; + } + + /** + * Sets the value of the createSignatureEnvironmentProfileID property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateSignatureEnvironmentProfileID(String value) { + this.createSignatureEnvironmentProfileID = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+         * <complexType>
+         *   <complexContent>
+         *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}DataObjectInfoType">
+         *       <attribute name="ChildOfManifest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+         *     </extension>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class DataObjectInfo + extends DataObjectInfoType + { + + @XmlAttribute(name = "ChildOfManifest") + protected Boolean childOfManifest; + + /** + * Gets the value of the childOfManifest property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isChildOfManifest() { + if (childOfManifest == null) { + return false; + } else { + return childOfManifest; + } + } + + /** + * Sets the value of the childOfManifest property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setChildOfManifest(Boolean value) { + this.childOfManifest = value; + } + + } + + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java b/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java new file mode 100644 index 00000000..1b320998 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java @@ -0,0 +1,160 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for CreateXMLSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateXMLSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <element name="SignatureEnvironment">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <any/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}ErrorResponse"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateXMLSignatureResponseType", propOrder = { + "signatureEnvironmentOrErrorResponse" +}) +public class CreateXMLSignatureResponseType { + + @XmlElements({ + @XmlElement(name = "ErrorResponse", type = ErrorResponseType.class), + @XmlElement(name = "SignatureEnvironment", type = CreateXMLSignatureResponseType.SignatureEnvironment.class) + }) + protected List signatureEnvironmentOrErrorResponse; + + /** + * Gets the value of the signatureEnvironmentOrErrorResponse property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signatureEnvironmentOrErrorResponse property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignatureEnvironmentOrErrorResponse().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ErrorResponseType } + * {@link CreateXMLSignatureResponseType.SignatureEnvironment } + * + * + */ + public List getSignatureEnvironmentOrErrorResponse() { + if (signatureEnvironmentOrErrorResponse == null) { + signatureEnvironmentOrErrorResponse = new ArrayList(); + } + return this.signatureEnvironmentOrErrorResponse; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <any/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "any" + }) + public static class SignatureEnvironment { + + @XmlAnyElement(lax = true) + protected Object any; + + /** + * Gets the value of the any property. + * + * @return + * possible object is + * {@link Object } + * {@link Element } + * + */ + public Object getAny() { + return any; + } + + /** + * Sets the value of the any property. + * + * @param value + * allowed object is + * {@link Object } + * {@link Element } + * + */ + public void setAny(Object value) { + this.any = value; + } + + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java b/bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java new file mode 100644 index 00000000..085452f4 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java @@ -0,0 +1,236 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DSAKeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DSAKeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <sequence minOccurs="0">
+ *           <element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *           <element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         </sequence>
+ *         <element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *         <element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         <element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *         <sequence minOccurs="0">
+ *           <element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *           <element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         </sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DSAKeyValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "p", + "q", + "g", + "y", + "j", + "seed", + "pgenCounter" +}) +public class DSAKeyValueType { + + @XmlElement(name = "P") + protected byte[] p; + @XmlElement(name = "Q") + protected byte[] q; + @XmlElement(name = "G") + protected byte[] g; + @XmlElement(name = "Y", required = true) + protected byte[] y; + @XmlElement(name = "J") + protected byte[] j; + @XmlElement(name = "Seed") + protected byte[] seed; + @XmlElement(name = "PgenCounter") + protected byte[] pgenCounter; + + /** + * Gets the value of the p property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getP() { + return p; + } + + /** + * Sets the value of the p property. + * + * @param value + * allowed object is + * byte[] + */ + public void setP(byte[] value) { + this.p = ((byte[]) value); + } + + /** + * Gets the value of the q property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getQ() { + return q; + } + + /** + * Sets the value of the q property. + * + * @param value + * allowed object is + * byte[] + */ + public void setQ(byte[] value) { + this.q = ((byte[]) value); + } + + /** + * Gets the value of the g property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getG() { + return g; + } + + /** + * Sets the value of the g property. + * + * @param value + * allowed object is + * byte[] + */ + public void setG(byte[] value) { + this.g = ((byte[]) value); + } + + /** + * Gets the value of the y property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getY() { + return y; + } + + /** + * Sets the value of the y property. + * + * @param value + * allowed object is + * byte[] + */ + public void setY(byte[] value) { + this.y = ((byte[]) value); + } + + /** + * Gets the value of the j property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getJ() { + return j; + } + + /** + * Sets the value of the j property. + * + * @param value + * allowed object is + * byte[] + */ + public void setJ(byte[] value) { + this.j = ((byte[]) value); + } + + /** + * Gets the value of the seed property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getSeed() { + return seed; + } + + /** + * Sets the value of the seed property. + * + * @param value + * allowed object is + * byte[] + */ + public void setSeed(byte[] value) { + this.seed = ((byte[]) value); + } + + /** + * Gets the value of the pgenCounter property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getPgenCounter() { + return pgenCounter; + } + + /** + * Sets the value of the pgenCounter property. + * + * @param value + * allowed object is + * byte[] + */ + public void setPgenCounter(byte[] value) { + this.pgenCounter = ((byte[]) value); + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java b/bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java new file mode 100644 index 00000000..b5f6fe27 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java @@ -0,0 +1,211 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for DataObjectInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DataObjectInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DataObject">
+ *           <complexType>
+ *             <complexContent>
+ *               <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType">
+ *               </extension>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <choice>
+ *           <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateTransformsInfoProfile"/>
+ *           <element name="CreateTransformsInfoProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/>
+ *         </choice>
+ *       </sequence>
+ *       <attribute name="Structure" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="detached"/>
+ *             <enumeration value="enveloping"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DataObjectInfoType", propOrder = { + "dataObject", + "createTransformsInfoProfile", + "createTransformsInfoProfileID" +}) +@XmlSeeAlso({ + moaspss.generated.CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo.class +}) +public class DataObjectInfoType { + + @XmlElement(name = "DataObject", required = true) + protected DataObjectInfoType.DataObject dataObject; + @XmlElement(name = "CreateTransformsInfoProfile") + protected CreateTransformsInfoProfile createTransformsInfoProfile; + @XmlElement(name = "CreateTransformsInfoProfileID") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String createTransformsInfoProfileID; + @XmlAttribute(name = "Structure", required = true) + protected String structure; + + /** + * Gets the value of the dataObject property. + * + * @return + * possible object is + * {@link DataObjectInfoType.DataObject } + * + */ + public DataObjectInfoType.DataObject getDataObject() { + return dataObject; + } + + /** + * Sets the value of the dataObject property. + * + * @param value + * allowed object is + * {@link DataObjectInfoType.DataObject } + * + */ + public void setDataObject(DataObjectInfoType.DataObject value) { + this.dataObject = value; + } + + /** + * Gets the value of the createTransformsInfoProfile property. + * + * @return + * possible object is + * {@link CreateTransformsInfoProfile } + * + */ + public CreateTransformsInfoProfile getCreateTransformsInfoProfile() { + return createTransformsInfoProfile; + } + + /** + * Sets the value of the createTransformsInfoProfile property. + * + * @param value + * allowed object is + * {@link CreateTransformsInfoProfile } + * + */ + public void setCreateTransformsInfoProfile(CreateTransformsInfoProfile value) { + this.createTransformsInfoProfile = value; + } + + /** + * Gets the value of the createTransformsInfoProfileID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateTransformsInfoProfileID() { + return createTransformsInfoProfileID; + } + + /** + * Sets the value of the createTransformsInfoProfileID property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateTransformsInfoProfileID(String value) { + this.createTransformsInfoProfileID = value; + } + + /** + * Gets the value of the structure property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStructure() { + return structure; + } + + /** + * Sets the value of the structure property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStructure(String value) { + this.structure = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType">
+     *     </extension>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class DataObject + extends ContentOptionalRefType + { + + + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/DigestMethodType.java b/bkucommon/src/test/java/moaspss/generated/DigestMethodType.java new file mode 100644 index 00000000..7abbc50f --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/DigestMethodType.java @@ -0,0 +1,120 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for DigestMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DigestMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DigestMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class DigestMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Object } + * {@link Element } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java b/bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java new file mode 100644 index 00000000..e39bcf55 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java @@ -0,0 +1,107 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ErrorResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ErrorResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ErrorCode" type="{http://www.w3.org/2001/XMLSchema}integer"/>
+ *         <element name="Info" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ErrorResponseType", propOrder = { + "errorCode", + "info" +}) +public class ErrorResponseType { + + @XmlElement(name = "ErrorCode", required = true) + protected BigInteger errorCode; + @XmlElement(name = "Info", required = true) + protected String info; + + /** + * Gets the value of the errorCode property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getErrorCode() { + return errorCode; + } + + /** + * Sets the value of the errorCode property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setErrorCode(BigInteger value) { + this.errorCode = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfo(String value) { + this.info = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java b/bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java new file mode 100644 index 00000000..64fff8ed --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java @@ -0,0 +1,82 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for FinalDataMetaInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="FinalDataMetaInfoType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}MetaInfoType">
+ *       <sequence>
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FinalDataMetaInfoType", propOrder = { + "type" +}) +public class FinalDataMetaInfoType + extends MetaInfoType +{ + + @XmlElement(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/InputDataType.java b/bkucommon/src/test/java/moaspss/generated/InputDataType.java new file mode 100644 index 00000000..a95bdce9 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/InputDataType.java @@ -0,0 +1,120 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InputDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InputDataType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentExLocRefBaseType">
+ *       <attribute name="PartOf" default="SignedInfo">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}token">
+ *             <enumeration value="SignedInfo"/>
+ *             <enumeration value="XMLDSIGManifest"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="ReferringSigReference" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InputDataType") +public class InputDataType + extends ContentExLocRefBaseType +{ + + @XmlAttribute(name = "PartOf") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String partOf; + @XmlAttribute(name = "ReferringSigReference") + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger referringSigReference; + + /** + * Gets the value of the partOf property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartOf() { + if (partOf == null) { + return "SignedInfo"; + } else { + return partOf; + } + } + + /** + * Sets the value of the partOf property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartOf(String value) { + this.partOf = value; + } + + /** + * Gets the value of the referringSigReference property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getReferringSigReference() { + return referringSigReference; + } + + /** + * Sets the value of the referringSigReference property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setReferringSigReference(BigInteger value) { + this.referringSigReference = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/KeyInfoType.java b/bkucommon/src/test/java/moaspss/generated/KeyInfoType.java new file mode 100644 index 00000000..d12ac599 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/KeyInfoType.java @@ -0,0 +1,151 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + *

Java class for KeyInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KeyInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyName"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}X509Data"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}PGPData"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SPKIData"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}MgmtData"/>
+ *         <any/>
+ *       </choice>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KeyInfoType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class KeyInfoType { + + @XmlElementRefs({ + @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Element } + * {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} + * {@link String } + * {@link JAXBElement }{@code <}{@link X509DataType }{@code >} + * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} + * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} + * {@link Object } + * {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/KeyStorageType.java b/bkucommon/src/test/java/moaspss/generated/KeyStorageType.java new file mode 100644 index 00000000..b03332aa --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/KeyStorageType.java @@ -0,0 +1,67 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for KeyStorageType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="KeyStorageType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Software"/>
+ *     <enumeration value="Hardware"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "KeyStorageType") +@XmlEnum +public enum KeyStorageType { + + @XmlEnumValue("Software") + SOFTWARE("Software"), + @XmlEnumValue("Hardware") + HARDWARE("Hardware"); + private final String value; + + KeyStorageType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static KeyStorageType fromValue(String v) { + for (KeyStorageType c: KeyStorageType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/KeyValueType.java b/bkucommon/src/test/java/moaspss/generated/KeyValueType.java new file mode 100644 index 00000000..2744b3e7 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/KeyValueType.java @@ -0,0 +1,101 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for KeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue"/>
+ *         <any/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KeyValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class KeyValueType { + + @XmlElementRefs({ + @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link String } + * {@link Object } + * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} + * {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/MOAFault.java b/bkucommon/src/test/java/moaspss/generated/MOAFault.java new file mode 100644 index 00000000..ea986aed --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/MOAFault.java @@ -0,0 +1,70 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.ws.WebFault; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.3-b02- + * Generated source version: 2.1 + * + */ +@WebFault(name = "ErrorResponse", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#") +public class MOAFault + extends Exception +{ + + /** + * Java type that goes as soapenv:Fault detail element. + * + */ + private ErrorResponseType faultInfo; + + /** + * + * @param message + * @param faultInfo + */ + public MOAFault(String message, ErrorResponseType faultInfo) { + super(message); + this.faultInfo = faultInfo; + } + + /** + * + * @param message + * @param faultInfo + * @param cause + */ + public MOAFault(String message, ErrorResponseType faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + } + + /** + * + * @return + * returns fault bean: moaspss.generated.ErrorResponseType + */ + public ErrorResponseType getFaultInfo() { + return faultInfo; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java b/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java new file mode 100644 index 00000000..a6935534 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ManifestRefsCheckResultInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ManifestRefsCheckResultInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType">
+ *       <sequence>
+ *         <any/>
+ *         <element name="FailedReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="ReferringSigReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ManifestRefsCheckResultInfoType") +public class ManifestRefsCheckResultInfoType + extends AnyChildrenType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java b/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java new file mode 100644 index 00000000..96b95ba6 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java @@ -0,0 +1,52 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ManifestRefsCheckResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ManifestRefsCheckResultType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *         <element name="Info" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ManifestRefsCheckResultInfoType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ManifestRefsCheckResultType") +public class ManifestRefsCheckResultType + extends CheckResultType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ManifestType.java b/bkucommon/src/test/java/moaspss/generated/ManifestType.java new file mode 100644 index 00000000..7fcf45ac --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ManifestType.java @@ -0,0 +1,120 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for ManifestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ManifestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ManifestType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "reference" +}) +public class ManifestType { + + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/MetaInfoType.java b/bkucommon/src/test/java/moaspss/generated/MetaInfoType.java new file mode 100644 index 00000000..3c00c24b --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/MetaInfoType.java @@ -0,0 +1,151 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for MetaInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MetaInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MimeType" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}MimeTypeType"/>
+ *         <element name="Description" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MetaInfoType", propOrder = { + "mimeType", + "description", + "any" +}) +@XmlSeeAlso({ + FinalDataMetaInfoType.class +}) +public class MetaInfoType { + + @XmlElement(name = "MimeType", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String mimeType; + @XmlElement(name = "Description") + @XmlSchemaType(name = "anyURI") + protected String description; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the mimeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * Sets the value of the mimeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMimeType(String value) { + this.mimeType = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ObjectFactory.java b/bkucommon/src/test/java/moaspss/generated/ObjectFactory.java new file mode 100644 index 00000000..de270fec --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ObjectFactory.java @@ -0,0 +1,1032 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the moaspss.generated package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _CreateXMLSignatureResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "CreateXMLSignatureResponse"); + private final static QName _PGPData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPData"); + private final static QName _Signature_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Signature"); + private final static QName _DSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DSAKeyValue"); + private final static QName _VerifyCMSSignatureResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "VerifyCMSSignatureResponse"); + private final static QName _SupplementProfile_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "SupplementProfile"); + private final static QName _VerifyXMLSignatureRequest_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "VerifyXMLSignatureRequest"); + private final static QName _SPKIData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKIData"); + private final static QName _SignedInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignedInfo"); + private final static QName _RetrievalMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RetrievalMethod"); + private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod"); + private final static QName _PublicAuthority_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "PublicAuthority"); + private final static QName _Object_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Object"); + private final static QName _SignatureProperty_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperty"); + private final static QName _Transforms_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms"); + private final static QName _Manifest_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Manifest"); + private final static QName _SignatureValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureValue"); + private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform"); + private final static QName _X509Data_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Data"); + private final static QName _SignatureMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureMethod"); + private final static QName _ErrorResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "ErrorResponse"); + private final static QName _KeyInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyInfo"); + private final static QName _DigestMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestMethod"); + private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); + private final static QName _MgmtData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "MgmtData"); + private final static QName _SignatureProperties_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperties"); + private final static QName _KeyName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyName"); + private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue"); + private final static QName _Reference_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Reference"); + private final static QName _VerifyXMLSignatureResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "VerifyXMLSignatureResponse"); + private final static QName _QualifiedCertificate_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "QualifiedCertificate"); + private final static QName _RSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RSAKeyValue"); + private final static QName _Supplement_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "Supplement"); + private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial"); + private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate"); + private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI"); + private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName"); + private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL"); + private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); + private final static QName _VerifyCMSSignatureResponseTypeCertificateCheck_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "CertificateCheck"); + private final static QName _VerifyCMSSignatureResponseTypeSignerInfo_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "SignerInfo"); + private final static QName _VerifyCMSSignatureResponseTypeSignatureCheck_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "SignatureCheck"); + private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); + private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); + private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); + private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: moaspss.generated + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link VerifyXMLSignatureRequestType } + * + */ + public VerifyXMLSignatureRequestType createVerifyXMLSignatureRequestType() { + return new VerifyXMLSignatureRequestType(); + } + + /** + * Create an instance of {@link TransformsType } + * + */ + public TransformsType createTransformsType() { + return new TransformsType(); + } + + /** + * Create an instance of {@link CanonicalizationMethodType } + * + */ + public CanonicalizationMethodType createCanonicalizationMethodType() { + return new CanonicalizationMethodType(); + } + + /** + * Create an instance of {@link PublicAuthorityType } + * + */ + public PublicAuthorityType createPublicAuthorityType() { + return new PublicAuthorityType(); + } + + /** + * Create an instance of {@link ContentExLocRefBaseType } + * + */ + public ContentExLocRefBaseType createContentExLocRefBaseType() { + return new ContentExLocRefBaseType(); + } + + /** + * Create an instance of {@link ManifestRefsCheckResultInfoType } + * + */ + public ManifestRefsCheckResultInfoType createManifestRefsCheckResultInfoType() { + return new ManifestRefsCheckResultInfoType(); + } + + /** + * Create an instance of {@link KeyValueType } + * + */ + public KeyValueType createKeyValueType() { + return new KeyValueType(); + } + + /** + * Create an instance of {@link SignatureType } + * + */ + public SignatureType createSignatureType() { + return new SignatureType(); + } + + /** + * Create an instance of {@link CreateTransformsInfoProfile } + * + */ + public CreateTransformsInfoProfile createCreateTransformsInfoProfile() { + return new CreateTransformsInfoProfile(); + } + + /** + * Create an instance of {@link ManifestType } + * + */ + public ManifestType createManifestType() { + return new ManifestType(); + } + + /** + * Create an instance of {@link CreateSignatureLocationType } + * + */ + public CreateSignatureLocationType createCreateSignatureLocationType() { + return new CreateSignatureLocationType(); + } + + /** + * Create an instance of {@link SignatureValueType } + * + */ + public SignatureValueType createSignatureValueType() { + return new SignatureValueType(); + } + + /** + * Create an instance of {@link ObjectType } + * + */ + public ObjectType createObjectType() { + return new ObjectType(); + } + + /** + * Create an instance of {@link AnyChildrenType } + * + */ + public AnyChildrenType createAnyChildrenType() { + return new AnyChildrenType(); + } + + /** + * Create an instance of {@link X509IssuerSerialType } + * + */ + public X509IssuerSerialType createX509IssuerSerialType() { + return new X509IssuerSerialType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo } + * + */ + public CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo createCreateXMLSignatureRequestTypeSingleSignatureInfoCreateSignatureInfo() { + return new CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo(); + } + + /** + * Create an instance of {@link CreateSignatureEnvironmentProfile } + * + */ + public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile() { + return new CreateSignatureEnvironmentProfile(); + } + + /** + * Create an instance of {@link VerifyXMLSignatureResponseType } + * + */ + public VerifyXMLSignatureResponseType createVerifyXMLSignatureResponseType() { + return new VerifyXMLSignatureResponseType(); + } + + /** + * Create an instance of {@link ReferenceType } + * + */ + public ReferenceType createReferenceType() { + return new ReferenceType(); + } + + /** + * Create an instance of {@link ContentOptionalRefType } + * + */ + public ContentOptionalRefType createContentOptionalRefType() { + return new ContentOptionalRefType(); + } + + /** + * Create an instance of {@link TransformType } + * + */ + public TransformType createTransformType() { + return new TransformType(); + } + + /** + * Create an instance of {@link ReferencesCheckResultInfoType } + * + */ + public ReferencesCheckResultInfoType createReferencesCheckResultInfoType() { + return new ReferencesCheckResultInfoType(); + } + + /** + * Create an instance of {@link VerifyXMLSignatureRequestType.VerifySignatureInfo } + * + */ + public VerifyXMLSignatureRequestType.VerifySignatureInfo createVerifyXMLSignatureRequestTypeVerifySignatureInfo() { + return new VerifyXMLSignatureRequestType.VerifySignatureInfo(); + } + + /** + * Create an instance of {@link VerifyCMSSignatureRequestType } + * + */ + public VerifyCMSSignatureRequestType createVerifyCMSSignatureRequestType() { + return new VerifyCMSSignatureRequestType(); + } + + /** + * Create an instance of {@link ReferencesCheckResultType } + * + */ + public ReferencesCheckResultType createReferencesCheckResultType() { + return new ReferencesCheckResultType(); + } + + /** + * Create an instance of {@link VerifyCMSSignatureResponseType } + * + */ + public VerifyCMSSignatureResponseType createVerifyCMSSignatureResponseType() { + return new VerifyCMSSignatureResponseType(); + } + + /** + * Create an instance of {@link TransformParameterType.Hash } + * + */ + public TransformParameterType.Hash createTransformParameterTypeHash() { + return new TransformParameterType.Hash(); + } + + /** + * Create an instance of {@link SignedInfoType } + * + */ + public SignedInfoType createSignedInfoType() { + return new SignedInfoType(); + } + + /** + * Create an instance of {@link X509DataType } + * + */ + public X509DataType createX509DataType() { + return new X509DataType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo } + * + */ + public CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo createCreateXMLSignatureRequestTypeSingleSignatureInfoDataObjectInfo() { + return new CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo(); + } + + /** + * Create an instance of {@link VerifyXMLSignatureRequestType.SignatureManifestCheckParams } + * + */ + public VerifyXMLSignatureRequestType.SignatureManifestCheckParams createVerifyXMLSignatureRequestTypeSignatureManifestCheckParams() { + return new VerifyXMLSignatureRequestType.SignatureManifestCheckParams(); + } + + /** + * Create an instance of {@link SignaturePropertiesType } + * + */ + public SignaturePropertiesType createSignaturePropertiesType() { + return new SignaturePropertiesType(); + } + + /** + * Create an instance of {@link XMLContentType } + * + */ + public XMLContentType createXMLContentType() { + return new XMLContentType(); + } + + /** + * Create an instance of {@link SPKIDataType } + * + */ + public SPKIDataType createSPKIDataType() { + return new SPKIDataType(); + } + + /** + * Create an instance of {@link MetaInfoType } + * + */ + public MetaInfoType createMetaInfoType() { + return new MetaInfoType(); + } + + /** + * Create an instance of {@link SignaturePropertyType } + * + */ + public SignaturePropertyType createSignaturePropertyType() { + return new SignaturePropertyType(); + } + + /** + * Create an instance of {@link FinalDataMetaInfoType } + * + */ + public FinalDataMetaInfoType createFinalDataMetaInfoType() { + return new FinalDataMetaInfoType(); + } + + /** + * Create an instance of {@link CMSDataObjectOptionalMetaType } + * + */ + public CMSDataObjectOptionalMetaType createCMSDataObjectOptionalMetaType() { + return new CMSDataObjectOptionalMetaType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureRequest } + * + */ + public CreateXMLSignatureRequest createCreateXMLSignatureRequest() { + return new CreateXMLSignatureRequest(); + } + + /** + * Create an instance of {@link TransformParameterType } + * + */ + public TransformParameterType createTransformParameterType() { + return new TransformParameterType(); + } + + /** + * Create an instance of {@link PGPDataType } + * + */ + public PGPDataType createPGPDataType() { + return new PGPDataType(); + } + + /** + * Create an instance of {@link ErrorResponseType } + * + */ + public ErrorResponseType createErrorResponseType() { + return new ErrorResponseType(); + } + + /** + * Create an instance of {@link ContentBaseType } + * + */ + public ContentBaseType createContentBaseType() { + return new ContentBaseType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureResponseType.SignatureEnvironment } + * + */ + public CreateXMLSignatureResponseType.SignatureEnvironment createCreateXMLSignatureResponseTypeSignatureEnvironment() { + return new CreateXMLSignatureResponseType.SignatureEnvironment(); + } + + /** + * Create an instance of {@link XMLDataObjectAssociationType } + * + */ + public XMLDataObjectAssociationType createXMLDataObjectAssociationType() { + return new XMLDataObjectAssociationType(); + } + + /** + * Create an instance of {@link ContentRequiredRefType } + * + */ + public ContentRequiredRefType createContentRequiredRefType() { + return new ContentRequiredRefType(); + } + + /** + * Create an instance of {@link RSAKeyValueType } + * + */ + public RSAKeyValueType createRSAKeyValueType() { + return new RSAKeyValueType(); + } + + /** + * Create an instance of {@link ManifestRefsCheckResultType } + * + */ + public ManifestRefsCheckResultType createManifestRefsCheckResultType() { + return new ManifestRefsCheckResultType(); + } + + /** + * Create an instance of {@link VerifyCMSSignatureRequest } + * + */ + public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest() { + return new VerifyCMSSignatureRequest(); + } + + /** + * Create an instance of {@link InputDataType } + * + */ + public InputDataType createInputDataType() { + return new InputDataType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureResponseType } + * + */ + public CreateXMLSignatureResponseType createCreateXMLSignatureResponseType() { + return new CreateXMLSignatureResponseType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureRequestType } + * + */ + public CreateXMLSignatureRequestType createCreateXMLSignatureRequestType() { + return new CreateXMLSignatureRequestType(); + } + + /** + * Create an instance of {@link VerifyTransformsDataType } + * + */ + public VerifyTransformsDataType createVerifyTransformsDataType() { + return new VerifyTransformsDataType(); + } + + /** + * Create an instance of {@link VerifyTransformsInfoProfile } + * + */ + public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile() { + return new VerifyTransformsInfoProfile(); + } + + /** + * Create an instance of {@link DataObjectInfoType } + * + */ + public DataObjectInfoType createDataObjectInfoType() { + return new DataObjectInfoType(); + } + + /** + * Create an instance of {@link CheckResultType } + * + */ + public CheckResultType createCheckResultType() { + return new CheckResultType(); + } + + /** + * Create an instance of {@link TransformsInfoType } + * + */ + public TransformsInfoType createTransformsInfoType() { + return new TransformsInfoType(); + } + + /** + * Create an instance of {@link KeyInfoType } + * + */ + public KeyInfoType createKeyInfoType() { + return new KeyInfoType(); + } + + /** + * Create an instance of {@link RetrievalMethodType } + * + */ + public RetrievalMethodType createRetrievalMethodType() { + return new RetrievalMethodType(); + } + + /** + * Create an instance of {@link DataObjectInfoType.DataObject } + * + */ + public DataObjectInfoType.DataObject createDataObjectInfoTypeDataObject() { + return new DataObjectInfoType.DataObject(); + } + + /** + * Create an instance of {@link CreateXMLSignatureRequestType.SingleSignatureInfo } + * + */ + public CreateXMLSignatureRequestType.SingleSignatureInfo createCreateXMLSignatureRequestTypeSingleSignatureInfo() { + return new CreateXMLSignatureRequestType.SingleSignatureInfo(); + } + + /** + * Create an instance of {@link DigestMethodType } + * + */ + public DigestMethodType createDigestMethodType() { + return new DigestMethodType(); + } + + /** + * Create an instance of {@link DSAKeyValueType } + * + */ + public DSAKeyValueType createDSAKeyValueType() { + return new DSAKeyValueType(); + } + + /** + * Create an instance of {@link CMSContentBaseType } + * + */ + public CMSContentBaseType createCMSContentBaseType() { + return new CMSContentBaseType(); + } + + /** + * Create an instance of {@link SignatureMethodType } + * + */ + public SignatureMethodType createSignatureMethodType() { + return new SignatureMethodType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateXMLSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "CreateXMLSignatureResponse") + public JAXBElement createCreateXMLSignatureResponse(CreateXMLSignatureResponseType value) { + return new JAXBElement(_CreateXMLSignatureResponse_QNAME, CreateXMLSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PGPDataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPData") + public JAXBElement createPGPData(PGPDataType value) { + return new JAXBElement(_PGPData_QNAME, PGPDataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Signature") + public JAXBElement createSignature(SignatureType value) { + return new JAXBElement(_Signature_QNAME, SignatureType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DSAKeyValue") + public JAXBElement createDSAKeyValue(DSAKeyValueType value) { + return new JAXBElement(_DSAKeyValue_QNAME, DSAKeyValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyCMSSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "VerifyCMSSignatureResponse") + public JAXBElement createVerifyCMSSignatureResponse(VerifyCMSSignatureResponseType value) { + return new JAXBElement(_VerifyCMSSignatureResponse_QNAME, VerifyCMSSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link XMLDataObjectAssociationType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "SupplementProfile") + public JAXBElement createSupplementProfile(XMLDataObjectAssociationType value) { + return new JAXBElement(_SupplementProfile_QNAME, XMLDataObjectAssociationType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyXMLSignatureRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "VerifyXMLSignatureRequest") + public JAXBElement createVerifyXMLSignatureRequest(VerifyXMLSignatureRequestType value) { + return new JAXBElement(_VerifyXMLSignatureRequest_QNAME, VerifyXMLSignatureRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKIData") + public JAXBElement createSPKIData(SPKIDataType value) { + return new JAXBElement(_SPKIData_QNAME, SPKIDataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignedInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignedInfo") + public JAXBElement createSignedInfo(SignedInfoType value) { + return new JAXBElement(_SignedInfo_QNAME, SignedInfoType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RetrievalMethod") + public JAXBElement createRetrievalMethod(RetrievalMethodType value) { + return new JAXBElement(_RetrievalMethod_QNAME, RetrievalMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalizationMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "CanonicalizationMethod") + public JAXBElement createCanonicalizationMethod(CanonicalizationMethodType value) { + return new JAXBElement(_CanonicalizationMethod_QNAME, CanonicalizationMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PublicAuthorityType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "PublicAuthority") + public JAXBElement createPublicAuthority(PublicAuthorityType value) { + return new JAXBElement(_PublicAuthority_QNAME, PublicAuthorityType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ObjectType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Object") + public JAXBElement createObject(ObjectType value) { + return new JAXBElement(_Object_QNAME, ObjectType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertyType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperty") + public JAXBElement createSignatureProperty(SignaturePropertyType value) { + return new JAXBElement(_SignatureProperty_QNAME, SignaturePropertyType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TransformsType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transforms") + public JAXBElement createTransforms(TransformsType value) { + return new JAXBElement(_Transforms_QNAME, TransformsType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ManifestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Manifest") + public JAXBElement createManifest(ManifestType value) { + return new JAXBElement(_Manifest_QNAME, ManifestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureValue") + public JAXBElement createSignatureValue(SignatureValueType value) { + return new JAXBElement(_SignatureValue_QNAME, SignatureValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TransformType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transform") + public JAXBElement createTransform(TransformType value) { + return new JAXBElement(_Transform_QNAME, TransformType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link X509DataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Data") + public JAXBElement createX509Data(X509DataType value) { + return new JAXBElement(_X509Data_QNAME, X509DataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureMethod") + public JAXBElement createSignatureMethod(SignatureMethodType value) { + return new JAXBElement(_SignatureMethod_QNAME, SignatureMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ErrorResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "ErrorResponse") + public JAXBElement createErrorResponse(ErrorResponseType value) { + return new JAXBElement(_ErrorResponse_QNAME, ErrorResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyInfo") + public JAXBElement createKeyInfo(KeyInfoType value) { + return new JAXBElement(_KeyInfo_QNAME, KeyInfoType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DigestMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod") + public JAXBElement createDigestMethod(DigestMethodType value) { + return new JAXBElement(_DigestMethod_QNAME, DigestMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestValue") + public JAXBElement createDigestValue(byte[] value) { + return new JAXBElement(_DigestValue_QNAME, byte[].class, null, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "MgmtData") + public JAXBElement createMgmtData(String value) { + return new JAXBElement(_MgmtData_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperties") + public JAXBElement createSignatureProperties(SignaturePropertiesType value) { + return new JAXBElement(_SignatureProperties_QNAME, SignaturePropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyName") + public JAXBElement createKeyName(String value) { + return new JAXBElement(_KeyName_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link KeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyValue") + public JAXBElement createKeyValue(KeyValueType value) { + return new JAXBElement(_KeyValue_QNAME, KeyValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Reference") + public JAXBElement createReference(ReferenceType value) { + return new JAXBElement(_Reference_QNAME, ReferenceType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyXMLSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "VerifyXMLSignatureResponse") + public JAXBElement createVerifyXMLSignatureResponse(VerifyXMLSignatureResponseType value) { + return new JAXBElement(_VerifyXMLSignatureResponse_QNAME, VerifyXMLSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "QualifiedCertificate") + public JAXBElement createQualifiedCertificate(Object value) { + return new JAXBElement(_QualifiedCertificate_QNAME, Object.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RSAKeyValue") + public JAXBElement createRSAKeyValue(RSAKeyValueType value) { + return new JAXBElement(_RSAKeyValue_QNAME, RSAKeyValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link XMLDataObjectAssociationType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "Supplement") + public JAXBElement createSupplement(XMLDataObjectAssociationType value) { + return new JAXBElement(_Supplement_QNAME, XMLDataObjectAssociationType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509IssuerSerial", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509IssuerSerial(X509IssuerSerialType value) { + return new JAXBElement(_X509DataTypeX509IssuerSerial_QNAME, X509IssuerSerialType.class, X509DataType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Certificate", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509Certificate(byte[] value) { + return new JAXBElement(_X509DataTypeX509Certificate_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SKI", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509SKI(byte[] value) { + return new JAXBElement(_X509DataTypeX509SKI_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SubjectName", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509SubjectName(String value) { + return new JAXBElement(_X509DataTypeX509SubjectName_QNAME, String.class, X509DataType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509CRL", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509CRL(byte[] value) { + return new JAXBElement(_X509DataTypeX509CRL_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) + public JAXBElement createTransformTypeXPath(String value) { + return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CheckResultType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "CertificateCheck", scope = VerifyCMSSignatureResponseType.class) + public JAXBElement createVerifyCMSSignatureResponseTypeCertificateCheck(CheckResultType value) { + return new JAXBElement(_VerifyCMSSignatureResponseTypeCertificateCheck_QNAME, CheckResultType.class, VerifyCMSSignatureResponseType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "SignerInfo", scope = VerifyCMSSignatureResponseType.class) + public JAXBElement createVerifyCMSSignatureResponseTypeSignerInfo(KeyInfoType value) { + return new JAXBElement(_VerifyCMSSignatureResponseTypeSignerInfo_QNAME, KeyInfoType.class, VerifyCMSSignatureResponseType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CheckResultType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "SignatureCheck", scope = VerifyCMSSignatureResponseType.class) + public JAXBElement createVerifyCMSSignatureResponseTypeSignatureCheck(CheckResultType value) { + return new JAXBElement(_VerifyCMSSignatureResponseTypeSignatureCheck_QNAME, CheckResultType.class, VerifyCMSSignatureResponseType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class) + public JAXBElement createPGPDataTypePGPKeyID(byte[] value) { + return new JAXBElement(_PGPDataTypePGPKeyID_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class) + public JAXBElement createPGPDataTypePGPKeyPacket(byte[] value) { + return new JAXBElement(_PGPDataTypePGPKeyPacket_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) + public JAXBElement createSPKIDataTypeSPKISexp(byte[] value) { + return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, byte[].class, SPKIDataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) + public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { + return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ObjectType.java b/bkucommon/src/test/java/moaspss/generated/ObjectType.java new file mode 100644 index 00000000..1ebf8425 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ObjectType.java @@ -0,0 +1,180 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + *

Java class for ObjectType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ObjectType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded" minOccurs="0">
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ObjectType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class ObjectType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAttribute(name = "MimeType") + protected String mimeType; + @XmlAttribute(name = "Encoding") + @XmlSchemaType(name = "anyURI") + protected String encoding; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Object } + * {@link Element } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the mimeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * Sets the value of the mimeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMimeType(String value) { + this.mimeType = value; + } + + /** + * Gets the value of the encoding property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncoding() { + return encoding; + } + + /** + * Sets the value of the encoding property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncoding(String value) { + this.encoding = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/PGPDataType.java b/bkucommon/src/test/java/moaspss/generated/PGPDataType.java new file mode 100644 index 00000000..ca3851f0 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/PGPDataType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for PGPDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PGPDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <sequence>
+ *           <element name="PGPKeyID" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ *           <any/>
+ *         </sequence>
+ *         <sequence>
+ *           <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <any/>
+ *         </sequence>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PGPDataType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class PGPDataType { + + @XmlElementRefs({ + @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the rest of the content model. + * + *

+ * You are getting this "catch-all" property because of the following reason: + * The field name "PGPKeyPacket" is used by two different parts of a schema. See: + * line 208 of file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/xmldsig-core-schema.xsd + * line 203 of file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/xmldsig-core-schema.xsd + *

+ * To get rid of this property, apply a property customization to one + * of both of the following declarations to change their names: + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link Element } + * {@link Object } + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java b/bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java new file mode 100644 index 00000000..c33c353c --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java @@ -0,0 +1,78 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for PublicAuthorityType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PublicAuthorityType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PublicAuthorityType", propOrder = { + "code" +}) +public class PublicAuthorityType { + + @XmlElement(name = "Code") + protected String code; + + /** + * Gets the value of the code property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCode() { + return code; + } + + /** + * Sets the value of the code property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCode(String value) { + this.code = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java b/bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java new file mode 100644 index 00000000..37babf4d --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java @@ -0,0 +1,102 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RSAKeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RSAKeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         <element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RSAKeyValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "modulus", + "exponent" +}) +public class RSAKeyValueType { + + @XmlElement(name = "Modulus", required = true) + protected byte[] modulus; + @XmlElement(name = "Exponent", required = true) + protected byte[] exponent; + + /** + * Gets the value of the modulus property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getModulus() { + return modulus; + } + + /** + * Sets the value of the modulus property. + * + * @param value + * allowed object is + * byte[] + */ + public void setModulus(byte[] value) { + this.modulus = ((byte[]) value); + } + + /** + * Gets the value of the exponent property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getExponent() { + return exponent; + } + + /** + * Sets the value of the exponent property. + * + * @param value + * allowed object is + * byte[] + */ + public void setExponent(byte[] value) { + this.exponent = ((byte[]) value); + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ReferenceType.java b/bkucommon/src/test/java/moaspss/generated/ReferenceType.java new file mode 100644 index 00000000..b46eac19 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ReferenceType.java @@ -0,0 +1,223 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for ReferenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferenceType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "transforms", + "digestMethod", + "digestValue" +}) +public class ReferenceType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlElement(name = "DigestMethod", required = true) + protected DigestMethodType digestMethod; + @XmlElement(name = "DigestValue", required = true) + protected byte[] digestValue; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + @XmlAttribute(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the digestMethod property. + * + * @return + * possible object is + * {@link DigestMethodType } + * + */ + public DigestMethodType getDigestMethod() { + return digestMethod; + } + + /** + * Sets the value of the digestMethod property. + * + * @param value + * allowed object is + * {@link DigestMethodType } + * + */ + public void setDigestMethod(DigestMethodType value) { + this.digestMethod = value; + } + + /** + * Gets the value of the digestValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getDigestValue() { + return digestValue; + } + + /** + * Sets the value of the digestValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setDigestValue(byte[] value) { + this.digestValue = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java b/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java new file mode 100644 index 00000000..f2e6a02d --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java @@ -0,0 +1,52 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ReferencesCheckResultInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferencesCheckResultInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType">
+ *       <sequence>
+ *         <any/>
+ *         <element name="FailedReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferencesCheckResultInfoType") +public class ReferencesCheckResultInfoType + extends AnyChildrenType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java b/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java new file mode 100644 index 00000000..8b94be91 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java @@ -0,0 +1,52 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ReferencesCheckResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferencesCheckResultType">
+ *   <complexContent>
+ *     <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *         <element name="Info" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ReferencesCheckResultInfoType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferencesCheckResultType") +public class ReferencesCheckResultType + extends CheckResultType +{ + + +} diff --git a/bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java b/bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java new file mode 100644 index 00000000..dae84047 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java @@ -0,0 +1,136 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RetrievalMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RetrievalMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RetrievalMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "transforms" +}) +public class RetrievalMethodType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + @XmlAttribute(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SPKIDataType.java b/bkucommon/src/test/java/moaspss/generated/SPKIDataType.java new file mode 100644 index 00000000..1f5cab5b --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SPKIDataType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for SPKIDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SPKIDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SPKIDataType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "spkiSexpAndAny" +}) +public class SPKIDataType { + + @XmlElementRef(name = "SPKISexp", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + @XmlAnyElement(lax = true) + protected List spkiSexpAndAny; + + /** + * Gets the value of the spkiSexpAndAny property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the spkiSexpAndAny property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSPKISexpAndAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link Object } + * {@link Element } + * + * + */ + public List getSPKISexpAndAny() { + if (spkiSexpAndAny == null) { + spkiSexpAndAny = new ArrayList(); + } + return this.spkiSexpAndAny; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java b/bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java new file mode 100644 index 00000000..e92e9fec --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java @@ -0,0 +1,124 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignatureMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class SignatureMethodType { + + @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Object } + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java b/bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java new file mode 100644 index 00000000..b602c9d6 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java @@ -0,0 +1,120 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignaturePropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePropertiesType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "signatureProperty" +}) +public class SignaturePropertiesType { + + @XmlElement(name = "SignatureProperty", required = true) + protected List signatureProperty; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the signatureProperty property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signatureProperty property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignatureProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SignaturePropertyType } + * + * + */ + public List getSignatureProperty() { + if (signatureProperty == null) { + signatureProperty = new ArrayList(); + } + return this.signatureProperty; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java b/bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java new file mode 100644 index 00000000..ebe8c7d0 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java @@ -0,0 +1,153 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + *

Java class for SignaturePropertyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePropertyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <any/>
+ *       </choice>
+ *       <attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePropertyType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class SignaturePropertyType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Target", required = true) + @XmlSchemaType(name = "anyURI") + protected String target; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Object } + * {@link Element } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignatureType.java b/bkucommon/src/test/java/moaspss/generated/SignatureType.java new file mode 100644 index 00000000..0eec1637 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignatureType.java @@ -0,0 +1,204 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignatureType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "signedInfo", + "signatureValue", + "keyInfo", + "object" +}) +public class SignatureType { + + @XmlElement(name = "SignedInfo", required = true) + protected SignedInfoType signedInfo; + @XmlElement(name = "SignatureValue", required = true) + protected SignatureValueType signatureValue; + @XmlElement(name = "KeyInfo") + protected KeyInfoType keyInfo; + @XmlElement(name = "Object") + protected List object; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the signedInfo property. + * + * @return + * possible object is + * {@link SignedInfoType } + * + */ + public SignedInfoType getSignedInfo() { + return signedInfo; + } + + /** + * Sets the value of the signedInfo property. + * + * @param value + * allowed object is + * {@link SignedInfoType } + * + */ + public void setSignedInfo(SignedInfoType value) { + this.signedInfo = value; + } + + /** + * Gets the value of the signatureValue property. + * + * @return + * possible object is + * {@link SignatureValueType } + * + */ + public SignatureValueType getSignatureValue() { + return signatureValue; + } + + /** + * Sets the value of the signatureValue property. + * + * @param value + * allowed object is + * {@link SignatureValueType } + * + */ + public void setSignatureValue(SignatureValueType value) { + this.signatureValue = value; + } + + /** + * Gets the value of the keyInfo property. + * + * @return + * possible object is + * {@link KeyInfoType } + * + */ + public KeyInfoType getKeyInfo() { + return keyInfo; + } + + /** + * Sets the value of the keyInfo property. + * + * @param value + * allowed object is + * {@link KeyInfoType } + * + */ + public void setKeyInfo(KeyInfoType value) { + this.keyInfo = value; + } + + /** + * Gets the value of the object property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the object property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getObject().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ObjectType } + * + * + */ + public List getObject() { + if (object == null) { + object = new ArrayList(); + } + return this.object; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignatureValueType.java b/bkucommon/src/test/java/moaspss/generated/SignatureValueType.java new file mode 100644 index 00000000..3e82e93c --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignatureValueType.java @@ -0,0 +1,108 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignatureValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureValueType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "value" +}) +public class SignatureValueType { + + @XmlValue + protected byte[] value; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * byte[] + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java b/bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java new file mode 100644 index 00000000..a9dd3795 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.xml.bind.annotation.XmlSeeAlso; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.3-b02- + * Generated source version: 2.1 + * + */ +@WebService(name = "SignatureVerificationPortType", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#") +@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface SignatureVerificationPortType { + + + /** + * + * @param body + * @return + * returns moaspss.generated.VerifyXMLSignatureResponseType + * @throws MOAFault + */ + @WebMethod(action = "urn:VerifyXMLSignatureAction") + @WebResult(name = "VerifyXMLSignatureResponse", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", partName = "body") + public VerifyXMLSignatureResponseType verifyXMLSignature( + @WebParam(name = "VerifyXMLSignatureRequest", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", partName = "body") + VerifyXMLSignatureRequestType body) + throws MOAFault + ; + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java b/bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java new file mode 100644 index 00000000..32c2e725 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java @@ -0,0 +1,87 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.logging.Logger; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.3-b02- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "SignatureVerificationService", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", wsdlLocation = "file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/MOA-SPSS-1.3.wsdl") +public class SignatureVerificationService + extends Service +{ + + private final static URL SIGNATUREVERIFICATIONSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(moaspss.generated.SignatureVerificationService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = moaspss.generated.SignatureVerificationService.class.getResource("."); + url = new URL(baseUrl, "file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/MOA-SPSS-1.3.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/MOA-SPSS-1.3.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + SIGNATUREVERIFICATIONSERVICE_WSDL_LOCATION = url; + } + + public SignatureVerificationService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public SignatureVerificationService() { + super(SIGNATUREVERIFICATIONSERVICE_WSDL_LOCATION, new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationService")); + } + + /** + * + * @return + * returns SignatureVerificationPortType + */ + @WebEndpoint(name = "SignatureVerificationPort") + public SignatureVerificationPortType getSignatureVerificationPort() { + return super.getPort(new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationPort"), SignatureVerificationPortType.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns SignatureVerificationPortType + */ + @WebEndpoint(name = "SignatureVerificationPort") + public SignatureVerificationPortType getSignatureVerificationPort(WebServiceFeature... features) { + return super.getPort(new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationPort"), SignatureVerificationPortType.class, features); + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/SignedInfoType.java b/bkucommon/src/test/java/moaspss/generated/SignedInfoType.java new file mode 100644 index 00000000..26261204 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/SignedInfoType.java @@ -0,0 +1,176 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignedInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedInfoType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "canonicalizationMethod", + "signatureMethod", + "reference" +}) +public class SignedInfoType { + + @XmlElement(name = "CanonicalizationMethod", required = true) + protected CanonicalizationMethodType canonicalizationMethod; + @XmlElement(name = "SignatureMethod", required = true) + protected SignatureMethodType signatureMethod; + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the canonicalizationMethod property. + * + * @return + * possible object is + * {@link CanonicalizationMethodType } + * + */ + public CanonicalizationMethodType getCanonicalizationMethod() { + return canonicalizationMethod; + } + + /** + * Sets the value of the canonicalizationMethod property. + * + * @param value + * allowed object is + * {@link CanonicalizationMethodType } + * + */ + public void setCanonicalizationMethod(CanonicalizationMethodType value) { + this.canonicalizationMethod = value; + } + + /** + * Gets the value of the signatureMethod property. + * + * @return + * possible object is + * {@link SignatureMethodType } + * + */ + public SignatureMethodType getSignatureMethod() { + return signatureMethod; + } + + /** + * Sets the value of the signatureMethod property. + * + * @param value + * allowed object is + * {@link SignatureMethodType } + * + */ + public void setSignatureMethod(SignatureMethodType value) { + this.signatureMethod = value; + } + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/TransformParameterType.java b/bkucommon/src/test/java/moaspss/generated/TransformParameterType.java new file mode 100644 index 00000000..62bf071c --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/TransformParameterType.java @@ -0,0 +1,226 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TransformParameterType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformParameterType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="Hash">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ *                   <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </choice>
+ *       <attribute name="URI" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformParameterType", propOrder = { + "base64Content", + "hash" +}) +public class TransformParameterType { + + @XmlElement(name = "Base64Content") + protected byte[] base64Content; + @XmlElement(name = "Hash") + protected TransformParameterType.Hash hash; + @XmlAttribute(name = "URI", required = true) + @XmlSchemaType(name = "anyURI") + protected String uri; + + /** + * Gets the value of the base64Content property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getBase64Content() { + return base64Content; + } + + /** + * Sets the value of the base64Content property. + * + * @param value + * allowed object is + * byte[] + */ + public void setBase64Content(byte[] value) { + this.base64Content = ((byte[]) value); + } + + /** + * Gets the value of the hash property. + * + * @return + * possible object is + * {@link TransformParameterType.Hash } + * + */ + public TransformParameterType.Hash getHash() { + return hash; + } + + /** + * Sets the value of the hash property. + * + * @param value + * allowed object is + * {@link TransformParameterType.Hash } + * + */ + public void setHash(TransformParameterType.Hash value) { + this.hash = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+     *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "digestMethod", + "digestValue" + }) + public static class Hash { + + @XmlElement(name = "DigestMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) + protected DigestMethodType digestMethod; + @XmlElement(name = "DigestValue", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) + protected byte[] digestValue; + + /** + * Gets the value of the digestMethod property. + * + * @return + * possible object is + * {@link DigestMethodType } + * + */ + public DigestMethodType getDigestMethod() { + return digestMethod; + } + + /** + * Sets the value of the digestMethod property. + * + * @param value + * allowed object is + * {@link DigestMethodType } + * + */ + public void setDigestMethod(DigestMethodType value) { + this.digestMethod = value; + } + + /** + * Gets the value of the digestValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getDigestValue() { + return digestValue; + } + + /** + * Sets the value of the digestValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setDigestValue(byte[] value) { + this.digestValue = ((byte[]) value); + } + + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/TransformType.java b/bkucommon/src/test/java/moaspss/generated/TransformType.java new file mode 100644 index 00000000..192843c5 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/TransformType.java @@ -0,0 +1,125 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for TransformType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <any/>
+ *         <element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </choice>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "content" +}) +public class TransformType { + + @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Object } + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java b/bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java new file mode 100644 index 00000000..1977f157 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java @@ -0,0 +1,106 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TransformsInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformsInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element name="FinalDataMetaInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}FinalDataMetaInfoType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformsInfoType", propOrder = { + "transforms", + "finalDataMetaInfo" +}) +public class TransformsInfoType { + + @XmlElement(name = "Transforms", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected TransformsType transforms; + @XmlElement(name = "FinalDataMetaInfo", required = true) + protected FinalDataMetaInfoType finalDataMetaInfo; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the finalDataMetaInfo property. + * + * @return + * possible object is + * {@link FinalDataMetaInfoType } + * + */ + public FinalDataMetaInfoType getFinalDataMetaInfo() { + return finalDataMetaInfo; + } + + /** + * Sets the value of the finalDataMetaInfo property. + * + * @param value + * allowed object is + * {@link FinalDataMetaInfoType } + * + */ + public void setFinalDataMetaInfo(FinalDataMetaInfoType value) { + this.finalDataMetaInfo = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/TransformsType.java b/bkucommon/src/test/java/moaspss/generated/TransformsType.java new file mode 100644 index 00000000..25510db9 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/TransformsType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TransformsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformsType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "transform" +}) +public class TransformsType { + + @XmlElement(name = "Transform", required = true) + protected List transform; + + /** + * Gets the value of the transform property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transform property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTransform().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TransformType } + * + * + */ + public List getTransform() { + if (transform == null) { + transform = new ArrayList(); + } + return this.transform; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java b/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java new file mode 100644 index 00000000..ced1e0c5 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyCMSSignatureRequestType">
+ *       <attribute name="Signatories" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}SignatoriesType" default="1" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "VerifyCMSSignatureRequest") +public class VerifyCMSSignatureRequest + extends VerifyCMSSignatureRequestType +{ + + @XmlAttribute(name = "Signatories") + protected List signatories; + + /** + * Gets the value of the signatories property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signatories property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignatories().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getSignatories() { + if (signatories == null) { + signatories = new ArrayList(); + } + return this.signatories; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java b/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java new file mode 100644 index 00000000..ca514c70 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java @@ -0,0 +1,171 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for VerifyCMSSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyCMSSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="CMSSignature" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="DataObject" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ *         <element name="TrustProfileID" type="{http://www.w3.org/2001/XMLSchema}token"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyCMSSignatureRequestType", propOrder = { + "dateTime", + "cmsSignature", + "dataObject", + "trustProfileID" +}) +@XmlSeeAlso({ + VerifyCMSSignatureRequest.class +}) +public class VerifyCMSSignatureRequestType { + + @XmlElement(name = "DateTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar dateTime; + @XmlElement(name = "CMSSignature", required = true) + protected byte[] cmsSignature; + @XmlElement(name = "DataObject") + protected CMSDataObjectOptionalMetaType dataObject; + @XmlElement(name = "TrustProfileID", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String trustProfileID; + + /** + * Gets the value of the dateTime property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDateTime() { + return dateTime; + } + + /** + * Sets the value of the dateTime property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDateTime(XMLGregorianCalendar value) { + this.dateTime = value; + } + + /** + * Gets the value of the cmsSignature property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getCMSSignature() { + return cmsSignature; + } + + /** + * Sets the value of the cmsSignature property. + * + * @param value + * allowed object is + * byte[] + */ + public void setCMSSignature(byte[] value) { + this.cmsSignature = ((byte[]) value); + } + + /** + * Gets the value of the dataObject property. + * + * @return + * possible object is + * {@link CMSDataObjectOptionalMetaType } + * + */ + public CMSDataObjectOptionalMetaType getDataObject() { + return dataObject; + } + + /** + * Sets the value of the dataObject property. + * + * @param value + * allowed object is + * {@link CMSDataObjectOptionalMetaType } + * + */ + public void setDataObject(CMSDataObjectOptionalMetaType value) { + this.dataObject = value; + } + + /** + * Gets the value of the trustProfileID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTrustProfileID() { + return trustProfileID; + } + + /** + * Sets the value of the trustProfileID property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTrustProfileID(String value) { + this.trustProfileID = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java b/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java new file mode 100644 index 00000000..65508d4f --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java @@ -0,0 +1,95 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerifyCMSSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyCMSSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <element name="SignerInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/>
+ *         <element name="SignatureCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"/>
+ *         <element name="CertificateCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyCMSSignatureResponseType", propOrder = { + "signerInfoAndSignatureCheckAndCertificateCheck" +}) +public class VerifyCMSSignatureResponseType { + + @XmlElementRefs({ + @XmlElementRef(name = "CertificateCheck", namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", type = JAXBElement.class), + @XmlElementRef(name = "SignerInfo", namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", type = JAXBElement.class), + @XmlElementRef(name = "SignatureCheck", namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", type = JAXBElement.class) + }) + protected List> signerInfoAndSignatureCheckAndCertificateCheck; + + /** + * Gets the value of the signerInfoAndSignatureCheckAndCertificateCheck property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signerInfoAndSignatureCheckAndCertificateCheck property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignerInfoAndSignatureCheckAndCertificateCheck().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >} + * {@link JAXBElement }{@code <}{@link CheckResultType }{@code >} + * {@link JAXBElement }{@code <}{@link CheckResultType }{@code >} + * + * + */ + public List> getSignerInfoAndSignatureCheckAndCertificateCheck() { + if (signerInfoAndSignatureCheckAndCertificateCheck == null) { + signerInfoAndSignatureCheckAndCertificateCheck = new ArrayList>(); + } + return this.signerInfoAndSignatureCheckAndCertificateCheck; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java b/bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java new file mode 100644 index 00000000..85bc0303 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java @@ -0,0 +1,91 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerifyTransformsDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyTransformsDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyTransformsInfoProfile"/>
+ *         <element name="VerifyTransformsInfoProfileID" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyTransformsDataType", propOrder = { + "verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID" +}) +public class VerifyTransformsDataType { + + @XmlElements({ + @XmlElement(name = "VerifyTransformsInfoProfile", type = VerifyTransformsInfoProfile.class), + @XmlElement(name = "VerifyTransformsInfoProfileID", type = String.class) + }) + protected List verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID; + + /** + * Gets the value of the verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getVerifyTransformsInfoProfileOrVerifyTransformsInfoProfileID().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link VerifyTransformsInfoProfile } + * {@link String } + * + * + */ + public List getVerifyTransformsInfoProfileOrVerifyTransformsInfoProfileID() { + if (verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID == null) { + verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID = new ArrayList(); + } + return this.verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java b/bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java new file mode 100644 index 00000000..9e023df1 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java @@ -0,0 +1,115 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element name="TransformParameter" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}TransformParameterType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "transforms", + "transformParameter" +}) +@XmlRootElement(name = "VerifyTransformsInfoProfile") +public class VerifyTransformsInfoProfile { + + @XmlElement(name = "Transforms", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected TransformsType transforms; + @XmlElement(name = "TransformParameter") + protected List transformParameter; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the transformParameter property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transformParameter property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTransformParameter().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TransformParameterType } + * + * + */ + public List getTransformParameter() { + if (transformParameter == null) { + transformParameter = new ArrayList(); + } + return this.transformParameter; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java b/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java new file mode 100644 index 00000000..4d0c09b7 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java @@ -0,0 +1,439 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for VerifyXMLSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyXMLSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="VerifySignatureInfo">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="VerifySignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/>
+ *                   <element name="VerifySignatureLocation" type="{http://www.w3.org/2001/XMLSchema}token"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <choice maxOccurs="unbounded" minOccurs="0">
+ *           <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}SupplementProfile"/>
+ *           <element name="SupplementProfileID" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         </choice>
+ *         <element name="SignatureManifestCheckParams" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="ReferenceInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyTransformsDataType" maxOccurs="unbounded"/>
+ *                 </sequence>
+ *                 <attribute name="ReturnReferenceInputData" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="ReturnHashInputData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
+ *         <element name="TrustProfileID" type="{http://www.w3.org/2001/XMLSchema}token"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyXMLSignatureRequestType", propOrder = { + "dateTime", + "verifySignatureInfo", + "supplementProfileOrSupplementProfileID", + "signatureManifestCheckParams", + "returnHashInputData", + "trustProfileID" +}) +public class VerifyXMLSignatureRequestType { + + @XmlElement(name = "DateTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar dateTime; + @XmlElement(name = "VerifySignatureInfo", required = true) + protected VerifyXMLSignatureRequestType.VerifySignatureInfo verifySignatureInfo; + @XmlElements({ + @XmlElement(name = "SupplementProfileID", type = String.class), + @XmlElement(name = "SupplementProfile", type = XMLDataObjectAssociationType.class) + }) + protected List supplementProfileOrSupplementProfileID; + @XmlElement(name = "SignatureManifestCheckParams") + protected VerifyXMLSignatureRequestType.SignatureManifestCheckParams signatureManifestCheckParams; + @XmlElement(name = "ReturnHashInputData") + protected Object returnHashInputData; + @XmlElement(name = "TrustProfileID", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String trustProfileID; + + /** + * Gets the value of the dateTime property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDateTime() { + return dateTime; + } + + /** + * Sets the value of the dateTime property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDateTime(XMLGregorianCalendar value) { + this.dateTime = value; + } + + /** + * Gets the value of the verifySignatureInfo property. + * + * @return + * possible object is + * {@link VerifyXMLSignatureRequestType.VerifySignatureInfo } + * + */ + public VerifyXMLSignatureRequestType.VerifySignatureInfo getVerifySignatureInfo() { + return verifySignatureInfo; + } + + /** + * Sets the value of the verifySignatureInfo property. + * + * @param value + * allowed object is + * {@link VerifyXMLSignatureRequestType.VerifySignatureInfo } + * + */ + public void setVerifySignatureInfo(VerifyXMLSignatureRequestType.VerifySignatureInfo value) { + this.verifySignatureInfo = value; + } + + /** + * Gets the value of the supplementProfileOrSupplementProfileID property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplementProfileOrSupplementProfileID property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplementProfileOrSupplementProfileID().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link XMLDataObjectAssociationType } + * + * + */ + public List getSupplementProfileOrSupplementProfileID() { + if (supplementProfileOrSupplementProfileID == null) { + supplementProfileOrSupplementProfileID = new ArrayList(); + } + return this.supplementProfileOrSupplementProfileID; + } + + /** + * Gets the value of the signatureManifestCheckParams property. + * + * @return + * possible object is + * {@link VerifyXMLSignatureRequestType.SignatureManifestCheckParams } + * + */ + public VerifyXMLSignatureRequestType.SignatureManifestCheckParams getSignatureManifestCheckParams() { + return signatureManifestCheckParams; + } + + /** + * Sets the value of the signatureManifestCheckParams property. + * + * @param value + * allowed object is + * {@link VerifyXMLSignatureRequestType.SignatureManifestCheckParams } + * + */ + public void setSignatureManifestCheckParams(VerifyXMLSignatureRequestType.SignatureManifestCheckParams value) { + this.signatureManifestCheckParams = value; + } + + /** + * Gets the value of the returnHashInputData property. + * + * @return + * possible object is + * {@link Object } + * + */ + public Object getReturnHashInputData() { + return returnHashInputData; + } + + /** + * Sets the value of the returnHashInputData property. + * + * @param value + * allowed object is + * {@link Object } + * + */ + public void setReturnHashInputData(Object value) { + this.returnHashInputData = value; + } + + /** + * Gets the value of the trustProfileID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTrustProfileID() { + return trustProfileID; + } + + /** + * Sets the value of the trustProfileID property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTrustProfileID(String value) { + this.trustProfileID = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="ReferenceInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyTransformsDataType" maxOccurs="unbounded"/>
+     *       </sequence>
+     *       <attribute name="ReturnReferenceInputData" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "referenceInfo" + }) + public static class SignatureManifestCheckParams { + + @XmlElement(name = "ReferenceInfo", required = true) + protected List referenceInfo; + @XmlAttribute(name = "ReturnReferenceInputData") + protected Boolean returnReferenceInputData; + + /** + * Gets the value of the referenceInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the referenceInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getReferenceInfo().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link VerifyTransformsDataType } + * + * + */ + public List getReferenceInfo() { + if (referenceInfo == null) { + referenceInfo = new ArrayList(); + } + return this.referenceInfo; + } + + /** + * Gets the value of the returnReferenceInputData property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isReturnReferenceInputData() { + if (returnReferenceInputData == null) { + return true; + } else { + return returnReferenceInputData; + } + } + + /** + * Sets the value of the returnReferenceInputData property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setReturnReferenceInputData(Boolean value) { + this.returnReferenceInputData = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="VerifySignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/>
+     *         <element name="VerifySignatureLocation" type="{http://www.w3.org/2001/XMLSchema}token"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "verifySignatureEnvironment", + "verifySignatureLocation" + }) + public static class VerifySignatureInfo { + + @XmlElement(name = "VerifySignatureEnvironment", required = true) + protected ContentOptionalRefType verifySignatureEnvironment; + @XmlElement(name = "VerifySignatureLocation", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String verifySignatureLocation; + + /** + * Gets the value of the verifySignatureEnvironment property. + * + * @return + * possible object is + * {@link ContentOptionalRefType } + * + */ + public ContentOptionalRefType getVerifySignatureEnvironment() { + return verifySignatureEnvironment; + } + + /** + * Sets the value of the verifySignatureEnvironment property. + * + * @param value + * allowed object is + * {@link ContentOptionalRefType } + * + */ + public void setVerifySignatureEnvironment(ContentOptionalRefType value) { + this.verifySignatureEnvironment = value; + } + + /** + * Gets the value of the verifySignatureLocation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVerifySignatureLocation() { + return verifySignatureLocation; + } + + /** + * Sets the value of the verifySignatureLocation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVerifySignatureLocation(String value) { + this.verifySignatureLocation = value; + } + + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java b/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java new file mode 100644 index 00000000..18c9ddec --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java @@ -0,0 +1,263 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerifyXMLSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyXMLSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignerInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/>
+ *         <element name="HashInputData" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}InputDataType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="ReferenceInputData" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}InputDataType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="SignatureCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ReferencesCheckResultType"/>
+ *         <element name="SignatureManifestCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ReferencesCheckResultType" minOccurs="0"/>
+ *         <element name="XMLDSIGManifestCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ManifestRefsCheckResultType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CertificateCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyXMLSignatureResponseType", propOrder = { + "signerInfo", + "hashInputData", + "referenceInputData", + "signatureCheck", + "signatureManifestCheck", + "xmldsigManifestCheck", + "certificateCheck" +}) +public class VerifyXMLSignatureResponseType { + + @XmlElement(name = "SignerInfo", required = true) + protected KeyInfoType signerInfo; + @XmlElement(name = "HashInputData") + protected List hashInputData; + @XmlElement(name = "ReferenceInputData") + protected List referenceInputData; + @XmlElement(name = "SignatureCheck", required = true) + protected ReferencesCheckResultType signatureCheck; + @XmlElement(name = "SignatureManifestCheck") + protected ReferencesCheckResultType signatureManifestCheck; + @XmlElement(name = "XMLDSIGManifestCheck") + protected List xmldsigManifestCheck; + @XmlElement(name = "CertificateCheck", required = true) + protected CheckResultType certificateCheck; + + /** + * Gets the value of the signerInfo property. + * + * @return + * possible object is + * {@link KeyInfoType } + * + */ + public KeyInfoType getSignerInfo() { + return signerInfo; + } + + /** + * Sets the value of the signerInfo property. + * + * @param value + * allowed object is + * {@link KeyInfoType } + * + */ + public void setSignerInfo(KeyInfoType value) { + this.signerInfo = value; + } + + /** + * Gets the value of the hashInputData property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hashInputData property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getHashInputData().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link InputDataType } + * + * + */ + public List getHashInputData() { + if (hashInputData == null) { + hashInputData = new ArrayList(); + } + return this.hashInputData; + } + + /** + * Gets the value of the referenceInputData property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the referenceInputData property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReferenceInputData().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link InputDataType } + * + * + */ + public List getReferenceInputData() { + if (referenceInputData == null) { + referenceInputData = new ArrayList(); + } + return this.referenceInputData; + } + + /** + * Gets the value of the signatureCheck property. + * + * @return + * possible object is + * {@link ReferencesCheckResultType } + * + */ + public ReferencesCheckResultType getSignatureCheck() { + return signatureCheck; + } + + /** + * Sets the value of the signatureCheck property. + * + * @param value + * allowed object is + * {@link ReferencesCheckResultType } + * + */ + public void setSignatureCheck(ReferencesCheckResultType value) { + this.signatureCheck = value; + } + + /** + * Gets the value of the signatureManifestCheck property. + * + * @return + * possible object is + * {@link ReferencesCheckResultType } + * + */ + public ReferencesCheckResultType getSignatureManifestCheck() { + return signatureManifestCheck; + } + + /** + * Sets the value of the signatureManifestCheck property. + * + * @param value + * allowed object is + * {@link ReferencesCheckResultType } + * + */ + public void setSignatureManifestCheck(ReferencesCheckResultType value) { + this.signatureManifestCheck = value; + } + + /** + * Gets the value of the xmldsigManifestCheck property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the xmldsigManifestCheck property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getXMLDSIGManifestCheck().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ManifestRefsCheckResultType } + * + * + */ + public List getXMLDSIGManifestCheck() { + if (xmldsigManifestCheck == null) { + xmldsigManifestCheck = new ArrayList(); + } + return this.xmldsigManifestCheck; + } + + /** + * Gets the value of the certificateCheck property. + * + * @return + * possible object is + * {@link CheckResultType } + * + */ + public CheckResultType getCertificateCheck() { + return certificateCheck; + } + + /** + * Sets the value of the certificateCheck property. + * + * @param value + * allowed object is + * {@link CheckResultType } + * + */ + public void setCertificateCheck(CheckResultType value) { + this.certificateCheck = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/X509DataType.java b/bkucommon/src/test/java/moaspss/generated/X509DataType.java new file mode 100644 index 00000000..cab7852d --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/X509DataType.java @@ -0,0 +1,109 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for X509DataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="X509DataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <choice>
+ *           <element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/>
+ *           <element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <any/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "X509DataType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "x509IssuerSerialOrX509SKIOrX509SubjectName" +}) +public class X509DataType { + + @XmlElementRefs({ + @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlAnyElement(lax = true) + protected List x509IssuerSerialOrX509SKIOrX509SubjectName; + + /** + * Gets the value of the x509IssuerSerialOrX509SKIOrX509SubjectName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the x509IssuerSerialOrX509SKIOrX509SubjectName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getX509IssuerSerialOrX509SKIOrX509SubjectName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link Element } + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} + * {@link Object } + * + * + */ + public List getX509IssuerSerialOrX509SKIOrX509SubjectName() { + if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) { + x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList(); + } + return this.x509IssuerSerialOrX509SKIOrX509SubjectName; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java b/bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java new file mode 100644 index 00000000..fc3c90d5 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java @@ -0,0 +1,107 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for X509IssuerSerialType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="X509IssuerSerialType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="X509IssuerName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="X509SerialNumber" type="{http://www.w3.org/2001/XMLSchema}integer"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "X509IssuerSerialType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { + "x509IssuerName", + "x509SerialNumber" +}) +public class X509IssuerSerialType { + + @XmlElement(name = "X509IssuerName", required = true) + protected String x509IssuerName; + @XmlElement(name = "X509SerialNumber", required = true) + protected BigInteger x509SerialNumber; + + /** + * Gets the value of the x509IssuerName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getX509IssuerName() { + return x509IssuerName; + } + + /** + * Sets the value of the x509IssuerName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setX509IssuerName(String value) { + this.x509IssuerName = value; + } + + /** + * Gets the value of the x509SerialNumber property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getX509SerialNumber() { + return x509SerialNumber; + } + + /** + * Sets the value of the x509SerialNumber property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setX509SerialNumber(BigInteger value) { + this.x509SerialNumber = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/XMLContentType.java b/bkucommon/src/test/java/moaspss/generated/XMLContentType.java new file mode 100644 index 00000000..da6a4708 --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/XMLContentType.java @@ -0,0 +1,79 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for XMLContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="XMLContentType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType">
+ *       <attribute ref="{http://www.w3.org/XML/1998/namespace}space"/>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XMLContentType") +public class XMLContentType + extends AnyChildrenType +{ + + @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String space; + + /** + * Gets the value of the space property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSpace() { + return space; + } + + /** + * Sets the value of the space property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSpace(String value) { + this.space = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java b/bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java new file mode 100644 index 00000000..6615981c --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java @@ -0,0 +1,106 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package moaspss.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for XMLDataObjectAssociationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="XMLDataObjectAssociationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}MetaInfoType" minOccurs="0"/>
+ *         <element name="Content" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentRequiredRefType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XMLDataObjectAssociationType", propOrder = { + "metaInfo", + "content" +}) +public class XMLDataObjectAssociationType { + + @XmlElement(name = "MetaInfo") + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected ContentRequiredRefType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link ContentRequiredRefType } + * + */ + public ContentRequiredRefType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link ContentRequiredRefType } + * + */ + public void setContent(ContentRequiredRefType value) { + this.content = value; + } + +} diff --git a/bkucommon/src/test/java/moaspss/generated/package-info.java b/bkucommon/src/test/java/moaspss/generated/package-info.java new file mode 100644 index 00000000..aadb75fc --- /dev/null +++ b/bkucommon/src/test/java/moaspss/generated/package-info.java @@ -0,0 +1,18 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package moaspss.generated; diff --git a/bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl b/bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl new file mode 100644 index 00000000..29f3e25d --- /dev/null +++ b/bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin new file mode 100644 index 00000000..6b00acc5 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin @@ -0,0 +1,337 @@ +POST http://www.opinionatedgeek.com:80/dotnet/tools/Base64Encode/Default.aspx HTTP/1.1 +Host: www.opinionatedgeek.com +User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15 +Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 +Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 +Accept-Encoding: gzip,deflate +Accept-Charset: UTF-8,* +Keep-Alive: 300 +Proxy-Connection: keep-alive +Referer: http://www.opinionatedgeek.com/dotnet/tools/Base64Encode/ +Cookie: __utma=87673542.1058874134.1202897575.1205922938.1215441720.3; __utmz=87673542.1215441720.3.3.utmccn=(organic)|utmcsr=google|utmctr=base64+encoder|utmcmd=organic; __utmb=87673542; __utmc=87673542 +Content-Type: multipart/form-data; boundary=---------------------------15671293698853 +Content-length: 11576 + +-----------------------------15671293698853 +Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$ctl00_Hidden" + +False +-----------------------------15671293698853 +Content-Disposition: form-data; name="__VIEWSTATE" + +/wEPDwUJNzM1NDA1ODc3D2QWAmYPZBYCZg9kFgJmD2QWAgIFD2QWAgIFD2QWAgIBD2QWAgIBDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFgICAQ9kFgICAw9kFgICAQ9kFgICAQ8PFCsDA2hoZ2QWBGYPDxYEHghDc3NDbGFzcwUPc3Vic2VjdGlvbnRpdGxlHgRfIVNCAgJkFgJmDw8WBB8BBQ9zdWJzZWN0aW9udGl0bGUfAgICZBYCZg8PFgQeC05hdmlnYXRlVXJsBQEjHgdUb29sVGlwBRhDbGljayB0byBleHBhbmQvY29sbGFwc2UWBh4Hb25jbGljawXCAXJldHVybiB0b2dnbGVfZXhjX29wZ2VlayAoJ2N0bDAwX2N0bDAwX2N0bDAwX1dob2xlQm9keV9Db250ZW50UGFuZV9Db250ZW50QXJlYV9jdGwwMV9jdGwwMV9Cb2R5X2N0bDAwX2N0bDAwJywgJ2N0bDAwJGN0bDAwJGN0bDAwJFdob2xlQm9keSRDb250ZW50UGFuZSRDb250ZW50QXJlYSRjdGwwMSRjdGwwMSRCb2R5JGN0bDAwX0hpZGRlbicpHgtvbm1vdXNlb3ZlcgU3d2luZG93LnN0YXR1cyA9ICdDbGljayB0byBleHBhbmQvY29sbGFwc2UnOyByZXR1cm4gdHJ1ZR4Kb25tb3VzZW91dAUfd2luZG93LnN0YXR1cyA9ICcnOyByZXR1cm4gdHJ1ZWQCAQ8PFgQfAQULc2VjdGlvbmJvZHkfAgICZBYCZg8PFgQfAQULc2VjdGlvbmJvZHkfAgICZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFSmN0bDAwJGN0bDAwJGN0bDAwJFdob2xlQm9keSRDb250ZW50UGFuZSRDb250ZW50QXJlYSRjdGwwMSRjdGwwMSRCb2R5JGN0bDAwm1Yd0S+llPVzX/xfKb3tdvK8fNQ= +-----------------------------15671293698853 +Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$ctl00$ctl02" + +False +-----------------------------15671293698853 +Content-Disposition: form-data; name="XMLRequest"; filename="project.xml" +Content-Type: text/xml + + + + + + 3 + + FileUpload + commons-fileupload + commons-fileupload + 1.3-SNAPSHOT + 2002 + File upload component for Java servlets + + The FileUpload component provides a simple yet flexible means of adding + support for multipart file upload functionality to servlets and web + applications. + + /images/logo.png + + http://commons.apache.org/${pom.artifactId.substring(8)}/ + org.apache.commons.${pom.artifactId.substring(8)} + + + The Apache Software Foundation + http://commons.apache.org/ + http://commons.apache.org/images/logo.png + + + + + The Apache Software License, Version 2.0 + /LICENSE.txt + repo + + + + commons + http://issues.apache.org/jira/ + people.apache.org + /www/commons.apache.org/${pom.artifactId.substring(8)}/ + /www/people.apache.org/builds/commons/${pom.artifactId.substring(8)}/ + + + scm:svn:http://svn.apache.org/repos/asf/commons/proper/${pom.artifactId.substring(8)}/trunk + http://svn.apache.org/repos/asf + + + + + Commons Dev List + dev-subscribe@commons.apache.org + dev-unsubscribe@commons.apache.org + http://mail-archives.apache.org/mod_mbox/commons-dev/ + + + Commons User List + user-subscribe@commons.apache.org + user-unsubscribe@commons.apache.org + http://mail-archives.apache.org/mod_mbox/commons-user/ + + + + + + + 1.2.1 + 1.2.1 + commons-fileupload-1.2.1 + + + 1.2 + 1.2 + commons-fileupload-1.2 + + + 1.1.1 + 1.1.1 + FILEUPLOAD_1_1_1 + + + 1.1 + 1.1 + FILEUPLOAD_1_1 + + + 1.1-rc2 + 1.1-rc2 + FILEUPLOAD_1_1_RC2 + + + 1.1-rc1 + 1.1-rc1 + FILEUPLOAD_1_1_RC1 + + + 1.0 + 1.0 + FILEUPLOAD_1_0 + + + 1.0-rc1 + 1.0-rc1 + FILEUPLOAD_1_0_RC1 + + + 1.0-beta-1 + 1.0-beta-1 + FILEUPLOAD_1_0_B1 + + + + + + Martin Cooper + martinc + martinc@apache.org + EMC + + + dIon Gillard + dion + dion@apache.org + Multitask Consulting + + + John McNally + jmcnally + jmcnally@collab.net + CollabNet + + + Daniel Rall + dlr + dlr@finemaltcoding.com + CollabNet + + + Jason van Zyl + jvanzyl + jason@zenplex.com + Zenplex + + + Robert Burrell Donkin + rdonkin + rdonkin@apache.org + + + + Sean C. Sullivan + sullis + sean |at| seansullivan |dot| com + + + + Jochen Wiedmann + jochen + jochen.wiedmann@gmail.com + + + + + + + commons-io + commons-io + 1.3.2 + http://commons.apache.org/io/ + + + javax.servlet + servlet-api + 2.4 + http://java.sun.com/products/servlet/ + + provided + + + + javax.portlet + portlet-api + 1.0 + http://portals.apache.org/pluto + + provided + + Required only when using FileUpload in a portlet environment. + + + + + junit + junit + 3.8.1 + http://www.junit.org/ + + test + + <strong>Test Only</strong> - required only for + running the FileUpload unit tests. + + + + + + maven + maven-xdoc-plugin + 1.9.2 + http://maven.apache.org/reference/plugins/xdoc/ + plugin + + + <strong>Site Only</strong> - v1.9.2 (minimum) + required for building the FileUpload Site documentation. + + + + + + maven + maven-changelog-plugin + 1.9.1 + http://maven.apache.org/reference/plugins/changelog/ + plugin + + + <strong>Site Only</strong> - v1.9.1 (minimum) + required for building the FileUpload Site documentation. + + + + + + + dev@commons.apache.org + src/java + src/test + + + **/*Test.java + + + + ${pom.build.unitTestSourceDirectory} + + **/*.xml + + + + + + + + ${basedir} + META-INF + + NOTICE.txt + + + + + + + maven-changes-plugin + maven-changelog-plugin + maven-checkstyle-plugin + + maven-developer-activity-plugin + maven-faq-plugin + maven-file-activity-plugin + maven-javadoc-plugin + maven-jdepend-plugin + maven-junit-report-plugin + maven-jxr-plugin + maven-license-plugin + + maven-pmd-plugin + maven-simian-plugin + maven-tasklist-plugin + + + + +-----------------------------15671293698853 +Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$textToEncode" + + +-----------------------------15671293698853 +Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$butSubmit" + +Encode +-----------------------------15671293698853-- diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt new file mode 100644 index 00000000..7014b1cf --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt @@ -0,0 +1,37 @@ +POST /http-security-layer-request HTTP/1.1 +Host: 127.0.0.1 +User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 +Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 +Accept-Language: de-at,de;q=0.7,en;q=0.3 +Accept-Encoding: gzip,deflate +Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 +Keep-Alive: 300 +Connection: keep-alive +Content-Type: multipart/form-data; boundary=---------------------------2330864292941 +Content-Length: 1800 + +-----------------------------2330864292941 +Content-Disposition: form-data; name="Vorname_" + +Thassilo +-----------------------------2330864292941 +Content-Disposition: form-data; name="Nachname_" + +Tester +-----------------------------2330864292941 +Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png" +Content-Type: image/png + +‰PNG + + IHDR   <Œ"¢ tRNS n¦‘ pHYs  ÒÝ~ü tEXtComment ‰*? WIDATxœ­”½NÂPÇ?qö|ŸÁ„÷18XB\HtpëÀ.nº ƒpcÀ&°2ºº¢.LþšÓ\n/åzÁ›œ¶çãÿç«­¬¦õÅUŠ ˆ>ÔU6J0®Žd…¦RÖÖÑåsÓDT ”*[°jÜM?‚þ{”‚)?¯¶ Sl»8X?ªàªÈh‚ÃZÏ&AÇc8röff#Ãì0Á¸Ð¼;ôQ@ÇÉËé#ÛAP0Ý}???û—v.LœkP÷ ÛV–†dvÖuV㬠€ application/octet-stream http://www.w3.org/2000/09/xmldsig#sha1 Beilage zum Formular 0815 +-----------------------------2330864292941 +Content-Disposition: form-data; name="DataURL" + +http://localhost:18080/SL12Tutorial/SignAttachments;jsessionid=2BAF01A9069F6AF073A25B4D9B8E803E?use=sign +-----------------------------2330864292941-- diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt new file mode 100644 index 00000000..fb8cc1c3 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt @@ -0,0 +1,47 @@ +POST /http-security-layer-request HTTP/1.1 +Host: 127.0.0.1 +User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 +Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 +Accept-Language: de-at,de;q=0.7,en;q=0.3 +Accept-Encoding: gzip,deflate +Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 +Keep-Alive: 300 +Connection: keep-alive +Content-Type: multipart/form-data; boundary=---------------------------2330864292941 +Content-Length: 1800 + +-----------------------------2330864292941 +Content-Disposition: form-data; name="Vorname_" +Content-Type:text/xml;charset=UTF-8 + +Thassilo +-----------------------------2330864292941 +Content-Disposition: form-data; name="Nachname_" + +Tester +-----------------------------2330864292941 +Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png" +Content-Type: image/png + +�PNG + + +IHDR   <�"� tRNS n�� pHYs  ��~� tEXtComment �*? WIDATx����N�P�?q�|�D�18XB\Htp��.n� +�pc�&�2���.L���\n/�z[�����竭����U���>�U6J0��d��R����s�DT +�*[�j�M?��{��)?�� Sl�8X?���h��Z�&A�c8r�ff#��0xм;�Q@����#�AP0�}???�v.L�kP� �V��dv�uV� � +-----------------------------2330864292941 +Content-Disposition: form-data; name="WeitergabeHeader__"; + +MyHeader:veryUgly + +-----------------------------2330864292941 +Content-Disposition: form-data; name="DataURL" + +http://localhost:8080/ +-----------------------------2330864292941-- diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml new file mode 100644 index 00000000..29ab2d41 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin new file mode 100644 index 00000000..5ee5aee6 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin @@ -0,0 +1 @@ +XMLRequest=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3CNullOperationRequest+xmlns%3D%22http%3A%2F%2Fwww.buergerkarte.at%2Fnamespaces%2Fsecuritylayer%2F1.2%23%22%2F%3E&RedirectURL=https%3A%2F%2Fdemo.egiz.gv.at%2Fbku-erkennung%2Fv1.1%2Fbku-erkennung%2Fbku-erkennung_helper.html \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt new file mode 100644 index 00000000..92d75066 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt @@ -0,0 +1,36 @@ + +-----------------------------2330864292941 +Content-Disposition: form-data; name="Vorname_" +Content-Type:text/plain;charset=UTF-8 + +Thassilo +-----------------------------2330864292941 +Content-Disposition: form-data; name="Nachname_" + +Tester +-----------------------------2330864292941 +Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png" +Content-Type: image/png + +�PNG + + +IHDR   <�"� tRNS n�� pHYs  ��~� tEXtComment �*? WIDATx����N�P�?q�|�D�18XB\Htp��.n� +�pc�&�2���.L���\n/�z[�����竭����U���>�U6J0��d��R����s�DT +�*[�j�M?��{��)?�� Sl�8X?���h��Z�&A�c8r�ff#��0xм;�Q@����#�AP0�}???�v.L�kP� �V��dv�uV� � +-----------------------------2330864292941 +Content-Disposition: form-data; name="WeitergabeHeader__"; + +MyHeader:veryUgly +-----------------------------2330864292941 +Content-Disposition: form-data; name="DataURL" + +http://localhost:8080/ +-----------------------------2330864292941-- diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt new file mode 100644 index 00000000..71dbd103 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt @@ -0,0 +1,56 @@ + +-----------------------------2330864292941 +Content-Disposition: form-data; name="Vorname_" +Content-Type:text/plain;charset=UTF-8 + +Thassilo +-----------------------------2330864292941 +Content-Disposition: form-data; name="Nachname_" + +Tester +-----------------------------2330864292941 +Content-Disposition: form-data; name="StylesheetURL" + +formdata:Stylesheet +-----------------------------2330864292941 +Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png" +Content-Type: image/png + +�PNG + + +IHDR   <�"� tRNS n�� pHYs  ��~� tEXtComment �*? WIDATx����N�P�?q�|�D�18XB\Htp��.n� +�pc�&�2���.L���\n/�z[�����竭����U���>�U6J0��d��R����s�DT +�*[�j�M?��{��)?�� Sl�8X?���h��Z�&A�c8r�ff#��0xм;�Q@����#�AP0�}???�v.L�kP� �V��dv�uV� � +-----------------------------2330864292941 +Content-Disposition: form-data; name="Stylesheet"; + + + + + + + + +

Alles Roger

+
+ +

Uuups

+
+
+ + +
+
+-----------------------------2330864292941 +Content-Disposition: form-data; name="DataURL" + +http://localhost:8080/ +-----------------------------2330864292941-- diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt new file mode 100644 index 00000000..bc1abc19 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt @@ -0,0 +1,16 @@ + + + + + + + + + + + Alles Roger + + + NullKommaJosef + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml new file mode 100644 index 00000000..e8622526 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml @@ -0,0 +1,23 @@ + + + CertifiedKeypair + + + Von der Signatur umschlossene Daten. + + + + text/plain + + + + + + /doc:XMLDocument + + + http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/tutorial/examples/interface/common/XMLDocument.xsd + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 new file mode 100644 index 00000000..7d42c4b3 Binary files /dev/null and b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 differ diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin new file mode 100644 index 00000000..34cace45 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin @@ -0,0 +1,6 @@ + + + Ich bin der erste Absatz in diesem Dokument. + Und ich bin der zweite Absatz in diesem Dokument. +Ich habe weiters ein eigenens ID-Attribut bekommen. + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt new file mode 100644 index 00000000..7448a1e3 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt @@ -0,0 +1 @@ +Ich bin ein einfacher Text. \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml new file mode 100644 index 00000000..92a106b7 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml @@ -0,0 +1,6 @@ + + + Ich bin der erste Absatz in diesem Dokument. + Und ich bin der zweite Absatz in diesem Dokument. +Ich habe weiters ein eigenens ID-Attribut bekommen. + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml new file mode 100644 index 00000000..a76308ae --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml @@ -0,0 +1,13 @@ + + + + + SWNoIGJpbiBlaW4gZWluZmFjaGVyIFRleHQu + + + + text/plain + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml new file mode 100644 index 00000000..72e16347 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml @@ -0,0 +1,11 @@ + + + + + + + text/xml + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml new file mode 100644 index 00000000..61fb446d --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml @@ -0,0 +1,13 @@ + + + + + SWNoIGJpbiBlaW4gZWluZmFjaGVyIFRleHQu + + + + text/xml + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml new file mode 100644 index 00000000..65bafc0c --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml @@ -0,0 +1,11 @@ + + + + + + + text/xml + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml new file mode 100644 index 00000000..852c115f --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml @@ -0,0 +1,13 @@ + + + + + testlocal:DataObject1.bin + + + + application/octetstream + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml new file mode 100644 index 00000000..7bcb5113 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml @@ -0,0 +1,13 @@ + + + + + testlocal:DataObject1.txt + + + + text/plain + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml new file mode 100644 index 00000000..2adda980 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml @@ -0,0 +1,14 @@ + + + + + I am a simple funny text. + + + + text/xml + I am a fancy description. + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml new file mode 100644 index 00000000..cad96fc8 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml @@ -0,0 +1,17 @@ + + + + + I am a simple funny text. + + + + + + + text/xml + I am a fancy description. + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd new file mode 100644 index 00000000..b645cef9 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd @@ -0,0 +1,3 @@ + + + diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml new file mode 100644 index 00000000..91fd7ccb --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml @@ -0,0 +1,6 @@ + + + Ich bin der erste Absatz in diesem Dokument. + Und ich bin der zweite Absatz in diesem Dokument. +Ich habe weiters ein eigenens ID-Attribut bekommen. + diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml new file mode 100644 index 00000000..dac81be7 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml @@ -0,0 +1,23 @@ + + + + + PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxkb2M6WE1MRG9jdW1lbnQg +eG1sbnM6ZG9jPSJ1cm46ZG9jdW1lbnQiPg0KICA8ZG9jOlBhcmFncmFwaD5JY2ggYmluIGRlciBl +cnN0ZSBBYnNhdHogaW4gZGllc2VtIERva3VtZW50LjwvZG9jOlBhcmFncmFwaD4NCiAgPGRvYzpQ +YXJhZ3JhcGg+VW5kIGljaCBiaW4gZGVyIHp3ZWl0ZSBBYnNhdHogaW4gZGllc2VtIERva3VtZW50 +LjwvZG9jOlBhcmFncmFwaD4NCjwvZG9jOlhNTERvY3VtZW50Pg0K + + /doc:XMLDocument + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml new file mode 100644 index 00000000..7d8c7c01 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml @@ -0,0 +1,18 @@ + + + + PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBYTUxEb2N1 +bWVudCBTWVNURU0gInVybjpEb2N1bWVudC5kdGQiPg0KPFhNTERvY3VtZW50Pg0KICAgIDxQYXJh +Z3JhcGg+SWNoIGJpbiBkZXIgZXJzdGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC48L1BhcmFn +cmFwaD4NCiAgICA8UGFyYWdyYXBoIFBhcmFJZD0iUGFyYTIiPlVuZCBpY2ggYmluIGRlciB6d2Vp +dGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC4NCiAgICBJY2ggaGFiZSB3ZWl0ZXJzIGVpbiBl +aWdlbmVucyBJRC1BdHRyaWJ1dCBiZWtvbW1lbi48L1BhcmFncmFwaD4NCjwvWE1MRG9jdW1lbnQ+ + + /XMLDocument + + + testlocal:Document.dtd + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml new file mode 100644 index 00000000..91425a93 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml @@ -0,0 +1,20 @@ + + + + PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBYTUxEb2N1 +bWVudCBTWVNURU0gInVybjpEb2N1bWVudC5kdGQiPg0KPFhNTERvY3VtZW50Pg0KICAgIDxQYXJh +Z3JhcGg+SWNoIGJpbiBkZXIgZXJzdGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC48L1BhcmFn +cmFwaD4NCiAgICA8UGFyYWdyYXBoIFBhcmFJZD0iUGFyYTIiPlVuZCBpY2ggYmluIGRlciB6d2Vp +dGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC4NCiAgICBJY2ggaGFiZSB3ZWl0ZXJzIGVpbiBl +aWdlbmVucyBJRC1BdHRyaWJ1dCBiZWtvbW1lbi48L1BhcmFncmFwaD4NCjwvWE1MRG9jdW1lbnQ+ + + /XMLDocument + + + PCFFTEVNRU5UIFhNTERvY3VtZW50ICgjUENEQVRBIHwgUGFyYWdyYXBoKSo+DQo8IUVMRU1FTlQg +UGFyYWdyYXBoICgjUENEQVRBKT4NCjwhQVRUTElTVCBQYXJhZ3JhcGggUGFyYUlkIENEQVRBICNJ +TVBMSUVEPg== + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml new file mode 100644 index 00000000..d1589f24 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml @@ -0,0 +1,11 @@ + + + + id("Para2") + + + testlocal:XMLDocument.xsd + + + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml new file mode 100644 index 00000000..79e91992 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml @@ -0,0 +1,13 @@ + + + + + + Text in Teil 1 + Text in Teil 2 + + + + /doc:Whole + + \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml new file mode 100644 index 00000000..7631534e --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml @@ -0,0 +1,304 @@ + + + SecureSignatureKeypair + + + + + + + + + + + Signatur der Anmeldedaten + + + +

Signatur der Anmeldedaten

+

+

Mit meiner elektronischen Signatur beantrage ich, + + , geboren am . . , in der Rolle als (OID***= ), den Zugang zur gesicherten Anwendung.

+

+

Datum und Uhrzeit: . . , : + : +

+ +

HPI(**):

+
+ +

wbPK(*):

+
+ +
+

Ich bin weiters ermächtigt als von + , geboren am . . + + , + , in deren Auftrag zu handeln. +

wbPK(*) des Vollmachtgebers:

+
+

+

+ + + +

+


+ + +

+


+
+ +

+


+
+ + +
(*) wbPK: Das wirtschaftsbereichsspezifische + Personenkennzeichen wird aus den jeweiligen + Stammzahlen des Bürgers und des Wirtschaftsunternehmens + berechnet und ermöglicht eine eindeutige Zuordnung des + Bürgers zum Wirtschaftsunternehmen.
+
+ +
(**) HPI: Der eHealth Professional + Identifier wird aus den jeweiligen Stammzahlen + der Gesundheitsdiensteanbieterinnen / + Gesundheitsdiensteanbieter berechnet und ermöglicht eine + eindeutige Zuordnung der Gesundheitsdiensteanbieterin / + des Gesundheitsdiensteanbieters im + Gesundheitsbereich.
+
+ +
(***) OID: Object Identifier sind + standardisierte Objekt-Bezeichner und beschreiben + eindeutig die Rollen des GDA-Token Inhabers.
+
+ + +
+
+
+ +
+ + application/xhtml+xml + +
+ + + + + + + + + + Signatur der Anmeldedaten + + +

Signatur der Anmeldedaten

+

+

Mit meiner elektronischen Signatur beantrage ich, + + , geboren am . . , in der Rolle als (OID***= ), den Zugang zur gesicherten Anwendung.

+

+

Datum und Uhrzeit: . . , : + : +

+ +

HPI(**):

+
+ +

wbPK(*):

+
+ +
+

Ich bin weiters ermächtigt als von + , geboren am . . + + , + , in deren Auftrag zu handeln. +

wbPK(*) des Vollmachtgebers:

+
+

+

+ + + +

+


+ + +

+


+
+ +

+


+
+ + +
(*) wbPK: Das wirtschaftsbereichsspezifische + Personenkennzeichen wird aus den jeweiligen + Stammzahlen des Bürgers und des Wirtschaftsunternehmens + berechnet und ermöglicht eine eindeutige Zuordnung des + Bürgers zum Wirtschaftsunternehmen.
+
+ +
(**) HPI: Der eHealth Professional Identifier + wird aus den jeweiligen Stammzahlen der + Gesundheitsdiensteanbieterinnen / + Gesundheitsdiensteanbieter berechnet und ermöglicht eine + eindeutige Zuordnung der Gesundheitsdiensteanbieterin / + des Gesundheitsdiensteanbieters im + Gesundheitsbereich.
+
+ +
(***) OID: Object Identifier sind standardisierte + Objekt-Bezeichner und beschreiben eindeutig die Rollen + des GDA-Token Inhabers.
+
+ + +
+
+
+ +
+ + text/html + +
+
+ + + + + + + https://demo.egiz.gv.at/exchange-moa-id-auth/ + + + + + LTpz8VYzns2jrx0J8Gm/R/nAhxA= + urn:publicid:gv.at:wbpk+FN+TODO + + + + + https://apps.egiz.gv.at/urlaubsschein-frontend/moaid-login + + + 1971-11-10 + + + + + + /saml:Assertion + +
diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd new file mode 100644 index 00000000..a2930f1d --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml new file mode 100644 index 00000000..1a2857da --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml @@ -0,0 +1 @@ + IdentityLink \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml new file mode 100644 index 00000000..96311ff6 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml @@ -0,0 +1 @@ + IdentityLink \ No newline at end of file diff --git a/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml new file mode 100644 index 00000000..10964e06 --- /dev/null +++ b/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml @@ -0,0 +1 @@ + IdentityLink urn:publicid:gv.at:wbpk+FN+468924i \ No newline at end of file diff --git a/bkucommon/src/test/resources/commons-logging.properties b/bkucommon/src/test/resources/commons-logging.properties new file mode 100644 index 00000000..29292562 --- /dev/null +++ b/bkucommon/src/test/resources/commons-logging.properties @@ -0,0 +1 @@ +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/bkucommon/src/test/resources/log4j.properties b/bkucommon/src/test/resources/log4j.properties new file mode 100644 index 00000000..053eac17 --- /dev/null +++ b/bkucommon/src/test/resources/log4j.properties @@ -0,0 +1,19 @@ +# loglever DEBUG, appender STDOUT +log4j.rootLogger=TRACE, STDOUT +#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p |%d | %t | %c %x- %m%n + +### FILE appender +#log4j.appender.file=org.apache.log4j.RollingFileAppender +#log4j.appender.file.maxFileSize=100KB +#log4j.appender.file.maxBackupIndex=9 +#log4j.appender.file.File=egovbus_ca.log +#log4j.appender.file.threshold=info +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..cb9e1483 --- /dev/null +++ b/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + at.gv.egiz + bku + pom + 1.0-SNAPSHOT + BKU + http://bku.egiz.gv.at + + utils + bkucommon + STAL + BKUOnline + smcc + BKULocal + BKUApplet + smccSTAL + STALService + BKUCommonGUI + + + + mcentner + Martin Centner + mcentner@egiz.gv.at + + + wbauer + Wolfgang Bauer + wbauer@egiz.gv.at + + + corthacker + Clemens Orthacker + corthacker@egiz.gv.at + + + + svn://svn.egovlabs.gv.at/svnroot/mocca + + + E-Government Innovation Center (EGIZ) + http://www.egiz.gv.at + + + + + + maven-compiler-plugin + org.apache.maven.plugins + 2.0.2 + + + 1.6 + 1.6 + true + true + + + + maven-assembly-plugin + org.apache.maven.plugins + 2.2-beta-2 + + + maven-dependency-plugin + org.apache.maven.plugins + 2.0 + + + maven-jaxb2-plugin + org.jvnet.jaxb2.maven2 + 0.6.0 + + + jaxws-maven-plugin + org.codehaus.mojo + 1.10 + + + + + + maven-assembly-plugin + + + ${basedir}/src/main/assemblies/assembly-test.xml + + + + + + + + + + mocca-egovlabs + MOCCA EGovLabs + http://mocca.egovlabs.gv.at/m2/repository/ + + + + + log4j + log4j + runtime + + + junit + junit + test + + + + + + log4j + log4j + 1.2.12 + runtime + + + commons-logging + commons-logging + 1.1.1 + compile + + + junit + junit + 4.4 + test + + + iaik + iaik_jce_full_signed + 3.16 + compile + + + iaik + iaik_jce_me4se + 3.04 + + + iaik + iaik_ecc_signed + 2.15 + + + iaik + iaik_xsect + 1.14 + + + commons-fileupload + commons-fileupload + 1.2.1 + compile + + + commons-httpclient + commons-httpclient + 3.1 + compile + + + + \ No newline at end of file diff --git a/smcc/keystore.ks b/smcc/keystore.ks new file mode 100644 index 00000000..824c3a40 Binary files /dev/null and b/smcc/keystore.ks differ diff --git a/smcc/pom.xml b/smcc/pom.xml new file mode 100644 index 00000000..3e3dfe14 --- /dev/null +++ b/smcc/pom.xml @@ -0,0 +1,73 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + smcc + smcc + jar + 1.0-SNAPSHOT + http://bku.egiz.gv.at + + + + maven-jar-plugin + + + + sign + + + + + + false + false + + false + + + test-applet signer + keystore.ks + storepass + keypass + true + + + + maven-compiler-plugin + + UTF-8 + + + + maven-resources-plugin + + UTF-8 + + + + + + + commons-logging + commons-logging + + + junit + junit + 3.8.1 + test + + + + \ No newline at end of file diff --git a/smcc/src/main/java/META-INF/MANIFEST.MF b/smcc/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/smcc/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java new file mode 100644 index 00000000..7269ba7f --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java @@ -0,0 +1,310 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +import java.nio.charset.Charset; + +import javax.smartcardio.CardChannel; +import javax.smartcardio.CardException; +import javax.smartcardio.CommandAPDU; +import javax.smartcardio.ResponseAPDU; + +public class ACOSCard extends AbstractSignatureCard implements SignatureCard { + + public static final byte[] AID_DEC = new byte[] { (byte) 0xA0, (byte) 0x00, + (byte) 0x00, (byte) 0x01, (byte) 0x18, (byte) 0x45, (byte) 0x4E }; + + public static final byte[] DF_DEC = new byte[] { (byte) 0xdf, (byte) 0x71 }; + + public static final byte[] AID_SIG = new byte[] { (byte) 0xA0, (byte) 0x00, + (byte) 0x00, (byte) 0x01, (byte) 0x18, (byte) 0x45, (byte) 0x43 }; + + public static final byte[] DF_SIG = new byte[] { (byte) 0xdf, (byte) 0x70 }; + + public static final byte[] EF_C_CH_EKEY = new byte[] { (byte) 0xc0, + (byte) 0x01 }; + + public static final int EF_C_CH_EKEY_MAX_SIZE = 2000; + + public static final byte[] EF_C_CH_DS = new byte[] { (byte) 0xc0, (byte) 0x02 }; + + public static final int EF_C_CH_DS_MAX_SIZE = 2000; + + public static final byte[] EF_PK_CH_EKEY = new byte[] { (byte) 0xb0, + (byte) 0x01 }; + + public static final byte[] EF_INFOBOX = new byte[] { (byte) 0xc0, (byte) 0x02 }; + + public static final int EF_INFOBOX_MAX_SIZE = 1500; + + public static final byte KID_PIN_SIG = (byte) 0x81; + + public static final byte KID_PIN_DEC = (byte) 0x81; + + public static final byte KID_PIN_INF = (byte) 0x83; + + public static final byte[] DST_SIG = new byte[] { (byte) 0x84, (byte) 0x01, // tag + // , + // length + // ( + // key + // ID + // ) + (byte) 0x88, // SK.CH.SIGN + (byte) 0x80, (byte) 0x01, // tag, length (algorithm ID) + (byte) 0x14 // ECDSA + }; + + public static final byte[] DST_DEC = new byte[] { (byte) 0x84, (byte) 0x01, // tag + // , + // length + // ( + // key + // ID + // ) + (byte) 0x88, // SK.CH.EKEY + (byte) 0x80, (byte) 0x01, // tag, length (algorithm ID) + (byte) 0x01 // RSA // TODO: Not verified yet + }; + + public ACOSCard() { + super("at/gv/egiz/smcc/ACOSCard"); + } + + byte[] selectFileAID(byte[] fid) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xA4, 0x04, + 0x00, fid, 256)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("Failed to select file (AID=" + + toString(fid) + "): SW=" + Integer.toHexString(resp.getSW()) + "."); + } else { + return resp.getBytes(); + } + } + + byte[] selectFileFID(byte[] fid) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xA4, 0x00, + 0x00, fid, 256)); + if (resp.getSW() == 0x6a82) { + throw new SignatureCardException("Failed to select file (FID=" + + toString(fid) + "): SW=" + Integer.toHexString(resp.getSW()) + ")"); + } else { + return resp.getBytes(); + } + } + + /** + * + * @param pinProvider + * @param spec + * the PIN spec to be given to the pinProvider + * @param kid + * the KID (key identifier) of the PIN to be verified + * @param kfpc + * acutal value of the KFCP (key fault presentation counter) or less + * than 0 if actual value is unknown + * + * @return -1 if the PIN has been verifyed successfully, or else the new value + * of the KFCP (key fault presentation counter) + * + * @throws CancelledException + * if the user canceld the operation + * @throws javax.smartcardio.CardException + * @throws at.gv.egiz.smcc.SignatureCardException + */ + int verifyPIN(PINProvider pinProvider, PINSpec spec, byte kid, int kfpc) + throws CardException, CancelledException, SignatureCardException { + + CardChannel channel = getCardChannel(); + + // get PIN + String pin = pinProvider.providePIN(spec, kfpc); + if (pin == null) { + // User canceld operation + // throw new CancelledException("User canceld PIN entry"); + return -2; + } + + logger.finest("PIN=" + pin); + + byte[] asciiPIN = pin.getBytes(Charset.forName("ASCII")); + byte[] encodedPIN = new byte[8]; + System.arraycopy(asciiPIN, 0, encodedPIN, 0, Math.min(asciiPIN.length, + encodedPIN.length)); + + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x20, 0x00, + kid, encodedPIN)); + if (resp.getSW1() == (byte) 0x63 && resp.getSW2() >> 4 == (byte) 0xc) { + return resp.getSW2() & (byte) 0x0f; + } else if (resp.getSW() == 0x6983) { + // PIN blocked + throw new SignatureCardException(spec.getLocalizedName() + " blocked."); + } else if (resp.getSW() != 0x9000) { + throw new SignatureCardException("Failed to verify pin: SW=" + + Integer.toHexString(resp.getSW()) + "."); + } else { + return -1; + } + + } + + void mseSetDST(byte[] dst) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x22, 0x81, + 0xB6, dst)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("MSE:SET DST failed: SW=" + + Integer.toHexString(resp.getSW())); + } + } + + void psoHash(byte[] hash) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x2A, 0x90, + 0x81, hash)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("PSO:HASH failed: SW=" + + Integer.toHexString(resp.getSW())); + } + } + + byte[] psoComputDigitalSiganture() throws CardException, + SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x2A, 0x9E, + 0x9A, 256)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException( + "PSO: COMPUTE DIGITAL SIGNATRE failed: SW=" + + Integer.toHexString(resp.getSW())); + } else { + return resp.getData(); + } + } + + public byte[] getCertificate(KeyboxName keyboxName) + throws SignatureCardException { + + if (keyboxName == KeyboxName.SECURE_SIGNATURE_KEYPAIR) { + return readTLVFile(AID_SIG, EF_C_CH_DS, EF_C_CH_DS_MAX_SIZE); + } else if (keyboxName == KeyboxName.CERITIFIED_KEYPAIR) { + return readTLVFile(AID_DEC, EF_C_CH_EKEY, EF_C_CH_EKEY_MAX_SIZE); + } else { + throw new IllegalArgumentException("Keybox " + keyboxName + + " not supported."); + } + + } + + public byte[] getInfobox(String infobox, PINProvider provider, String domainId) + throws SignatureCardException { + + if ("IdentityLink".equals(infobox)) { + + PINSpec spec = new PINSpec(4, 4, "[0-9]", getResourceBundle().getString( + "inf.pin.name")); + try { + byte[] res = readTLVFilePIN(AID_DEC, EF_INFOBOX, KID_PIN_INF, provider, + spec, EF_INFOBOX_MAX_SIZE); + return res; + } catch (Exception e) { + throw new SecurityException(e); + } + + } else { + throw new IllegalArgumentException("Infobox '" + infobox + + "' not supported."); + } + + } + + public String toString() { + return "a-sign premium"; + } + + public byte[] createSignature(byte[] hash, KeyboxName keyboxName, + PINProvider provider) throws SignatureCardException { + + if (hash.length != 20) { + throw new IllegalArgumentException("Hash value must be of length 20"); + } + + byte[] fid; + byte kid; + byte[] dst; + PINSpec spec; + if (KeyboxName.SECURE_SIGNATURE_KEYPAIR.equals(keyboxName)) { + fid = DF_SIG; + kid = KID_PIN_SIG; + dst = DST_SIG; + spec = new PINSpec(6, 10, "[0-9]", getResourceBundle().getString( + "sig.pin.name")); + + } else if (KeyboxName.CERITIFIED_KEYPAIR.equals(keyboxName)) { + fid = DF_DEC; + kid = KID_PIN_DEC; + dst = DST_DEC; + spec = new PINSpec(6, 10, "[0-9]", getResourceBundle().getString( + "dec.pin.name")); + + } else { + throw new IllegalArgumentException("KeyboxName '" + keyboxName + + "' not supported."); + } + + try { + + // SELECT DF + selectFileFID(fid); + // VERIFY + int kfpc = -1; + while (true) { + kfpc = verifyPIN(provider, spec, kid, kfpc); + if (kfpc < -1) { + return null; + } else if (kfpc < 0) { + break; + } + } + // MSE: SET DST + mseSetDST(dst); + // PSO: HASH + psoHash(hash); + // PSO: COMPUTE DIGITAL SIGNATURE + byte[] rs = psoComputDigitalSiganture(); + + return rs; + + } catch (CardException e) { + throw new SignatureCardException("Failed to create signature.", e); + } + } +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java new file mode 100644 index 00000000..91c873c9 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java @@ -0,0 +1,259 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +import java.nio.ByteBuffer; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.logging.Logger; + +import javax.smartcardio.ATR; +import javax.smartcardio.Card; +import javax.smartcardio.CardChannel; +import javax.smartcardio.CardException; +import javax.smartcardio.CommandAPDU; +import javax.smartcardio.ResponseAPDU; + +public abstract class AbstractSignatureCard implements SignatureCard { + + static Logger logger = Logger.getLogger(AbstractSignatureCard.class.getName()); + + private ResourceBundle i18n; + private String resourceBundleName; + + private Locale locale = Locale.getDefault(); + + int ifs_ = 254; + + Card card_; + + protected AbstractSignatureCard(String resourceBundleName) { + this.resourceBundleName = resourceBundleName; + } + + String toString(byte[] b) { + StringBuffer sb = new StringBuffer(); + if (b != null && b.length > 0) { + sb.append(Integer.toHexString((b[0] & 240) >> 4)); + sb.append(Integer.toHexString(b[0] & 15)); + } + for(int i = 1; i < b.length; i++) { + sb.append(':'); + sb.append(Integer.toHexString((b[i] & 240) >> 4)); + sb.append(Integer.toHexString(b[i] & 15)); + } + return sb.toString(); + } + + abstract byte[] selectFileAID(byte[] fid) throws CardException, SignatureCardException; + + abstract byte[] selectFileFID(byte[] fid) throws CardException, SignatureCardException; + + byte[] readBinary(CardChannel channel, int offset, int len) + throws CardException, SignatureCardException { + + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xB0, + 0x7F & (offset >> 8), offset & 0xFF, len)); + if (resp.getSW() == 0x9000) { + return resp.getData(); + } else { + throw new SignatureCardException("Failed to read bytes (" + offset + "+" + + len + "): SW=" + Integer.toHexString(resp.getSW())); + } + + } + + int readBinary(int offset, int len, byte[] b) + throws CardException, SignatureCardException { + + if (b.length < len) { + throw new IllegalArgumentException( + "Length of b must not be less than len."); + } + + CardChannel channel = getCardChannel(); + + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xB0, + 0x7F & (offset >> 8), offset & 0xFF, len)); + if (resp.getSW() == 0x9000) { + System.arraycopy(resp.getData(), 0, b, 0, len); + } + + return resp.getSW(); + + } + + byte[] readBinaryTLV(int maxSize, byte expectedType) throws CardException, SignatureCardException { + + CardChannel channel = getCardChannel(); + + // read first chunk + int len = Math.min(maxSize, ifs_); + byte[] chunk = readBinary(channel, 0, len); + if (chunk.length > 0 && chunk[0] != expectedType) { + return null; + } + int offset = chunk.length; + int actualSize = maxSize; + if (chunk.length > 3) { + if ((chunk[1] & 0x80) > 0) { + int octets = (0x0F & chunk[1]); + actualSize = 2 + octets; + for (int i = 1; i <= octets; i++) { + actualSize += (0xFF & chunk[i + 1]) << ((octets - i) * 8); + } + } else { + actualSize = 2 + chunk[1]; + } + } + ByteBuffer buffer = ByteBuffer.allocate(actualSize); + buffer.put(chunk, 0, Math.min(actualSize, chunk.length)); + while (offset < actualSize) { + len = Math.min(ifs_, actualSize - offset); + chunk = readBinary(channel, offset, len); + buffer.put(chunk); + offset += chunk.length; + } + return buffer.array(); + + } + + abstract int verifyPIN(PINProvider pinProvider, PINSpec spec, byte kid, int kfpc) throws CardException, SignatureCardException; + + public byte[] readTLVFile(byte[] aid, byte[] ef, int maxLength) throws SignatureCardException { + return readTLVFilePIN(aid, ef, (byte) 0, null, null, maxLength); + } + + public byte[] readTLVFilePIN(byte[] aid, byte[] ef, byte kid, + PINProvider provider, PINSpec spec, int maxLength) throws SignatureCardException { + + try { + + // SELECT FILE (AID) + byte[] rb = selectFileAID(aid); + if (rb[rb.length - 2] != (byte) 0x90 || + rb[rb.length - 1] != (byte) 0x00) { + + throw new SignatureCardException( + "SELECT FILE with " + + "AID=" + toString(aid) + " failed (" + + "SW=" + + Integer.toHexString( + (0xFF & (int) rb[rb.length - 1]) | + (0xFF & (int) rb[rb.length - 2]) << 8) + + ")."); + + } + + // SELECT FILE (EF) + rb = selectFileFID(ef); + if (rb[rb.length - 2] != (byte) 0x90 || + rb[rb.length - 1] != (byte) 0x00) { + + throw new SignatureCardException( + "SELECT FILE with " + + "FID=" + toString(ef) + " failed (" + + "SW=" + + Integer.toHexString( + (0xFF & (int) rb[rb.length - 1]) | + (0xFF & (int) rb[rb.length - 2]) << 8) + + ")."); + } + + // try to READ BINARY + int sw = readBinary(0, 1, new byte[1]); + if (provider != null && sw == 0x6982) { + + // VERIFY + int kfpc = -1; // unknown + while (true) { + kfpc = verifyPIN(provider, spec, kid, kfpc); + if (kfpc < -1) { + return null; + } else if (kfpc < 0) { + break; + } + } + } else if (sw != 0x9000) { + throw new SignatureCardException("READ BINARY failed (SW=" + + Integer.toHexString(sw) + ")."); + } + + // READ BINARY + byte[] data = readBinaryTLV(maxLength, (byte) 0x30); + + return data; + + + } catch (CardException e) { + throw new SignatureCardException("Failed to acces card.", e); + } + + } + + + ResponseAPDU transmit(CardChannel channel, CommandAPDU commandAPDU) throws CardException { + logger.fine(commandAPDU + "\n" + toString(commandAPDU.getBytes())); + long t0 = System.currentTimeMillis(); + ResponseAPDU responseAPDU = channel.transmit(commandAPDU); + long t1 = System.currentTimeMillis(); + logger.fine(responseAPDU + "\n[" + (t1 - t0) + "ms] " + toString(responseAPDU.getBytes())); + return responseAPDU; + } + + public void init(Card card) { + card_ = card; + ATR atr = card.getATR(); + byte[] atrBytes = atr.getBytes(); + if (atrBytes.length >= 6) { + ifs_ = 0xFF & atr.getBytes()[6]; + logger.finer("Setting IFS (information field size) to " + ifs_); + } + } + + CardChannel getCardChannel() { + return card_.getBasicChannel(); + } + + + @Override + public void setLocale(Locale locale) { + if (locale == null) { + throw new NullPointerException("Locale must not be set to null"); + } + this.locale = locale; + } + + protected ResourceBundle getResourceBundle() { + if (i18n == null) { + i18n = ResourceBundle.getBundle(resourceBundleName, locale); + } + return i18n; + } +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/CancelledException.java b/smcc/src/main/java/at/gv/egiz/smcc/CancelledException.java new file mode 100644 index 00000000..347d74c9 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/CancelledException.java @@ -0,0 +1,39 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc; + +public class CancelledException extends SignatureCardException { + + private static final long serialVersionUID = 1L; + + public CancelledException() { + super(); + } + + public CancelledException(String message, Throwable cause) { + super(message, cause); + } + + public CancelledException(String message) { + super(message); + } + + public CancelledException(Throwable cause) { + super(cause); + } + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/CardNotSupportedException.java b/smcc/src/main/java/at/gv/egiz/smcc/CardNotSupportedException.java new file mode 100644 index 00000000..e2a5fe16 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/CardNotSupportedException.java @@ -0,0 +1,74 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +public class CardNotSupportedException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance of this CardNotSupportedException. + * + */ + public CardNotSupportedException() { + super(); + } + + /** + * Creates a new instance of this CardNotSupportedException. + * + * @param message + * @param cause + */ + public CardNotSupportedException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Creates a new instance of this CardNotSupportedException. + * + * @param message + */ + public CardNotSupportedException(String message) { + super(message); + } + + /** + * Creates a new instance of this CardNotSupportedException. + * + * @param cause + */ + public CardNotSupportedException(Throwable cause) { + super(cause); + } + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/PINProvider.java b/smcc/src/main/java/at/gv/egiz/smcc/PINProvider.java new file mode 100644 index 00000000..844115a4 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/PINProvider.java @@ -0,0 +1,35 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +public interface PINProvider { + + public String providePIN(PINSpec spec, int retries); + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/PINSpec.java b/smcc/src/main/java/at/gv/egiz/smcc/PINSpec.java new file mode 100644 index 00000000..cc54a337 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/PINSpec.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.smcc; + +import java.util.ResourceBundle; + +/** + * + * @author mcentner + */ +public class PINSpec { + + int minLength_ = 0; + + int maxLength_ = -1; + + String rexepPattern_; + + ResourceBundle resourceBundle_; + + String name_; + + public PINSpec(int minLenght, int maxLength, String rexepPattern, + ResourceBundle resourceBundle, String name) { + + minLength_ = minLenght; + maxLength_ = maxLength; + rexepPattern_ = rexepPattern; + resourceBundle_ = resourceBundle; + name_ = name; + } + + public PINSpec(int minLenght, int maxLength, String rexepPattern, + String name) { + + minLength_ = minLenght; + maxLength_ = maxLength; + rexepPattern_ = rexepPattern; + name_ = name; + } + + + + public String getLocalizedName() { + + return (resourceBundle_ != null) + ? resourceBundle_.getString(name_) + : name_; + + } + + public int getMaxLength() { + return maxLength_; + } + + public int getMinLength() { + return minLength_; + } + + public String getRexepPattern() { + return rexepPattern_; + } + + + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java new file mode 100644 index 00000000..79e2663e --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java @@ -0,0 +1,341 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +import java.math.BigInteger; +import java.util.Arrays; + +import javax.smartcardio.CardChannel; +import javax.smartcardio.CardException; +import javax.smartcardio.CommandAPDU; +import javax.smartcardio.ResponseAPDU; + +public class STARCOSCard extends AbstractSignatureCard implements SignatureCard { + + public static final byte[] MF = new byte[] { (byte) 0x3F, (byte) 0x00 }; + + public static final byte[] AID_INFOBOX = new byte[] { (byte) 0xd0, + (byte) 0x40, (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x00, + (byte) 0x18, (byte) 0x01 }; + + public static final byte[] EF_INFOBOX = new byte[] { (byte) 0xef, (byte) 0x01 }; + + public static final byte[] AID_SVSIG_CERT = new byte[] { (byte) 0xd0, + (byte) 0x40, (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x00, + (byte) 0x10, (byte) 0x01 }; + + public static final byte[] EF_SVSIG_CERT_CA = new byte[] { (byte) 0x2f, + (byte) 0x01 }; + + public static final byte[] EF_SVSIG_CERT = new byte[] { (byte) 0x2f, + (byte) 0x02 }; + + // Sichere Signatur (SS) + + public static final byte[] AID_DF_SS = new byte[] { (byte) 0xd0, (byte) 0x40, + (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x00, (byte) 0x12, + (byte) 0x01 }; + + public static final byte[] EF_C_X509_CH_DS = new byte[] { (byte) 0xc0, + (byte) 0x00 }; + + public static final byte[] EF_C_X509_CA_CS_DS = new byte[] { (byte) 0xc6, + (byte) 0x08 }; + + public static final byte[] DST_SS = new byte[] { (byte) 0x84, (byte) 0x03, // tag + // , + // length + // ( + // key + // desc + // . + // ) + (byte) 0x80, (byte) 0x02, (byte) 0x00, // local, key ID, key version + (byte) 0x89, (byte) 0x03, // tag, length (algorithm ID) + (byte) 0x13, (byte) 0x35, (byte) 0x10 // ECDSA + }; + + public static final byte KID_PIN_SS = (byte) 0x81; + + // Gew�hnliche Signatur (GS) + + public static final byte[] AID_DF_GS = new byte[] { (byte) 0xd0, (byte) 0x40, + (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x00, (byte) 0x13, + (byte) 0x01 }; + + public static final byte[] EF_C_X509_CH_AUT = new byte[] { (byte) 0x2f, + (byte) 0x01 }; + + public static final byte[] EF_C_X509_CA_CS = new byte[] { (byte) 0x2f, + (byte) 0x02 }; + + public static final byte[] DST_GS = new byte[] { (byte) 0x84, (byte) 0x03, // tag + // , + // length + // ( + // key + // desc + // . + // ) + (byte) 0x80, (byte) 0x02, (byte) 0x00, // local, key ID, key version + (byte) 0x89, (byte) 0x01, // tag, length (algorithm ID) + (byte) 0x14 // ECDSA + }; + + public static final byte KID_PIN_CARD = (byte) 0x01; + + public STARCOSCard() { + super("at/gv/egiz/smcc/STARCOSCard"); + } + + public byte[] getCertificate(KeyboxName keyboxName) + throws SignatureCardException { + + if (keyboxName == KeyboxName.SECURE_SIGNATURE_KEYPAIR) { + return readTLVFile(AID_DF_SS, EF_C_X509_CH_DS, 2000); + } else if (keyboxName == KeyboxName.CERITIFIED_KEYPAIR) { + return readTLVFile(AID_DF_GS, EF_C_X509_CH_AUT, 2000); + } else { + throw new IllegalArgumentException("Keybox " + keyboxName + + " not supported."); + } + + } + + byte[] selectFileAID(byte[] fid) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xA4, 0x04, + 0x04, fid, 256)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("Failed to select file (AID=" + + toString(fid) + "): SW=" + Integer.toHexString(resp.getSW()) + "."); + } else { + return resp.getBytes(); + } + } + + void selectMF() throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xA4, 0x00, + 0x0C)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("Failed to select MF: SW=" + + Integer.toHexString(resp.getSW()) + "."); + } + } + + byte[] selectFileFID(byte[] fid) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0xA4, 0x02, + 0x04, fid, 256)); + if (resp.getSW() == 0x6a82) { + throw new SignatureCardException("Failed to select file (FID=" + + toString(fid) + "): SW=" + Integer.toHexString(resp.getSW()) + "."); + } else { + return resp.getBytes(); + } + } + + void mseSetDST(byte[] dst) throws CardException, SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x22, 0x41, + 0xB6, dst)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("MSE:SET DST failed: SW=" + + Integer.toHexString(resp.getSW())); + } + } + + void psoHash(byte[] hash) throws CardException, SignatureCardException { + byte[] data = new byte[hash.length + 2]; + data[0] = (byte) 0x90; // tag + data[1] = (byte) (hash.length); // length + System.arraycopy(hash, 0, data, 2, hash.length); + + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x2A, 0x90, + 0xA0, data)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException("PSO:HASH failed: SW=" + + Integer.toHexString(resp.getSW())); + } + } + + byte[] psoComputDigitalSiganture() throws CardException, + SignatureCardException { + CardChannel channel = getCardChannel(); + ResponseAPDU resp = transmit(channel, new CommandAPDU(0x00, 0x2A, 0x9E, + 0x9A, 256)); + if (resp.getSW() != 0x9000) { + throw new SignatureCardException( + "PSO: COMPUTE DIGITAL SIGNATRE failed: SW=" + + Integer.toHexString(resp.getSW())); + } else { + return resp.getData(); + } + } + + int verifyPIN(PINProvider pinProvider, PINSpec spec, byte kid, int kfpc) + throws CardException, SignatureCardException { + + CardChannel channel = getCardChannel(); + + // get number of possible retries + ResponseAPDU resp = transmit(channel, + new CommandAPDU(0x00, 0x20, 0x00, kid)); + int retries; + if (resp.getSW1() == 0x63 && resp.getSW2() >> 4 == 0xc) { + retries = resp.getSW2() & 0x0f; + } else if (resp.getSW() == 0x6984) { + // PIN LCS = "Initilized" (not activated) + throw new SignatureCardException(spec.getLocalizedName() + " not set."); + } else { + throw new SignatureCardException("Failed to get PIN retries: SW=" + + Integer.toHexString(resp.getSW())); + } + + // get PIN + String pin = pinProvider.providePIN(spec, retries); + if (pin == null) { + // User canceled operation + // throw new CancelledException("User canceld PIN entry"); + return -2; + } + // PIN length in bytes + int len = (int) Math.ceil(pin.length() / 2); + + // BCD encode PIN and marshal PIN block + byte[] pinBytes = new BigInteger(pin, 16).toByteArray(); + byte[] pinBlock = new byte[8]; + if (len < pinBytes.length) { + System.arraycopy(pinBytes, pinBytes.length - len, pinBlock, 1, len); + } else { + System.arraycopy(pinBytes, 0, pinBlock, len - pinBytes.length + 1, + pinBytes.length); + } + pinBlock[0] = (byte) (0x20 + len * 2); + Arrays.fill(pinBlock, len + 1, 8, (byte) 0xff); + + resp = transmit(channel, new CommandAPDU(0x00, 0x20, 0x00, kid, pinBlock)); + if (resp.getSW1() == 0x63 && resp.getSW2() >> 4 == 0xc) { + return resp.getSW2() & 0x0f; + } else if (resp.getSW() != 0x9000) { + throw new SignatureCardException("Failed to verify pin: SW=" + + Integer.toHexString(resp.getSW())); + } else { + return -1; + } + + } + + public byte[] createSignature(byte[] hash, KeyboxName keyboxName, + PINProvider provider) throws SignatureCardException { + + if (hash.length != 20) { + throw new IllegalArgumentException("Hash value must be of length 20"); + } + + byte[] aid; + byte kid; + byte[] dst; + PINSpec spec; + if (KeyboxName.SECURE_SIGNATURE_KEYPAIR.equals(keyboxName)) { + aid = AID_DF_SS; + kid = KID_PIN_SS; + dst = DST_SS; + spec = new PINSpec(6, 10, "[0-9]", getResourceBundle().getString("sig.pin.name")); + + } else if (KeyboxName.CERITIFIED_KEYPAIR.equals(keyboxName)) { + aid = AID_DF_GS; + kid = KID_PIN_CARD; + dst = DST_GS; + spec = new PINSpec(4, 4, "[0-9]", getResourceBundle().getString("card.pin.name")); + + } else { + throw new IllegalArgumentException("KeyboxName '" + keyboxName + + "' not supported."); + } + + try { + + // SELECT MF + selectMF(); + // SELECT DF + selectFileAID(aid); + // VERIFY + int retr = -1; // unknown + while (true) { + retr = verifyPIN(provider, spec, kid, retr); + if (retr < -1) { + return null; + } else if (retr < 0) { + break; + } + } + // MSE: SET DST + mseSetDST(dst); + // PSO: HASH + psoHash(hash); + // PSO: COMPUTE DIGITAL SIGNATURE + byte[] rs = psoComputDigitalSiganture(); + return rs; + + } catch (CardException e) { + throw new SignatureCardException("Failed to create signature.", e); + } + + } + + public byte[] getInfobox(String infobox, PINProvider provider, String domainId) + throws SignatureCardException { + + if ("IdentityLink".equals(infobox)) { + + PINSpec spec = new PINSpec(4, 4, "[0-9]", getResourceBundle().getString("card.pin.name")); + try { + byte[] res = readTLVFilePIN(AID_INFOBOX, EF_INFOBOX, KID_PIN_CARD, + provider, spec, 2000); + return res; + } catch (Exception e) { + throw new SignatureCardException(e); + } + } else { + throw new IllegalArgumentException("Infobox '" + infobox + + "' not supported."); + } + + } + + public String toString() { + return "eCard"; + } + + + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java new file mode 100644 index 00000000..f19bc709 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java @@ -0,0 +1,322 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.smcc; + +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.security.InvalidKeyException; +import java.security.Key; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.Signature; +import java.security.SignatureException; +import java.security.UnrecoverableKeyException; +import java.security.cert.Certificate; +import java.security.cert.CertificateEncodingException; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.util.Enumeration; +import java.util.Locale; + +import javax.smartcardio.Card; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * + * @author mcentner + */ +public class SWCard implements SignatureCard { + + private static final String BKU_USER_DIR = ".bku"; + + private static final String SWCARD_DIR = "smcc"; + + private static final String KEYSTORE_CERTIFIED_KEYPAIR = "certified.p12"; + + private static final String CERTIFICATE_CERTIFIED_KEYPAIR = "certified.cer"; + + private static final String KEYSTORE_SECURE_KEYPAIR = "secure.p12"; + + private static final String CERTIFICATE_SECURE_KEYPAIR = "secure.cer"; + + private static String swCardDir; + + private static Log log = LogFactory.getLog(SWCard.class); + + private KeyStore certifiedKeyStore; + + private KeyStore secureKeyStore; + + private Certificate certifiedCertificate; + + private Certificate secureCertificate; + + static { + String userHome = System.getProperty("user.home"); + String fs = System.getProperty("file.separator"); + swCardDir = userHome + fs + BKU_USER_DIR + fs + SWCARD_DIR; + } + + /** + * @return the swCardDir + */ + public static String getSwCardDir() { + return swCardDir; + } + + /** + * @param swCardDir the swCardDir to set + */ + public static void setSwCardDir(String swCardDir) { + SWCard.swCardDir = swCardDir; + } + + public void init(Card card) { + } + + private String getFileName(String fileName) { + String fs = System.getProperty("file.separator"); + return swCardDir + fs + fileName; + } + + private Certificate loadCertificate(String certificateFileName) throws SignatureCardException { + + final String certificateType = "x509"; + CertificateFactory factory; + try { + factory = CertificateFactory.getInstance(certificateType); + } catch (CertificateException e) { + String msg = "Failed to get CertificateFactory instance for type '" + certificateType + "'."; + log.error(msg, e); + throw new SignatureCardException(msg, e); + } + + // try to load Certificate file + String fileName = getFileName(certificateFileName); + log.info("Trying to load Certificate from file '" + fileName + "'."); + + FileInputStream certificateFile; + try { + certificateFile = new FileInputStream(fileName); + } catch (FileNotFoundException e) { + String msg = "Certificate file '" + fileName + "' not found."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + + Certificate certificate; + try { + certificate = factory.generateCertificate(certificateFile); + } catch (CertificateException e) { + String msg = "Failed to load Certificate from file '" + fileName + "'."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + + return certificate; + + } + + private KeyStore loadKeyStore(String keyStoreFileName, char[] password) throws SignatureCardException { + + final String keyStoreType = "pkcs12"; + KeyStore keyStore; + try { + keyStore = KeyStore.getInstance(keyStoreType); + } catch (KeyStoreException e) { + String msg = "Failed to get KeyStore instance for KeyStore type '" + keyStoreType + "'."; + log.error(msg, e); + throw new SignatureCardException(msg, e); + } + + // try to load KeyStore file + String fileName = getFileName(keyStoreFileName); + log.info("Trying to load KeyStore from file '" + fileName + "'."); + + FileInputStream keyStoreFile; + try { + keyStoreFile = new FileInputStream(fileName); + } catch (FileNotFoundException e) { + String msg = "KeyStore file '"+ fileName + "' not found."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + + try { + keyStore.load(keyStoreFile, null); + } catch (Exception e) { + String msg = "Failed to load KeyStore from file '" + fileName + "'."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + + return keyStore; + + + } + + private KeyStore getKeyStore(KeyboxName keyboxName, char[] password) throws SignatureCardException { + + if (keyboxName == KeyboxName.CERITIFIED_KEYPAIR) { + if (certifiedKeyStore == null) { + certifiedKeyStore = loadKeyStore(KEYSTORE_CERTIFIED_KEYPAIR, password); + } + return certifiedKeyStore; + } else if (keyboxName == KeyboxName.SECURE_SIGNATURE_KEYPAIR) { + if (secureKeyStore == null) { + secureKeyStore = loadKeyStore(KEYSTORE_SECURE_KEYPAIR, password); + } + return secureKeyStore; + } else { + throw new SignatureCardException("Keybox of type '" + keyboxName + "' not supported."); + } + + } + + + public byte[] getCertificate(KeyboxName keyboxName) + throws SignatureCardException { + + try { + if (keyboxName == KeyboxName.CERITIFIED_KEYPAIR) { + if (certifiedCertificate == null) { + certifiedCertificate = loadCertificate(CERTIFICATE_CERTIFIED_KEYPAIR); + } + return certifiedCertificate.getEncoded(); + } else if (keyboxName == KeyboxName.SECURE_SIGNATURE_KEYPAIR) { + if (secureCertificate == null) { + secureCertificate = loadCertificate(CERTIFICATE_SECURE_KEYPAIR); + } + return secureCertificate.getEncoded(); + } else { + throw new SignatureCardException("Keybox of type '" + keyboxName + "' not supported."); + } + } catch (CertificateEncodingException e) { + throw new SignatureCardException("Failed to get encoded Certificate.", e); + } + + + } + + public byte[] getInfobox(String infobox, PINProvider provider, String domainId) throws SignatureCardException { + + String fileName = getFileName(infobox + ".ibx"); + FileInputStream file; + try { + file = new FileInputStream(fileName); + } catch (FileNotFoundException e) { + String msg = "Infobox '" + infobox + "' not found."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + try { + byte[] b = new byte[512]; + for(int l; (l = file.read(b)) != -1;) { + bytes.write(b, 0, l); + } + file.close(); + } catch (IOException e) { + String msg = "Failed to read infobox '" + infobox + "'."; + log.error(msg, e); + throw new SignatureCardException(msg, e); + } + + return bytes.toByteArray(); + + } + + public byte[] createSignature(byte[] hash, KeyboxName keyboxName, PINProvider provider) throws SignatureCardException { + + // KeyStore password + PINSpec pinSpec = new PINSpec(0, -1, ".", "KeyStore-Password"); + + KeyStore keyStore = getKeyStore(keyboxName, null); + + PrivateKey privateKey = null; + + try { + for (Enumeration aliases = keyStore.aliases(); aliases + .hasMoreElements() && privateKey == null;) { + String alias = aliases.nextElement(); + log.debug("Found alias '" + alias + "' in keystore"); + if (keyStore.isKeyEntry(alias)) { + Key key = null; + while (key == null) { + try { + String pin = provider.providePIN(pinSpec, -1); + key = keyStore.getKey(alias, pin.toCharArray()); + } catch (UnrecoverableKeyException e) { + log.info("Failed to get Key from KeyStore. Wrong password?", e); + } + } + privateKey = (PrivateKey) key; + } + } + } catch (Exception e) { + String msg = "Failed to get certificate from KeyStore."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + + if (privateKey == null) { + String msg = "No private key found in KeyStore."; + log.info(msg); + throw new SignatureCardException(msg); + } + + String algorithm = privateKey.getAlgorithm(); + algorithm = "SHA1with" + algorithm; + try { + Signature signature = Signature.getInstance(algorithm); + signature.initSign(privateKey); + signature.update(hash); + return signature.sign(); + } catch (NoSuchAlgorithmException e) { + String msg = "Algorithm + '" + algorithm + "' not supported for signing."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } catch (SignatureException e) { + String msg = "Signing faild."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } catch (InvalidKeyException e) { + String msg = "Key not valid for algorithm + '" + algorithm + "'."; + log.info(msg, e); + throw new SignatureCardException(msg, e); + } + + } + + @Override + public void setLocale(Locale locale) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Not supported yet."); + } + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java new file mode 100644 index 00000000..18a63514 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java @@ -0,0 +1,103 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +import java.util.Locale; + +import javax.smartcardio.Card; + +public interface SignatureCard { + + public static class KeyboxName { + + public static KeyboxName SECURE_SIGNATURE_KEYPAIR = new KeyboxName( + "SecureSignatureKeypair"); + public static KeyboxName CERITIFIED_KEYPAIR = new KeyboxName( + "CertifiedKeypair"); + + private String keyboxName_; + + private KeyboxName(String keyboxName_) { + this.keyboxName_ = keyboxName_; + } + + public static KeyboxName getKeyboxName(String keyBox) { + if (SECURE_SIGNATURE_KEYPAIR.equals(keyBox)) { + return SECURE_SIGNATURE_KEYPAIR; + } else if (CERITIFIED_KEYPAIR.equals(keyBox)) { + return CERITIFIED_KEYPAIR; + } else { + return new KeyboxName(keyBox); + } + } + + public boolean equals(Object obj) { + if (obj instanceof String) { + return obj.equals(keyboxName_); + } + if (obj instanceof KeyboxName) { + return ((KeyboxName) obj).keyboxName_.equals(keyboxName_); + } else { + return super.equals(obj); + } + } + + public String getKeyboxName() { + return keyboxName_; + } + + } + + public void init(Card card); + + public byte[] getCertificate(KeyboxName keyboxName) + throws SignatureCardException; + + /** + * + * @param infobox + * @param provider + * @param domainId may be null. + * @return + * @throws SignatureCardException + */ + public byte[] getInfobox(String infobox, PINProvider provider, String domainId) + throws SignatureCardException; + + public byte[] createSignature(byte[] hash, KeyboxName keyboxName, + PINProvider provider) throws SignatureCardException; + + /** + * Sets the local for evtl. required callbacks (e.g. PINSpec) + * @param locale must not be null; + */ + public void setLocale(Locale locale); + + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SignatureCardException.java b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCardException.java new file mode 100644 index 00000000..f2a964fe --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCardException.java @@ -0,0 +1,76 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +public class SignatureCardException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance of this SignatureCardException. + * + */ + public SignatureCardException() { + super(); + } + + /** + * Creates a new instance of this SignatureCardException. + * + * @param message + * @param cause + */ + public SignatureCardException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Creates a new instance of this SignatureCardException. + * + * @param message + */ + public SignatureCardException(String message) { + super(message); + } + + /** + * Creates a new instance of this SignatureCardException. + * + * @param cause + */ + public SignatureCardException(Throwable cause) { + super(cause); + } + + + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SignatureCardFactory.java b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCardFactory.java new file mode 100644 index 00000000..2131a737 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCardFactory.java @@ -0,0 +1,97 @@ +//Copyright (C) 2002 IAIK +//http://jce.iaik.at +// +//Copyright (C) 2003 Stiftung Secure Information and +// Communication Technologies SIC +//http://www.sic.st +// +//All rights reserved. +// +//This source is provided for inspection purposes and recompilation only, +//unless specified differently in a contract with IAIK. This source has to +//be kept in strict confidence and must not be disclosed to any third party +//under any circumstances. Redistribution in source and binary forms, with +//or without modification, are permitted in any case! +// +//THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +//OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +//OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +//SUCH DAMAGE. +// +// +package at.gv.egiz.smcc; + +import javax.smartcardio.ATR; +import javax.smartcardio.Card; + +public class SignatureCardFactory { + + public static SignatureCardFactory getInstance() { + return new SignatureCardFactory(); + } + + private SignatureCardFactory() { + + } + + public SignatureCard createSignatureCard(Card card) + throws CardNotSupportedException { + + if(card == null) { + SignatureCard sCard = new SWCard(); + sCard.init(card); + return sCard; + } + + ATR atr = card.getATR(); + byte[] historicalBytes = atr.getHistoricalBytes(); + if(historicalBytes == null || historicalBytes.length < 3) { + throw new CardNotSupportedException("Card not supported: ATR=" + toString(atr.getBytes())); + } + + int t = ((0xFF & (int) historicalBytes[0]) << 16) + + ((0xFF & (int) historicalBytes[1]) << 8) + + (0xFF & (int) historicalBytes[2]); + + SignatureCard sCard; + switch (t) { + case 0x455041 : + case 0x4D4341 : + sCard = new ACOSCard(); + break; + + case 0x805102 : + sCard = new STARCOSCard(); + break; + + default : + throw new CardNotSupportedException("Card not supported: ATR=" + toString(atr.getBytes())); + } + sCard.init(card); + return sCard; + + } + + public static String toString(byte[] b) { + StringBuffer sb = new StringBuffer(); + if (b != null && b.length > 0) { + sb.append(Integer.toHexString((b[0] & 240) >> 4)); + sb.append(Integer.toHexString(b[0] & 15)); + } + for(int i = 1; i < b.length; i++) { + sb.append(':'); + sb.append(Integer.toHexString((b[i] & 240) >> 4)); + sb.append(Integer.toHexString(b[i] & 15)); + } + return sb.toString(); + } + + +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java new file mode 100644 index 00000000..3d1fd7c7 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java @@ -0,0 +1,150 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc.util; + +import java.util.Locale; +import java.util.Map; + +import javax.smartcardio.ATR; +import javax.smartcardio.Card; +import javax.smartcardio.CardTerminal; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.smcc.CardNotSupportedException; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.smcc.SignatureCardFactory; + +public class SMCCHelper { + + public final static int NO_CARD = 0; + public final static int PC_SC_NOT_SUPPORTED = 1; + public final static int TERMINAL_NOT_PRESENT = 2; + public final static int CARD_NOT_SUPPORTED = 3; + public final static int CARD_FOUND = 4; + + private final static Log log = LogFactory.getLog(SMCCHelper.class); + + protected SmartCardIO smartCardIO = new SmartCardIO(); + protected int resultCode = NO_CARD; + protected SignatureCard signatureCard = null; + protected static boolean useSWCard = false; + + public SMCCHelper() { + update(); + } + + public void update() { + update(-1); + } + + public void update(int sleep) { + SignatureCardFactory factory = SignatureCardFactory.getInstance(); + if (useSWCard) { + try { + signatureCard = factory.createSignatureCard(null); + resultCode = CARD_FOUND; + } catch (CardNotSupportedException e) { + resultCode = CARD_NOT_SUPPORTED; + signatureCard = null; + } + return; + } + signatureCard = null; + resultCode = NO_CARD; + // find pcsc support + if (smartCardIO.isPCSCSupported()) { + // find supported card + if (smartCardIO.isTerminalPresent()) { + Map newCards = null; + if (sleep > 0) { + smartCardIO.waitForInserted(sleep); + + } + newCards = smartCardIO.getCards(); + for (CardTerminal cardTerminal : newCards.keySet()) { + try { + Card c = newCards.get(cardTerminal); + if (c == null) { + throw new CardNotSupportedException(); + } + signatureCard = factory.createSignatureCard(c); + ATR atr = newCards.get(cardTerminal).getATR(); + log.trace("Found supported card (" + signatureCard.toString() + ") " + + "in terminal '" + cardTerminal.getName() + "', ATR = " + + toString(atr.getHistoricalBytes()) + "."); + resultCode = CARD_FOUND; + break; + + } catch (CardNotSupportedException e) { + Card c = newCards.get(cardTerminal); + if (c != null) { + ATR atr = c.getATR(); + log.info("Found unsupported card" + " in terminal '" + + cardTerminal.getName() + "', ATR = " + + toString(atr.getHistoricalBytes()) + "."); + } else { + log.info("Found unsupported card in terminal '" + + cardTerminal.getName() + "' without ATR"); + } + resultCode = CARD_NOT_SUPPORTED; + } + } + } else { + resultCode = TERMINAL_NOT_PRESENT; + } + } else { + resultCode = PC_SC_NOT_SUPPORTED; + } + } + + public SignatureCard getSignatureCard(Locale locale) { + if (signatureCard != null) { + signatureCard.setLocale(locale); + } + return signatureCard; + } + + public int getResultCode() { + return resultCode; + } + + public static String toString(byte[] b) { + StringBuffer sb = new StringBuffer(); + sb.append('['); + if (b != null && b.length > 0) { + sb.append(Integer.toHexString((b[0] & 240) >> 4)); + sb.append(Integer.toHexString(b[0] & 15)); + for (int i = 1; i < b.length; i++) { + sb.append((i % 32 == 0) ? '\n' : ':'); + sb.append(Integer.toHexString((b[i] & 240) >> 4)); + sb.append(Integer.toHexString(b[i] & 15)); + } + } + sb.append(']'); + return sb.toString(); + } + + public static boolean isUseSWCard() { + return useSWCard; + } + + public static void setUseSWCard(boolean useSWCard) { + SMCCHelper.useSWCard = useSWCard; + } +} diff --git a/smcc/src/main/java/at/gv/egiz/smcc/util/SmartCardIO.java b/smcc/src/main/java/at/gv/egiz/smcc/util/SmartCardIO.java new file mode 100644 index 00000000..ffffd3af --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/util/SmartCardIO.java @@ -0,0 +1,196 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc.util; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.smartcardio.Card; +import javax.smartcardio.CardException; +import javax.smartcardio.CardTerminal; +import javax.smartcardio.CardTerminals; +import javax.smartcardio.TerminalFactory; +import javax.smartcardio.CardTerminals.State; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * + * @author mcentner + */ +public class SmartCardIO { + + private static final int STATE_INITIALIZED = 1; + + private static final int STATE_TERMINAL_FACTORY = 2; + + private static final int STATE_TERMINALS = 3; + + private static Log log = LogFactory.getLog(SmartCardIO.class); + + final Map terminalCard_ = new HashMap(); + + int state_ = STATE_INITIALIZED; + + TerminalFactory terminalFactory_ = null; + + CardTerminals cardTerminals_; + + private void updateTerminalFactory() { + TerminalFactory terminalFactory = TerminalFactory.getDefault(); + log.debug("TerminalFactory : " + terminalFactory); + if ("PC/SC".equals(terminalFactory.getType())) { + terminalFactory_ = terminalFactory; + } + if(state_ < STATE_TERMINAL_FACTORY) { + state_ = STATE_TERMINAL_FACTORY; + } + } + + public boolean isPCSCSupported() { + if(state_ < STATE_TERMINAL_FACTORY) { + updateTerminalFactory(); + } + return terminalFactory_ != null; + } + + private void updateCardTerminals() { + if(terminalFactory_ != null) { + cardTerminals_ = terminalFactory_.terminals(); + } + log.debug("CardTerminals : " + cardTerminals_); + if (state_ < STATE_TERMINALS) { + state_ = STATE_TERMINALS; + } + } + + public CardTerminals getCardTerminals() { + if(state_ < STATE_TERMINAL_FACTORY) { + updateTerminalFactory(); + } + if(state_ < STATE_TERMINALS) { + updateCardTerminals(); + } + return cardTerminals_; + } + + public boolean isTerminalPresent() { + CardTerminals cardTerminals = getCardTerminals(); + if (cardTerminals != null) { + List terminals = null; + try { + terminals = cardTerminals.list(State.ALL); + + // logging + if(log.isInfoEnabled()) { + if (terminals == null || terminals.isEmpty()) { + log.info("No card terminal found."); + } else { + StringBuffer msg = new StringBuffer(); + msg.append("Found " + terminals.size() + " card terminal(s):"); + for (CardTerminal terminal : terminals) { + msg.append("\n " + terminal.getName()); + } + log.info(msg.toString()); + } + } + + return terminals != null && !terminals.isEmpty(); + } catch (CardException e) { + log.info("Failed to list card terminals.", e); + return false; + } + } else { + return false; + } + } + + private Map updateCards() { + + // clear card references if removed + try { + log.trace("terminals.list(State.CARD_REMOVAL)"); + for (CardTerminal terminal : cardTerminals_.list(CardTerminals.State.CARD_REMOVAL)) { + Card card = terminalCard_.remove(terminal); + log.trace("card removed : " + card); + } + } catch (CardException e) { + log.debug(e); + } + + // check inserted cards + Map newCards = new HashMap(); + try { + log.trace("terminals.list(State.CARD_INSERTION)"); + for (CardTerminal terminal : cardTerminals_.list(CardTerminals.State.CARD_INSERTION)) { + + Card card = null; + try { + // try to connect to card + card = terminal.connect("*"); + } catch (CardException e) { + log.trace("Failed to connect to card.", e); + } + + // have we seen this card before? + if (terminalCard_.put(terminal, card) == null) { + terminalCard_.put(terminal, card); + newCards.put(terminal, card); + log.trace("terminal '" + terminal + "' card inserted : " + card); + } + } + } catch (CardException e) { + log.debug(e); + } + return newCards; + + } + + public Map getCards() { + if(state_ < STATE_TERMINAL_FACTORY) { + updateTerminalFactory(); + } + if(state_ < STATE_TERMINALS) { + updateCardTerminals(); + } + updateCards(); + Map terminalCard = new HashMap(); + terminalCard.putAll(terminalCard_); + return Collections.unmodifiableMap(terminalCard); + } + + public Map waitForInserted(int timeout) { + if(state_ < STATE_TERMINAL_FACTORY) { + updateTerminalFactory(); + } + if(state_ < STATE_TERMINALS) { + updateCardTerminals(); + } + try { + // just waiting for a short period of time to allow for abort + cardTerminals_.waitForChange(timeout); + } catch (CardException e) { + log.debug("CardTerminals.waitForChange(" + timeout + ") failed.", e); + } + Map newCards = new HashMap(); + newCards.putAll(updateCards()); + return Collections.unmodifiableMap(newCards); + } +} \ No newline at end of file diff --git a/smcc/src/main/java/at/gv/egiz/smcc/utils/SingletonPINProvider.java b/smcc/src/main/java/at/gv/egiz/smcc/utils/SingletonPINProvider.java new file mode 100644 index 00000000..e5030da2 --- /dev/null +++ b/smcc/src/main/java/at/gv/egiz/smcc/utils/SingletonPINProvider.java @@ -0,0 +1,38 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc.utils; + +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.PINSpec; + +public class SingletonPINProvider implements PINProvider { + + private String pin; + private boolean pin_already_provided = false; + + public SingletonPINProvider(String pin) { + this.pin = pin; + } + + public String providePIN(PINSpec spec, int retries) { + if (pin_already_provided) + return null; + pin_already_provided = true; + return pin; + } + +} diff --git a/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard.properties b/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard.properties new file mode 100644 index 00000000..9142841c --- /dev/null +++ b/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard.properties @@ -0,0 +1,21 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. + +dec.pin.name=Geheimhaltungs-PIN +sig.pin.name=Signature-PIN +inf.pin.name=Infobox-PIN diff --git a/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_de.properties b/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_de.properties new file mode 100644 index 00000000..d2bbe4f9 --- /dev/null +++ b/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_de.properties @@ -0,0 +1,21 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. + +dec.pin.name=Geheimhaltungs-PIN +sig.pin.name=Signatur-PIN +inf.pin.name=Infobox-PIN diff --git a/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_en.properties b/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_en.properties new file mode 100644 index 00000000..9142841c --- /dev/null +++ b/smcc/src/main/resources/at/gv/egiz/smcc/ACOSCard_en.properties @@ -0,0 +1,21 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. + +dec.pin.name=Geheimhaltungs-PIN +sig.pin.name=Signature-PIN +inf.pin.name=Infobox-PIN diff --git a/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard.properties b/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard.properties new file mode 100644 index 00000000..77935333 --- /dev/null +++ b/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard.properties @@ -0,0 +1,20 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. + +sig.pin.name=Signature-PIN +card.pin.name=Card-PIN diff --git a/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_de.properties b/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_de.properties new file mode 100644 index 00000000..6fa5f0fa --- /dev/null +++ b/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_de.properties @@ -0,0 +1,20 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. + +sig.pin.name=Signatur-PIN +card.pin.name=Karten-PIN diff --git a/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_en.properties b/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_en.properties new file mode 100644 index 00000000..77935333 --- /dev/null +++ b/smcc/src/main/resources/at/gv/egiz/smcc/STARCOSCard_en.properties @@ -0,0 +1,20 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To change this template, choose Tools | Templates +# and open the template in the editor. + +sig.pin.name=Signature-PIN +card.pin.name=Card-PIN diff --git a/smcc/src/test/java/at/gv/egiz/smcc/SMCCApplication.java b/smcc/src/test/java/at/gv/egiz/smcc/SMCCApplication.java new file mode 100644 index 00000000..5f4bb67e --- /dev/null +++ b/smcc/src/test/java/at/gv/egiz/smcc/SMCCApplication.java @@ -0,0 +1,46 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc; + +import java.util.Locale; + +import at.gv.egiz.smcc.util.SMCCHelper; + +public class SMCCApplication { + + /** + * @param args + */ + public static void main(String[] args) { + + SignatureCard sc = null; + SMCCHelper smccHelper = new SMCCHelper(); + while (smccHelper.getResultCode() != SMCCHelper.CARD_FOUND) { + System.out.println("Did not get a signature card ... "+smccHelper.getResultCode()); + smccHelper.update(); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + sc = smccHelper.getSignatureCard(Locale.getDefault()); + System.out.println("Found supported siganture card: "+sc); + } + +} diff --git a/smcc/src/test/java/at/gv/egiz/smcc/SWCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/SWCardTest.java new file mode 100644 index 00000000..5448fee2 --- /dev/null +++ b/smcc/src/test/java/at/gv/egiz/smcc/SWCardTest.java @@ -0,0 +1,63 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc; + +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +import at.gv.egiz.smcc.SignatureCard.KeyboxName; + +public class SWCardTest implements PINProvider { + + SWCard swCard = new SWCard(); + + public static void main(String[] args) throws Exception { + + SWCardTest swCardTest = new SWCardTest(); + swCardTest.test(); + + } + + public void test() throws SignatureCardException, NoSuchAlgorithmException { + + swCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR); + swCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR); + + BigInteger t = BigInteger.valueOf(System.currentTimeMillis()); + + MessageDigest messageDigest = MessageDigest.getInstance("SHA-1"); + byte[] hash = messageDigest.digest(t.toByteArray()); + + byte[] signature; + signature = swCard.createSignature(hash, KeyboxName.CERITIFIED_KEYPAIR, this); + System.out.println(SignatureCardFactory.toString(signature)); + + signature = swCard.createSignature(hash, KeyboxName.SECURE_SIGNATURE_KEYPAIR, this); + System.out.println(SignatureCardFactory.toString(signature)); + + byte[] infobox = swCard.getInfobox("IdentityLink", this, null); + System.out.println(SignatureCardFactory.toString(infobox)); + + } + + @Override + public String providePIN(PINSpec spec, int retries) { + return "buerger"; + } + +} diff --git a/smcc/src/test/resources/IdentityLink.bin b/smcc/src/test/resources/IdentityLink.bin new file mode 100644 index 00000000..16c7375b Binary files /dev/null and b/smcc/src/test/resources/IdentityLink.bin differ diff --git a/smcc/src/test/resources/log4j.properties b/smcc/src/test/resources/log4j.properties new file mode 100644 index 00000000..94662fd2 --- /dev/null +++ b/smcc/src/test/resources/log4j.properties @@ -0,0 +1,19 @@ +# loglever DEBUG, appender STDOUT +log4j.rootLogger=DEBUG, STDOUT +#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p |%d | %t | %c %x- %m%n + +### FILE appender +#log4j.appender.file=org.apache.log4j.RollingFileAppender +#log4j.appender.file.maxFileSize=100KB +#log4j.appender.file.maxBackupIndex=9 +#log4j.appender.file.File=egovbus_ca.log +#log4j.appender.file.threshold=info +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/smccSTAL/pom.xml b/smccSTAL/pom.xml new file mode 100644 index 00000000..4af8c6de --- /dev/null +++ b/smccSTAL/pom.xml @@ -0,0 +1,40 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + smccSTAL + smcc STAL + 1.0-SNAPSHOT + + + + at.gv.egiz + STAL + 1.0-SNAPSHOT + + + at.gv.egiz + smcc + 1.0-SNAPSHOT + + + at.gv.egiz + BKUCommonGUI + 1.0-SNAPSHOT + + + iaik + iaik_jce_me4se + + + commons-logging + commons-logging + + + \ No newline at end of file diff --git a/smccSTAL/src/main/java/META-INF/MANIFEST.MF b/smccSTAL/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/smccSTAL/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java new file mode 100644 index 00000000..e5afa478 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.gui.BKUGUIFacade; +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; + +public abstract class AbstractRequestHandler implements SMCCSTALRequestHandler, + ActionListener { + private final static Log log = LogFactory + .getLog(AbstractRequestHandler.class); + + protected SignatureCard card; + protected BKUGUIFacade gui; + protected static STALMessageConsumer messageConsumer = null; + protected String actionCommand; + protected boolean actionPerformed = false; + + @Override + public abstract STALResponse handleRequest(STALRequest request); + + @Override + public void init(SignatureCard sc, BKUGUIFacade gui) { + if ((sc == null) || (gui == null)) { + throw new NullPointerException("Parameter must not be set to null"); + } + this.card = sc; + this.gui = gui; + } + + public static void setMessageConsumer(STALMessageConsumer messageConsumer) { + AbstractRequestHandler.messageConsumer = messageConsumer; + } + + protected static void newSTALMessage(String caption, String message) { + if (messageConsumer != null) { + messageConsumer.consumeNewSTALMessage(caption, message); + } + } + + protected synchronized void waitForAction() { + try { + while (!actionPerformed) { + wait(); + } + } catch (InterruptedException e) { + log.info(e); + } + actionPerformed = false; + } + + private synchronized void actionPerformed() { + actionPerformed = true; + notifyAll(); + } + + @Override + public void actionPerformed(ActionEvent e) { + actionCommand = e.getActionCommand(); + actionPerformed(); + } + +} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java new file mode 100644 index 00000000..7bd9e264 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.gui.BKUGUIFacade; +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.smcc.util.SMCCHelper; +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.STAL; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.SignRequest; + +public abstract class AbstractSMCCSTAL implements STAL { + private static Log log = LogFactory.getLog(AbstractSMCCSTAL.class); + + protected Locale locale = Locale.getDefault(); + protected SMCCHelper smccHelper = new SMCCHelper(); + protected SignatureCard signatureCard = null; + protected static Map handlerMap = new HashMap(); + + static { + addRequestHandler(InfoboxReadRequest.class, new InfoBoxReadRequestHandler()); + addRequestHandler(SignRequest.class, new SignRequestHandler()); + } + + public AbstractSMCCSTAL() { + } + + /** + * Implementations must assign the signature card within this method. + * + * @return if the user canceled + */ + protected abstract boolean waitForCard(); + + protected abstract BKUGUIFacade getGUI(); + + @Override + public List handleRequest( + List requestList) { + log.debug("Got request list containing " + requestList.size() + + " STAL requests"); + List responseList = new ArrayList(requestList + .size()); + for (STALRequest request : requestList) { + log.info("Processing: " + request); + SMCCSTALRequestHandler handler = null; + handler = handlerMap.get(request.getClass().getSimpleName()); + if (handler != null) { + if (handler.requireCard()) { + if (waitForCard()) { + responseList.add(new ErrorResponse(6001)); + break; + } + } + try { + handler = handler.newInstance(); + handler.init(signatureCard, getGUI()); + responseList.add(handler.handleRequest(request)); + } catch (Exception e) { + log.info("Error while handling STAL request:" + e); + responseList.add(new ErrorResponse(6000)); + } + } else { + log.error("Cannot find a handler for STAL request: " + request); + responseList.add(new ErrorResponse()); + } + } + return responseList; + } + + public static void addRequestHandler(Class id, + SMCCSTALRequestHandler handler) { + log.debug("Registering STAL request handler: " + id.getSimpleName()); + handlerMap.put(id.getSimpleName(), handler); + } + + public static SMCCSTALRequestHandler getRequestHandler( + Class request) { + return handlerMap.get(request.getSimpleName()); + } + + @Override + public void setLocale(Locale locale) { + if (locale == null) { + throw new NullPointerException("Locale must not be set to null"); + } + this.locale = locale; + } +} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/DomainIdConverter.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/DomainIdConverter.java new file mode 100644 index 00000000..3a564b91 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/DomainIdConverter.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + +import iaik.me.asn1.ASN1; +import iaik.me.utils.Base64; + +import java.io.IOException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Vector; + +public class DomainIdConverter { + + private static String getBaseId(ASN1 identityLink) throws IOException { + + if (identityLink.getType() == ASN1.TYPE_SEQUENCE) { + ASN1 personData = identityLink.getElementAt(4); + if (personData.getType() == ASN1.TAG_CONTEXT_SPECIFIC) { + ASN1 physicalPersonData = personData.gvASN1(); + ASN1 baseId = physicalPersonData.getElementAt(0); + return baseId.gvString(); + } + throw new IOException("Invalid structure."); + + } + throw new IOException("Invalid structure."); + + } + + private static ASN1 replaceBaseId(ASN1 identityLink, String newBaseId) + throws IOException { + + ASN1 newIdentityLink = new ASN1(ASN1.TYPE_SEQUENCE, new Vector()); + for (int i = 0; i < identityLink.getSize(); i++) { + ASN1 asn1 = identityLink.getElementAt(i); + if (i == 4 && asn1.getType() == ASN1.TAG_CONTEXT_SPECIFIC) { + ASN1 physicalPersonData = asn1.gvASN1(); + ASN1 newPhysicalPersonData = new ASN1(ASN1.TYPE_SEQUENCE, + new Vector()); + newPhysicalPersonData.addElement(new ASN1(ASN1.TYPE_UTF8_STRING, + newBaseId)); + for (int j = 1; j < physicalPersonData.getSize(); j++) { + newPhysicalPersonData.addElement(physicalPersonData.getElementAt(j)); + } + asn1 = new ASN1(ASN1.TAG_CONTEXT_SPECIFIC, newPhysicalPersonData); + } + newIdentityLink.addElement(asn1); + } + return newIdentityLink; + + } + + public static byte[] convertDomainId(byte[] data, String domainId) + throws IOException, NoSuchAlgorithmException { + if (domainId == null) { + return data; + } + ASN1 identityLink = new ASN1(data); + MessageDigest sha = null; + sha = MessageDigest.getInstance("SHA"); + String base = getBaseId(identityLink); + sha.update((base + "+" + domainId).getBytes()); + String bpkStr = new String(Base64.encode(sha.digest())); + bpkStr = bpkStr.trim(); + identityLink = replaceBaseId(identityLink, bpkStr); + System.out.println(getBaseId(identityLink)); + return identityLink.getEncoded(); + } + +} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java new file mode 100644 index 00000000..7dc2e202 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java @@ -0,0 +1,140 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.smcc.CancelledException; +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.PINSpec; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.smcc.SignatureCardException; +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.InfoboxReadRequest; +import at.gv.egiz.stal.InfoboxReadResponse; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; + +public class InfoBoxReadRequestHandler extends AbstractRequestHandler implements + PINProvider { + + private static Log log = LogFactory.getLog(InfoBoxReadRequestHandler.class); + + private int retryCounter = 0; + + @Override + public STALResponse handleRequest(STALRequest request) { + if (request instanceof InfoboxReadRequest) { + InfoboxReadRequest infoBox = (InfoboxReadRequest) request; + try { + if (infoBox.getInfoboxIdentifier().equals("IdentityLink")) { + newSTALMessage("Message.RequestCaption", "Message.IdentityLink"); + log.debug("Handling identitylink infobox"); + byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), this, + infoBox.getDomainIdentifier()); + if (resp == null) { + log.info("Got null as result->user cancelled"); + return new ErrorResponse(6001); + } else { + try { + resp = DomainIdConverter.convertDomainId(resp, infoBox + .getDomainIdentifier()); + } catch (Exception e) { + log.error("Cannot convert domain specific id", e); + return new ErrorResponse(1000); + } + } + InfoboxReadResponse stalResp = new InfoboxReadResponse(); + stalResp.setInfoboxValue(resp); + return stalResp; + } else if (SignatureCard.KeyboxName.CERITIFIED_KEYPAIR.equals(infoBox + .getInfoboxIdentifier())) { + newSTALMessage("Message.RequestCaption", "Message.CertifiedKeypair"); + log.debug("Handling certified keypair infobox"); + byte[] resp = card + .getCertificate(SignatureCard.KeyboxName.CERITIFIED_KEYPAIR); + if (resp == null) { + return new ErrorResponse(6001); + } + InfoboxReadResponse stalResp = new InfoboxReadResponse(); + stalResp.setInfoboxValue(resp); + return stalResp; + } else if (SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR + .equals(infoBox.getInfoboxIdentifier())) { + newSTALMessage("Message.RequestCaption", + "Message.SecureSignatureKeypair"); + log.debug("Handling secure signature keypair infobox"); + byte[] resp = card + .getCertificate(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR); + if (resp == null) { + return new ErrorResponse(6001); + } + InfoboxReadResponse stalResp = new InfoboxReadResponse(); + stalResp.setInfoboxValue(resp); + return stalResp; + } else { + newSTALMessage("Message.RequestCaption", "Message.InfoboxReadRequest"); + log.warn("Unknown infobox identifier: " + + infoBox.getInfoboxIdentifier() + " trying generic request"); + byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), this, + infoBox.getDomainIdentifier()); + if (resp == null) { + return new ErrorResponse(6001); + } + InfoboxReadResponse stalResp = new InfoboxReadResponse(); + stalResp.setInfoboxValue(resp); + return stalResp; + } + } catch (CancelledException cx) { + log.debug("User cancelled request", cx); + return new ErrorResponse(6001); + } catch (SignatureCardException e) { + log.info("Error while reading infobox: " + e); + return new ErrorResponse(4000); + } + } else { + log.fatal("Got unexpected STAL request: " + request); + return new ErrorResponse(1000); + } + } + + @Override + public boolean requireCard() { + return true; + } + + @Override + public String providePIN(PINSpec spec, int retries) { + if (retryCounter++ > 0) { + log.info("PIN wrong retrying ..."); + gui.showCardPINRetryDialog(spec, retries, this, "ok", this, "cancel"); + } else { + gui.showCardPINDialog(spec, this, "ok", this, "cancel"); + } + waitForAction(); + if (actionCommand.equals("cancel")) { + return null; + } + return new String(gui.getPin()); + } + + @Override + public SMCCSTALRequestHandler newInstance() { + return new InfoBoxReadRequestHandler(); + } +} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SMCCSTALRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SMCCSTALRequestHandler.java new file mode 100644 index 00000000..7badb2a0 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SMCCSTALRequestHandler.java @@ -0,0 +1,36 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + + +import at.gv.egiz.bku.gui.BKUGUIFacade; +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; + +public interface SMCCSTALRequestHandler { + + public void init(SignatureCard sc, BKUGUIFacade gui); + + public STALResponse handleRequest(STALRequest request); + + public boolean requireCard(); + + public SMCCSTALRequestHandler newInstance(); + +} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java new file mode 100644 index 00000000..7d7a6ec0 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java @@ -0,0 +1,21 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + +public interface STALMessageConsumer { + public void consumeNewSTALMessage(String captionId, String messageId); +} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java new file mode 100644 index 00000000..6ae4fa01 --- /dev/null +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java @@ -0,0 +1,151 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.smccstal; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.smcc.CancelledException; +import at.gv.egiz.smcc.PINProvider; +import at.gv.egiz.smcc.PINSpec; +import at.gv.egiz.smcc.SignatureCard; +import at.gv.egiz.smcc.SignatureCardException; +import at.gv.egiz.smcc.SignatureCard.KeyboxName; +import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.STALRequest; +import at.gv.egiz.stal.STALResponse; +import at.gv.egiz.stal.SignRequest; +import at.gv.egiz.stal.SignResponse; +import at.gv.egiz.stal.signedinfo.ObjectFactory; +import at.gv.egiz.stal.signedinfo.SignedInfoType; +import at.gv.egiz.stal.util.JCEAlgorithmNames; + +public class SignRequestHandler extends AbstractRequestHandler implements + PINProvider { + private static Log log = LogFactory.getLog(SignRequestHandler.class); + + private static JAXBContext jaxbContext; + + static { + try { + jaxbContext = JAXBContext.newInstance(ObjectFactory.class.getPackage() + .getName()); + } catch (JAXBException e) { + log.fatal("Cannot init jaxbContext", e); + } + } + + private int retryCounter = 0; + + public SignRequestHandler() { + } + + @SuppressWarnings("unchecked") + @Override + public STALResponse handleRequest(STALRequest request) { + if (request instanceof SignRequest) { + SignRequest signReq = (SignRequest) request; + newSTALMessage("Message.RequestCaption", "Message.SignRequest"); + try { + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + InputStream is = new ByteArrayInputStream(signReq.getSignedInfo()); + JAXBElement signedInfo = (JAXBElement) unmarshaller + .unmarshal(is); + String signatureMethod = signedInfo.getValue().getSignatureMethod() + .getAlgorithm(); + log.debug("Found signature method: " + signatureMethod); + String jceName = JCEAlgorithmNames.getJCEHashName(signatureMethod); + if (jceName == null) { + log.error("Hash algorithm not supported:"); + return new ErrorResponse(1000); + } + MessageDigest md = MessageDigest.getInstance(jceName); + md.update(signReq.getSignedInfo()); + KeyboxName kb = SignatureCard.KeyboxName.getKeyboxName(signReq + .getKeyIdentifier()); + byte[] resp = card.createSignature(md.digest(), kb, this); + if (resp == null) { + return new ErrorResponse(6001); + } + SignResponse stalResp = new SignResponse(); + stalResp.setSignatureValue(resp); + return stalResp; + } catch (CancelledException cx) { + log.debug("User cancelled request"); + return new ErrorResponse(6001); + } catch (SignatureCardException e) { + log.error("Error while creating signature: " + e); + return new ErrorResponse(4000); + } catch (JAXBException e) { + log.error("Cannot unmarshall signed info", e); + return new ErrorResponse(1000); + } catch (NoSuchAlgorithmException e) { + log.error(e); + return new ErrorResponse(1000); + } + } else { + log.fatal("Got unexpected STAL request: " + request); + return new ErrorResponse(1000); + } + } + + @Override + public boolean requireCard() { + return true; + } + + @Override + public String providePIN(PINSpec spec, int retries) { + if (retryCounter++ > 0) { + log.info("PIN wrong retrying ..."); + gui.showSignaturePINRetryDialog(spec, retries, this, "sign", this, + "cancel", this, "hashData"); + } else { + gui.showSignaturePINDialog(spec, this, "sign", this, "cancel", this, + "hashData"); + } + do { + waitForAction(); + if (actionCommand.equals("cancel")) { + return null; + } else if (actionCommand.equals("hashData")) { + // FIXME provide hashdata input + gui.showHashDataInputDialog(null, this, "ok"); + } else if (actionCommand.equals("sign")) { + return new String(gui.getPin()); + } else if (actionCommand.equals("ok")) { + gui.showSignaturePINDialog(spec, this, "sign", this, "cancel", this, + "hashData"); + } + } while (true); + } + + @Override + public SMCCSTALRequestHandler newInstance() { + return new SignRequestHandler(); + } +} diff --git a/smccSTAL/src/test/java/at/gv/egiz/smcc/ASN1Test.java b/smccSTAL/src/test/java/at/gv/egiz/smcc/ASN1Test.java new file mode 100644 index 00000000..f2d61e7f --- /dev/null +++ b/smccSTAL/src/test/java/at/gv/egiz/smcc/ASN1Test.java @@ -0,0 +1,105 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.smcc; + +import iaik.me.asn1.ASN1; +import iaik.me.utils.Base64; + +import java.io.IOException; +import java.io.InputStream; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Vector; + +import org.junit.Ignore; + +@Ignore +public class ASN1Test { + + public static void main(String[] args) throws IOException { + + ClassLoader classLoader = ASN1Test.class.getClassLoader(); + + InputStream stream = classLoader.getResourceAsStream("IdentityLink.bin"); + + if (stream != null) { + + ASN1 identityLink = new ASN1(stream); + System.out.println("BaseId:" + getBaseId(identityLink)); + identityLink = replaceBaseId(identityLink, "test"); + System.out.println("BaseId:" + getBaseId(identityLink)); + + String bpk = "hansi"; + MessageDigest sha = null; + try { + sha = MessageDigest.getInstance("SHA"); + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + sha.update((identityLink + "+" + bpk).getBytes()); + String bpkStr = new String(Base64.encode(sha.digest())); + System.out.println("bpk: "+bpkStr); + identityLink = replaceBaseId(identityLink, bpkStr); + System.out.println(getBaseId(identityLink)); + + } else { + System.out.println("Not found."); + } + + } + + private static String getBaseId(ASN1 identityLink) throws IOException { + + if (identityLink.getType() == ASN1.TYPE_SEQUENCE) { + ASN1 personData = identityLink.getElementAt(4); + if (personData.getType() == ASN1.TAG_CONTEXT_SPECIFIC) { + ASN1 physicalPersonData = personData.gvASN1(); + ASN1 baseId = physicalPersonData.getElementAt(0); + return baseId.gvString(); + } + throw new IOException("Invalid structure."); + + } + throw new IOException("Invalid structure."); + + } + + private static ASN1 replaceBaseId(ASN1 identityLink, String newBaseId) + throws IOException { + + ASN1 newIdentityLink = new ASN1(ASN1.TYPE_SEQUENCE, new Vector()); + for (int i = 0; i < identityLink.getSize(); i++) { + ASN1 asn1 = identityLink.getElementAt(i); + if (i == 4 && asn1.getType() == ASN1.TAG_CONTEXT_SPECIFIC) { + ASN1 physicalPersonData = asn1.gvASN1(); + ASN1 newPhysicalPersonData = new ASN1(ASN1.TYPE_SEQUENCE, + new Vector()); + newPhysicalPersonData.addElement(new ASN1(ASN1.TYPE_UTF8_STRING, + newBaseId)); + for (int j = 1; j < physicalPersonData.getSize(); j++) { + newPhysicalPersonData.addElement(physicalPersonData.getElementAt(j)); + } + asn1 = new ASN1(ASN1.TAG_CONTEXT_SPECIFIC, newPhysicalPersonData); + } + newIdentityLink.addElement(asn1); + } + return newIdentityLink; + + } + +} diff --git a/src/main/assemblies/assembly-test.xml b/src/main/assemblies/assembly-test.xml new file mode 100644 index 00000000..51ff0f85 --- /dev/null +++ b/src/main/assemblies/assembly-test.xml @@ -0,0 +1,36 @@ + + + + assembly-test + + zip + + true + ${artifactId} + + + + at.gv.egiz:bku.commons + + + lib + false + + + + diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/resources/commons-logging.properties b/src/main/resources/commons-logging.properties new file mode 100644 index 00000000..0d497b1b --- /dev/null +++ b/src/main/resources/commons-logging.properties @@ -0,0 +1,16 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 00000000..19762c61 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,34 @@ +# Copyright 2008 Federal Chancellery Austria and +# Graz University of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# loglever DEBUG, appender STDOUT +log4j.rootLogger=DEBUG, STDOUT +#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p | %t | %c %x - %m%n + +### FILE appender +#log4j.appender.file=org.apache.log4j.RollingFileAppender +#log4j.appender.file.maxFileSize=100KB +#log4j.appender.file.maxBackupIndex=9 +#log4j.appender.file.File=egovbus_ca.log +#log4j.appender.file.threshold=info +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/utils/pom.xml b/utils/pom.xml new file mode 100644 index 00000000..7408f12b --- /dev/null +++ b/utils/pom.xml @@ -0,0 +1,108 @@ + + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + utils + BKU Utils + jar + 1.0-SNAPSHOT + http://bku.egiz.gv.at + + + + + + + + commons-logging + commons-logging + + + iaik + iaik_jce_full_signed + + + iaik + iaik_ecc_signed + + + iaik + iaik_xsect + + + + + diff --git a/utils/src/main/java/META-INF/MANIFEST.MF b/utils/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/utils/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/CompressedIdentityLinkType.java b/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/CompressedIdentityLinkType.java new file mode 100644 index 00000000..62b8b2a4 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/CompressedIdentityLinkType.java @@ -0,0 +1,310 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.buergerkarte.namespaces.personenbindung._20020506_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import at.gv.e_government.reference.namespace.persondata._20020228_.AbstractPersonType; +import org.w3._2000._09.xmldsig_.KeyValueType; + + +/** + *

Java class for CompressedIdentityLinkType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CompressedIdentityLinkType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IssuerTemplate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="AssertionID" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="IssueInstant" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="PersonData" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractPersonType"/>
+ *         <element name="CitizenPublicKey" type="{http://www.w3.org/2000/09/xmldsig#}KeyValueType" maxOccurs="unbounded"/>
+ *         <element name="SignatureValue" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         <element name="ReferenceDigest" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *         <element name="ReferenceManifestDigest" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *         <element name="ManifestReferenceDigest" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CompressedIdentityLinkType", propOrder = { + "issuerTemplate", + "assertionID", + "issueInstant", + "personData", + "citizenPublicKey", + "signatureValue", + "referenceDigest", + "referenceManifestDigest", + "manifestReferenceDigest" +}) +public class CompressedIdentityLinkType { + + @XmlElement(name = "IssuerTemplate", required = true) + protected String issuerTemplate; + @XmlElement(name = "AssertionID", required = true) + protected String assertionID; + @XmlElement(name = "IssueInstant", required = true) + protected String issueInstant; + @XmlElement(name = "PersonData", required = true) + protected AbstractPersonType personData; + @XmlElement(name = "CitizenPublicKey", required = true) + protected List citizenPublicKey; + @XmlElement(name = "SignatureValue", required = true) + protected byte[] signatureValue; + @XmlElement(name = "ReferenceDigest") + protected byte[] referenceDigest; + @XmlElement(name = "ReferenceManifestDigest") + protected byte[] referenceManifestDigest; + @XmlElement(name = "ManifestReferenceDigest") + protected byte[] manifestReferenceDigest; + + /** + * Gets the value of the issuerTemplate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssuerTemplate() { + return issuerTemplate; + } + + /** + * Sets the value of the issuerTemplate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssuerTemplate(String value) { + this.issuerTemplate = value; + } + + /** + * Gets the value of the assertionID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAssertionID() { + return assertionID; + } + + /** + * Sets the value of the assertionID property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAssertionID(String value) { + this.assertionID = value; + } + + /** + * Gets the value of the issueInstant property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssueInstant() { + return issueInstant; + } + + /** + * Sets the value of the issueInstant property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssueInstant(String value) { + this.issueInstant = value; + } + + /** + * Gets the value of the personData property. + * + * @return + * possible object is + * {@link AbstractPersonType } + * + */ + public AbstractPersonType getPersonData() { + return personData; + } + + /** + * Sets the value of the personData property. + * + * @param value + * allowed object is + * {@link AbstractPersonType } + * + */ + public void setPersonData(AbstractPersonType value) { + this.personData = value; + } + + /** + * Gets the value of the citizenPublicKey property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the citizenPublicKey property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCitizenPublicKey().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link KeyValueType } + * + * + */ + public List getCitizenPublicKey() { + if (citizenPublicKey == null) { + citizenPublicKey = new ArrayList(); + } + return this.citizenPublicKey; + } + + /** + * Gets the value of the signatureValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getSignatureValue() { + return signatureValue; + } + + /** + * Sets the value of the signatureValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setSignatureValue(byte[] value) { + this.signatureValue = ((byte[]) value); + } + + /** + * Gets the value of the referenceDigest property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getReferenceDigest() { + return referenceDigest; + } + + /** + * Sets the value of the referenceDigest property. + * + * @param value + * allowed object is + * byte[] + */ + public void setReferenceDigest(byte[] value) { + this.referenceDigest = ((byte[]) value); + } + + /** + * Gets the value of the referenceManifestDigest property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getReferenceManifestDigest() { + return referenceManifestDigest; + } + + /** + * Sets the value of the referenceManifestDigest property. + * + * @param value + * allowed object is + * byte[] + */ + public void setReferenceManifestDigest(byte[] value) { + this.referenceManifestDigest = ((byte[]) value); + } + + /** + * Gets the value of the manifestReferenceDigest property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getManifestReferenceDigest() { + return manifestReferenceDigest; + } + + /** + * Sets the value of the manifestReferenceDigest property. + * + * @param value + * allowed object is + * byte[] + */ + public void setManifestReferenceDigest(byte[] value) { + this.manifestReferenceDigest = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/ObjectFactory.java b/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/ObjectFactory.java new file mode 100644 index 00000000..94129193 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/ObjectFactory.java @@ -0,0 +1,76 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.buergerkarte.namespaces.personenbindung._20020506_; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the at.buergerkarte.namespaces.personenbindung._20020506_ package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _CompressedIdentityLink_QNAME = new QName("http://www.buergerkarte.at/namespaces/personenbindung/20020506#", "CompressedIdentityLink"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.buergerkarte.namespaces.personenbindung._20020506_ + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CompressedIdentityLinkType } + * + */ + public CompressedIdentityLinkType createCompressedIdentityLinkType() { + return new CompressedIdentityLinkType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CompressedIdentityLinkType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/personenbindung/20020506#", name = "CompressedIdentityLink") + public JAXBElement createCompressedIdentityLink(CompressedIdentityLinkType value) { + return new JAXBElement(_CompressedIdentityLink_QNAME, CompressedIdentityLinkType.class, null, value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/package-info.java b/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/package-info.java new file mode 100644 index 00000000..4a53cb31 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/personenbindung/_20020506_/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.buergerkarte.at/namespaces/personenbindung/20020506#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package at.buergerkarte.namespaces.personenbindung._20020506_; diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AccessAuthorizationType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AccessAuthorizationType.java new file mode 100644 index 00000000..53a93ab9 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AccessAuthorizationType.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for AccessAuthorizationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AccessAuthorizationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RequesterID" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}RequesterIDType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="UserMayChange" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AccessAuthorizationType", propOrder = { + "requesterID" +}) +public class AccessAuthorizationType { + + @XmlElement(name = "RequesterID", required = true) + protected List requesterID; + @XmlAttribute(name = "UserMayChange", required = true) + protected boolean userMayChange; + + /** + * Gets the value of the requesterID property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the requesterID property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRequesterID().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RequesterIDType } + * + * + */ + public List getRequesterID() { + if (requesterID == null) { + requesterID = new ArrayList(); + } + return this.requesterID; + } + + /** + * Gets the value of the userMayChange property. + * + */ + public boolean isUserMayChange() { + return userMayChange; + } + + /** + * Sets the value of the userMayChange property. + * + */ + public void setUserMayChange(boolean value) { + this.userMayChange = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AllSignatoriesType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AllSignatoriesType.java new file mode 100644 index 00000000..61b2e5cf --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AllSignatoriesType.java @@ -0,0 +1,71 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for AllSignatoriesType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="AllSignatoriesType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="all"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "AllSignatoriesType") +@XmlEnum +public enum AllSignatoriesType { + + @XmlEnumValue("all") + ALL("all"); + private final String value; + + AllSignatoriesType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static AllSignatoriesType fromValue(String v) { + for (AllSignatoriesType c: AllSignatoriesType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyChildrenType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyChildrenType.java new file mode 100644 index 00000000..4ed236fd --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyChildrenType.java @@ -0,0 +1,98 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for AnyChildrenType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AnyChildrenType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded" minOccurs="0">
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AnyChildrenType", propOrder = { + "any" +}) +@XmlSeeAlso({ + BindingType.class +}) +public class AnyChildrenType { + + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyMixedChildrenType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyMixedChildrenType.java new file mode 100644 index 00000000..bff6c7ca --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AnyMixedChildrenType.java @@ -0,0 +1,102 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import at.gv.egiz.slbinding.impl.XMLContentType; +import org.w3c.dom.Element; + + +/** + *

Java class for AnyMixedChildrenType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AnyMixedChildrenType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded" minOccurs="0">
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AnyMixedChildrenType", propOrder = { + "content" +}) +@XmlSeeAlso({ + XMLContentType.class +}) +public class AnyMixedChildrenType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AuthenticationClassType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AuthenticationClassType.java new file mode 100644 index 00000000..d07d5cc1 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/AuthenticationClassType.java @@ -0,0 +1,80 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for AuthenticationClassType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="AuthenticationClassType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="anonym"/>
+ *     <enumeration value="pseudoanonym"/>
+ *     <enumeration value="certified"/>
+ *     <enumeration value="certifiedGovAgency"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "AuthenticationClassType") +@XmlEnum +public enum AuthenticationClassType { + + @XmlEnumValue("anonym") + ANONYM("anonym"), + @XmlEnumValue("pseudoanonym") + PSEUDOANONYM("pseudoanonym"), + @XmlEnumValue("certified") + CERTIFIED("certified"), + @XmlEnumValue("certifiedGovAgency") + CERTIFIED_GOV_AGENCY("certifiedGovAgency"); + private final String value; + + AuthenticationClassType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static AuthenticationClassType fromValue(String v) { + for (AuthenticationClassType c: AuthenticationClassType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64ContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64ContentType.java new file mode 100644 index 00000000..641a12d0 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64ContentType.java @@ -0,0 +1,87 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64ContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64ContentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64ContentType", propOrder = { + "base64Content" +}) +@XmlSeeAlso({ + Base64OptRefContentType.class +}) +public class Base64ContentType { + + @XmlElement(name = "Base64Content") + protected byte[] base64Content; + + /** + * Gets the value of the base64Content property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getBase64Content() { + return base64Content; + } + + /** + * Sets the value of the base64Content property. + * + * @param value + * allowed object is + * byte[] + */ + public void setBase64Content(byte[] value) { + this.base64Content = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64OptRefContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64OptRefContentType.java new file mode 100644 index 00000000..fe183a4f --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64OptRefContentType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64OptRefContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64OptRefContentType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64ContentType">
+ *       <attribute name="Reference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64OptRefContentType") +public class Base64OptRefContentType + extends Base64ContentType +{ + + @XmlAttribute(name = "Reference") + @XmlSchemaType(name = "anyURI") + protected String reference; + + /** + * Gets the value of the reference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReference() { + return reference; + } + + /** + * Sets the value of the reference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReference(String value) { + this.reference = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLContentType.java new file mode 100644 index 00000000..096f8451 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLContentType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64XMLContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64XMLContentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="XMLContent" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}XMLContentType"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64XMLContentType", propOrder = { + "base64Content", + "xmlContent" +}) +@XmlSeeAlso({ + InfoboxAssocArrayPairType.class, + Base64XMLOptRefContentType.class +}) +public class Base64XMLContentType { + + @XmlElement(name = "Base64Content") + protected byte[] base64Content; + @XmlElement(name = "XMLContent", type = at.gv.egiz.slbinding.impl.XMLContentType.class) + protected at.gv.egiz.slbinding.impl.XMLContentType xmlContent; + + /** + * Gets the value of the base64Content property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getBase64Content() { + return base64Content; + } + + /** + * Sets the value of the base64Content property. + * + * @param value + * allowed object is + * byte[] + */ + public void setBase64Content(byte[] value) { + this.base64Content = ((byte[]) value); + } + + /** + * Gets the value of the xmlContent property. + * + * @return + * possible object is + * {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.XMLContentType getXMLContent() { + return xmlContent; + } + + /** + * Sets the value of the xmlContent property. + * + * @param value + * allowed object is + * {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public void setXMLContent(at.buergerkarte.namespaces.securitylayer._1.XMLContentType value) { + this.xmlContent = ((at.gv.egiz.slbinding.impl.XMLContentType) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefContentType.java new file mode 100644 index 00000000..7b93bb99 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefContentType.java @@ -0,0 +1,147 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64XMLLocRefContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64XMLLocRefContentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice minOccurs="0">
+ *         <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="XMLContent" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}XMLContentType"/>
+ *         <element name="LocRefContent" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64XMLLocRefContentType", propOrder = { + "base64Content", + "xmlContent", + "locRefContent" +}) +@XmlSeeAlso({ + Base64XMLLocRefOptRefContentType.class, + Base64XMLLocRefReqRefContentType.class, + XMLToBeEncryptedNewContentType.class +}) +public class Base64XMLLocRefContentType { + + @XmlElement(name = "Base64Content") + protected byte[] base64Content; + @XmlElement(name = "XMLContent", type = at.gv.egiz.slbinding.impl.XMLContentType.class) + protected at.gv.egiz.slbinding.impl.XMLContentType xmlContent; + @XmlElement(name = "LocRefContent") + @XmlSchemaType(name = "anyURI") + protected String locRefContent; + + /** + * Gets the value of the base64Content property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getBase64Content() { + return base64Content; + } + + /** + * Sets the value of the base64Content property. + * + * @param value + * allowed object is + * byte[] + */ + public void setBase64Content(byte[] value) { + this.base64Content = ((byte[]) value); + } + + /** + * Gets the value of the xmlContent property. + * + * @return + * possible object is + * {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.XMLContentType getXMLContent() { + return xmlContent; + } + + /** + * Sets the value of the xmlContent property. + * + * @param value + * allowed object is + * {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public void setXMLContent(at.buergerkarte.namespaces.securitylayer._1.XMLContentType value) { + this.xmlContent = ((at.gv.egiz.slbinding.impl.XMLContentType) value); + } + + /** + * Gets the value of the locRefContent property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocRefContent() { + return locRefContent; + } + + /** + * Sets the value of the locRefContent property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocRefContent(String value) { + this.locRefContent = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefOptRefContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefOptRefContentType.java new file mode 100644 index 00000000..2b0b0552 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefOptRefContentType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64XMLLocRefOptRefContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64XMLLocRefOptRefContentType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLLocRefContentType">
+ *       <attribute name="Reference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64XMLLocRefOptRefContentType") +public class Base64XMLLocRefOptRefContentType + extends Base64XMLLocRefContentType +{ + + @XmlAttribute(name = "Reference") + @XmlSchemaType(name = "anyURI") + protected String reference; + + /** + * Gets the value of the reference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReference() { + return reference; + } + + /** + * Sets the value of the reference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReference(String value) { + this.reference = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefReqRefContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefReqRefContentType.java new file mode 100644 index 00000000..ab9e985e --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLLocRefReqRefContentType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64XMLLocRefReqRefContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64XMLLocRefReqRefContentType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLLocRefContentType">
+ *       <attribute name="Reference" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64XMLLocRefReqRefContentType") +public class Base64XMLLocRefReqRefContentType + extends Base64XMLLocRefContentType +{ + + @XmlAttribute(name = "Reference", required = true) + @XmlSchemaType(name = "anyURI") + protected String reference; + + /** + * Gets the value of the reference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReference() { + return reference; + } + + /** + * Sets the value of the reference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReference(String value) { + this.reference = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLOptRefContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLOptRefContentType.java new file mode 100644 index 00000000..9f3ebef8 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/Base64XMLOptRefContentType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Base64XMLOptRefContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Base64XMLOptRefContentType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLContentType">
+ *       <attribute name="Reference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Base64XMLOptRefContentType") +public class Base64XMLOptRefContentType + extends Base64XMLContentType +{ + + @XmlAttribute(name = "Reference") + @XmlSchemaType(name = "anyURI") + protected String reference; + + /** + * Gets the value of the reference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReference() { + return reference; + } + + /** + * Sets the value of the reference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReference(String value) { + this.reference = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/BindingType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/BindingType.java new file mode 100644 index 00000000..e2cedd56 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/BindingType.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for BindingType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="BindingType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AnyChildrenType">
+ *       <attribute name="Identifier" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BindingType") +public class BindingType + extends AnyChildrenType +{ + + @XmlAttribute(name = "Identifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String identifier; + + /** + * Gets the value of the identifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdentifier() { + return identifier; + } + + /** + * Sets the value of the identifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdentifier(String value) { + this.identifier = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectOptionalMetaType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectOptionalMetaType.java new file mode 100644 index 00000000..20ab8505 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectOptionalMetaType.java @@ -0,0 +1,117 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSDataObjectOptionalMetaType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSDataObjectOptionalMetaType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType" minOccurs="0"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64OptRefContentType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSDataObjectOptionalMetaType", propOrder = { + "metaInfo", + "content" +}) +@XmlSeeAlso({ + CMSDataObjectRequiredMetaType.class +}) +public class CMSDataObjectOptionalMetaType { + + @XmlElement(name = "MetaInfo") + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected Base64OptRefContentType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link Base64OptRefContentType } + * + */ + public Base64OptRefContentType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link Base64OptRefContentType } + * + */ + public void setContent(Base64OptRefContentType value) { + this.content = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectRequiredMetaType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectRequiredMetaType.java new file mode 100644 index 00000000..14809176 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSDataObjectRequiredMetaType.java @@ -0,0 +1,59 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSDataObjectRequiredMetaType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSDataObjectRequiredMetaType">
+ *   <complexContent>
+ *     <restriction base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CMSDataObjectOptionalMetaType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64OptRefContentType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSDataObjectRequiredMetaType") +public class CMSDataObjectRequiredMetaType + extends CMSDataObjectOptionalMetaType +{ + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSEncryptedContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSEncryptedContentType.java new file mode 100644 index 00000000..f38e8b10 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSEncryptedContentType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSEncryptedContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSEncryptedContentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType" minOccurs="0"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64OptRefContentType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSEncryptedContentType", propOrder = { + "metaInfo", + "content" +}) +public class CMSEncryptedContentType { + + @XmlElement(name = "MetaInfo") + protected MetaInfoType metaInfo; + @XmlElement(name = "Content") + protected Base64OptRefContentType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link Base64OptRefContentType } + * + */ + public Base64OptRefContentType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link Base64OptRefContentType } + * + */ + public void setContent(Base64OptRefContentType value) { + this.content = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSRecipientPublicKeyType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSRecipientPublicKeyType.java new file mode 100644 index 00000000..fdd71d1e --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSRecipientPublicKeyType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSRecipientPublicKeyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSRecipientPublicKeyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSRecipientPublicKeyType", propOrder = { + "x509Certificate" +}) +public class CMSRecipientPublicKeyType { + + @XmlElement(name = "X509Certificate") + protected byte[] x509Certificate; + + /** + * Gets the value of the x509Certificate property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getX509Certificate() { + return x509Certificate; + } + + /** + * Sets the value of the x509Certificate property. + * + * @param value + * allowed object is + * byte[] + */ + public void setX509Certificate(byte[] value) { + this.x509Certificate = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSToBeEncryptedType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSToBeEncryptedType.java new file mode 100644 index 00000000..951b5ed8 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CMSToBeEncryptedType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CMSToBeEncryptedType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CMSToBeEncryptedType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64OptRefContentType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CMSToBeEncryptedType", propOrder = { + "metaInfo", + "content" +}) +public class CMSToBeEncryptedType { + + @XmlElement(name = "MetaInfo", required = true) + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected Base64OptRefContentType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link Base64OptRefContentType } + * + */ + public Base64OptRefContentType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link Base64OptRefContentType } + * + */ + public void setContent(Base64OptRefContentType value) { + this.content = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CheckResultType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CheckResultType.java new file mode 100644 index 00000000..b01cf5aa --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CheckResultType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CheckResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CheckResultType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *         <element name="Info" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AnyMixedChildrenType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CheckResultType", propOrder = { + "code", + "info" +}) +public class CheckResultType { + + @XmlElement(name = "Code", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger code; + @XmlElement(name = "Info") + protected AnyMixedChildrenType info; + + /** + * Gets the value of the code property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getCode() { + return code; + } + + /** + * Sets the value of the code property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setCode(BigInteger value) { + this.code = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link AnyMixedChildrenType } + * + */ + public AnyMixedChildrenType getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link AnyMixedChildrenType } + * + */ + public void setInfo(AnyMixedChildrenType value) { + this.info = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureRequestType.java new file mode 100644 index 00000000..d9473e8e --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureRequestType.java @@ -0,0 +1,151 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CreateCMSSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateCMSSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="KeyboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *         <element name="DataObject" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CMSDataObjectRequiredMetaType"/>
+ *       </sequence>
+ *       <attribute name="Structure" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="detached"/>
+ *             <enumeration value="enveloping"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateCMSSignatureRequestType", propOrder = { + "keyboxIdentifier", + "dataObject" +}) +public class CreateCMSSignatureRequestType { + + @XmlElement(name = "KeyboxIdentifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String keyboxIdentifier; + @XmlElement(name = "DataObject", required = true) + protected CMSDataObjectRequiredMetaType dataObject; + @XmlAttribute(name = "Structure", required = true) + protected String structure; + + /** + * Gets the value of the keyboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKeyboxIdentifier() { + return keyboxIdentifier; + } + + /** + * Sets the value of the keyboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKeyboxIdentifier(String value) { + this.keyboxIdentifier = value; + } + + /** + * Gets the value of the dataObject property. + * + * @return + * possible object is + * {@link CMSDataObjectRequiredMetaType } + * + */ + public CMSDataObjectRequiredMetaType getDataObject() { + return dataObject; + } + + /** + * Sets the value of the dataObject property. + * + * @param value + * allowed object is + * {@link CMSDataObjectRequiredMetaType } + * + */ + public void setDataObject(CMSDataObjectRequiredMetaType value) { + this.dataObject = value; + } + + /** + * Gets the value of the structure property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStructure() { + return structure; + } + + /** + * Sets the value of the structure property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStructure(String value) { + this.structure = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureResponseType.java new file mode 100644 index 00000000..bc9886a3 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateCMSSignatureResponseType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CreateCMSSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateCMSSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CMSSignature" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateCMSSignatureResponseType", propOrder = { + "cmsSignature" +}) +public class CreateCMSSignatureResponseType { + + @XmlElement(name = "CMSSignature", required = true) + protected byte[] cmsSignature; + + /** + * Gets the value of the cmsSignature property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getCMSSignature() { + return cmsSignature; + } + + /** + * Sets the value of the cmsSignature property. + * + * @param value + * allowed object is + * byte[] + */ + public void setCMSSignature(byte[] value) { + this.cmsSignature = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoRequestType.java new file mode 100644 index 00000000..cfbed898 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoRequestType.java @@ -0,0 +1,163 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CreateHashInfoRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateHashInfoRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashData" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}HashDataType"/>
+ *         <element name="HashAlgorithm" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *         <element name="FriendlyName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="RespondHashData" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateHashInfoRequestType", propOrder = { + "hashData", + "hashAlgorithm", + "friendlyName" +}) +public class CreateHashInfoRequestType { + + @XmlElement(name = "HashData", required = true) + protected HashDataType hashData; + @XmlElement(name = "HashAlgorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String hashAlgorithm; + @XmlElement(name = "FriendlyName") + protected String friendlyName; + @XmlAttribute(name = "RespondHashData", required = true) + protected boolean respondHashData; + + /** + * Gets the value of the hashData property. + * + * @return + * possible object is + * {@link HashDataType } + * + */ + public HashDataType getHashData() { + return hashData; + } + + /** + * Sets the value of the hashData property. + * + * @param value + * allowed object is + * {@link HashDataType } + * + */ + public void setHashData(HashDataType value) { + this.hashData = value; + } + + /** + * Gets the value of the hashAlgorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHashAlgorithm() { + return hashAlgorithm; + } + + /** + * Sets the value of the hashAlgorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHashAlgorithm(String value) { + this.hashAlgorithm = value; + } + + /** + * Gets the value of the friendlyName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFriendlyName() { + return friendlyName; + } + + /** + * Sets the value of the friendlyName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFriendlyName(String value) { + this.friendlyName = value; + } + + /** + * Gets the value of the respondHashData property. + * + */ + public boolean isRespondHashData() { + return respondHashData; + } + + /** + * Sets the value of the respondHashData property. + * + */ + public void setRespondHashData(boolean value) { + this.respondHashData = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoResponseType.java new file mode 100644 index 00000000..755a12ef --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashInfoResponseType.java @@ -0,0 +1,169 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CreateHashInfoResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateHashInfoResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashData" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}HashDataType" minOccurs="0"/>
+ *         <element name="HashAlgorithm" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *         <element name="FriendlyName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="HashValue" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateHashInfoResponseType", propOrder = { + "hashData", + "hashAlgorithm", + "friendlyName", + "hashValue" +}) +public class CreateHashInfoResponseType { + + @XmlElement(name = "HashData") + protected HashDataType hashData; + @XmlElement(name = "HashAlgorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String hashAlgorithm; + @XmlElement(name = "FriendlyName") + protected String friendlyName; + @XmlElement(name = "HashValue", required = true) + protected byte[] hashValue; + + /** + * Gets the value of the hashData property. + * + * @return + * possible object is + * {@link HashDataType } + * + */ + public HashDataType getHashData() { + return hashData; + } + + /** + * Sets the value of the hashData property. + * + * @param value + * allowed object is + * {@link HashDataType } + * + */ + public void setHashData(HashDataType value) { + this.hashData = value; + } + + /** + * Gets the value of the hashAlgorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHashAlgorithm() { + return hashAlgorithm; + } + + /** + * Sets the value of the hashAlgorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHashAlgorithm(String value) { + this.hashAlgorithm = value; + } + + /** + * Gets the value of the friendlyName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFriendlyName() { + return friendlyName; + } + + /** + * Sets the value of the friendlyName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFriendlyName(String value) { + this.friendlyName = value; + } + + /** + * Gets the value of the hashValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getHashValue() { + return hashValue; + } + + /** + * Sets the value of the hashValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setHashValue(byte[] value) { + this.hashValue = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashRequestType.java new file mode 100644 index 00000000..5fe80ad7 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashRequestType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CreateHashRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateHashRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CreateHashInfoRequestType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateHashRequestType", propOrder = { + "hashInfo" +}) +public class CreateHashRequestType { + + @XmlElement(name = "HashInfo", required = true) + protected List hashInfo; + + /** + * Gets the value of the hashInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hashInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getHashInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CreateHashInfoRequestType } + * + * + */ + public List getHashInfo() { + if (hashInfo == null) { + hashInfo = new ArrayList(); + } + return this.hashInfo; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashResponseType.java new file mode 100644 index 00000000..702f7177 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateHashResponseType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CreateHashResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateHashResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CreateHashInfoResponseType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateHashResponseType", propOrder = { + "hashInfo" +}) +public class CreateHashResponseType { + + @XmlElement(name = "HashInfo", required = true) + protected List hashInfo; + + /** + * Gets the value of the hashInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hashInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getHashInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CreateHashInfoResponseType } + * + * + */ + public List getHashInfo() { + if (hashInfo == null) { + hashInfo = new ArrayList(); + } + return this.hashInfo; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureRequestType.java new file mode 100644 index 00000000..71f6c0c2 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureRequestType.java @@ -0,0 +1,151 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CreateXMLSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateXMLSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="KeyboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *         <element name="DataObjectInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}DataObjectInfoType" maxOccurs="unbounded"/>
+ *         <element name="SignatureInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}SignatureInfoCreationType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateXMLSignatureRequestType", propOrder = { + "keyboxIdentifier", + "dataObjectInfo", + "signatureInfo" +}) +public class CreateXMLSignatureRequestType { + + @XmlElement(name = "KeyboxIdentifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String keyboxIdentifier; + @XmlElement(name = "DataObjectInfo", required = true) + protected List dataObjectInfo; + @XmlElement(name = "SignatureInfo") + protected SignatureInfoCreationType signatureInfo; + + /** + * Gets the value of the keyboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKeyboxIdentifier() { + return keyboxIdentifier; + } + + /** + * Sets the value of the keyboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKeyboxIdentifier(String value) { + this.keyboxIdentifier = value; + } + + /** + * Gets the value of the dataObjectInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dataObjectInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDataObjectInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectInfoType } + * + * + */ + public List getDataObjectInfo() { + if (dataObjectInfo == null) { + dataObjectInfo = new ArrayList(); + } + return this.dataObjectInfo; + } + + /** + * Gets the value of the signatureInfo property. + * + * @return + * possible object is + * {@link SignatureInfoCreationType } + * + */ + public SignatureInfoCreationType getSignatureInfo() { + return signatureInfo; + } + + /** + * Sets the value of the signatureInfo property. + * + * @param value + * allowed object is + * {@link SignatureInfoCreationType } + * + */ + public void setSignatureInfo(SignatureInfoCreationType value) { + this.signatureInfo = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureResponseType.java new file mode 100644 index 00000000..e72991d4 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/CreateXMLSignatureResponseType.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for CreateXMLSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CreateXMLSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreateXMLSignatureResponseType", propOrder = { + "any" +}) +public class CreateXMLSignatureResponseType { + + @XmlAnyElement(lax = true) + protected Object any; + + /** + * Gets the value of the any property. + * + * @return + * possible object is + * {@link Element } + * {@link Object } + * + */ + public Object getAny() { + return any; + } + + /** + * Sets the value of the any property. + * + * @param value + * allowed object is + * {@link Element } + * {@link Object } + * + */ + public void setAny(Object value) { + this.any = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectAssociationType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectAssociationType.java new file mode 100644 index 00000000..7e3fee76 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectAssociationType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DataObjectAssociationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DataObjectAssociationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType" minOccurs="0"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLLocRefReqRefContentType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DataObjectAssociationType", propOrder = { + "metaInfo", + "content" +}) +public class DataObjectAssociationType { + + @XmlElement(name = "MetaInfo") + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected Base64XMLLocRefReqRefContentType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link Base64XMLLocRefReqRefContentType } + * + */ + public Base64XMLLocRefReqRefContentType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link Base64XMLLocRefReqRefContentType } + * + */ + public void setContent(Base64XMLLocRefReqRefContentType value) { + this.content = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectInfoType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectInfoType.java new file mode 100644 index 00000000..f3a9ee5f --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DataObjectInfoType.java @@ -0,0 +1,188 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DataObjectInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DataObjectInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DataObject" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLLocRefOptRefContentType"/>
+ *         <element name="TransformsInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}TransformsInfoType" maxOccurs="unbounded"/>
+ *         <element name="Supplement" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}DataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Structure" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="detached"/>
+ *             <enumeration value="enveloping"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DataObjectInfoType", propOrder = { + "dataObject", + "transformsInfo", + "supplement" +}) +public class DataObjectInfoType { + + @XmlElement(name = "DataObject", required = true) + protected Base64XMLLocRefOptRefContentType dataObject; + @XmlElement(name = "TransformsInfo", required = true, type = at.gv.egiz.slbinding.impl.TransformsInfoType.class) + protected List transformsInfo; + @XmlElement(name = "Supplement") + protected List supplement; + @XmlAttribute(name = "Structure", required = true) + protected String structure; + + /** + * Gets the value of the dataObject property. + * + * @return + * possible object is + * {@link Base64XMLLocRefOptRefContentType } + * + */ + public Base64XMLLocRefOptRefContentType getDataObject() { + return dataObject; + } + + /** + * Sets the value of the dataObject property. + * + * @param value + * allowed object is + * {@link Base64XMLLocRefOptRefContentType } + * + */ + public void setDataObject(Base64XMLLocRefOptRefContentType value) { + this.dataObject = value; + } + + /** + * Gets the value of the transformsInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transformsInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTransformsInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType } + * + * + */ + public List getTransformsInfo() { + if (transformsInfo == null) { + transformsInfo = new ArrayList(); + } + return this.transformsInfo; + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + + /** + * Gets the value of the structure property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStructure() { + return structure; + } + + /** + * Sets the value of the structure property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStructure(String value) { + this.structure = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSRequestType.java new file mode 100644 index 00000000..d6b51d59 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSRequestType.java @@ -0,0 +1,143 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DecryptCMSRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DecryptCMSRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CMSMessage" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="EncryptedContent" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CMSEncryptedContentType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ReturnResult" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ReturnResultType" default="xml" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DecryptCMSRequestType", propOrder = { + "cmsMessage", + "encryptedContent" +}) +public class DecryptCMSRequestType { + + @XmlElement(name = "CMSMessage", required = true) + protected byte[] cmsMessage; + @XmlElement(name = "EncryptedContent") + protected CMSEncryptedContentType encryptedContent; + @XmlAttribute(name = "ReturnResult") + protected ReturnResultType returnResult; + + /** + * Gets the value of the cmsMessage property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getCMSMessage() { + return cmsMessage; + } + + /** + * Sets the value of the cmsMessage property. + * + * @param value + * allowed object is + * byte[] + */ + public void setCMSMessage(byte[] value) { + this.cmsMessage = ((byte[]) value); + } + + /** + * Gets the value of the encryptedContent property. + * + * @return + * possible object is + * {@link CMSEncryptedContentType } + * + */ + public CMSEncryptedContentType getEncryptedContent() { + return encryptedContent; + } + + /** + * Sets the value of the encryptedContent property. + * + * @param value + * allowed object is + * {@link CMSEncryptedContentType } + * + */ + public void setEncryptedContent(CMSEncryptedContentType value) { + this.encryptedContent = value; + } + + /** + * Gets the value of the returnResult property. + * + * @return + * possible object is + * {@link ReturnResultType } + * + */ + public ReturnResultType getReturnResult() { + if (returnResult == null) { + return ReturnResultType.XML; + } else { + return returnResult; + } + } + + /** + * Sets the value of the returnResult property. + * + * @param value + * allowed object is + * {@link ReturnResultType } + * + */ + public void setReturnResult(ReturnResultType value) { + this.returnResult = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSResponseType.java new file mode 100644 index 00000000..d98e29bb --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptCMSResponseType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DecryptCMSResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DecryptCMSResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DecryptedData" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DecryptCMSResponseType", propOrder = { + "decryptedData" +}) +public class DecryptCMSResponseType { + + @XmlElement(name = "DecryptedData", required = true) + protected byte[] decryptedData; + + /** + * Gets the value of the decryptedData property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getDecryptedData() { + return decryptedData; + } + + /** + * Sets the value of the decryptedData property. + * + * @param value + * allowed object is + * byte[] + */ + public void setDecryptedData(byte[] value) { + this.decryptedData = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLRequestType.java new file mode 100644 index 00000000..7372130b --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLRequestType.java @@ -0,0 +1,180 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DecryptXMLRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DecryptXMLRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EncryptedContent" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLOptRefContentType"/>
+ *         <element name="EncrElemsSelector" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Supplement" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}DataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ReturnResult" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ReturnResultType" default="xml" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DecryptXMLRequestType", propOrder = { + "encryptedContent", + "encrElemsSelector", + "supplement" +}) +public class DecryptXMLRequestType { + + @XmlElement(name = "EncryptedContent", required = true) + protected Base64XMLOptRefContentType encryptedContent; + @XmlElement(name = "EncrElemsSelector", required = true) + protected String encrElemsSelector; + @XmlElement(name = "Supplement") + protected List supplement; + @XmlAttribute(name = "ReturnResult") + protected ReturnResultType returnResult; + + /** + * Gets the value of the encryptedContent property. + * + * @return + * possible object is + * {@link Base64XMLOptRefContentType } + * + */ + public Base64XMLOptRefContentType getEncryptedContent() { + return encryptedContent; + } + + /** + * Sets the value of the encryptedContent property. + * + * @param value + * allowed object is + * {@link Base64XMLOptRefContentType } + * + */ + public void setEncryptedContent(Base64XMLOptRefContentType value) { + this.encryptedContent = value; + } + + /** + * Gets the value of the encrElemsSelector property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncrElemsSelector() { + return encrElemsSelector; + } + + /** + * Sets the value of the encrElemsSelector property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncrElemsSelector(String value) { + this.encrElemsSelector = value; + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + + /** + * Gets the value of the returnResult property. + * + * @return + * possible object is + * {@link ReturnResultType } + * + */ + public ReturnResultType getReturnResult() { + if (returnResult == null) { + return ReturnResultType.XML; + } else { + return returnResult; + } + } + + /** + * Sets the value of the returnResult property. + * + * @param value + * allowed object is + * {@link ReturnResultType } + * + */ + public void setReturnResult(ReturnResultType value) { + this.returnResult = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLResponseType.java new file mode 100644 index 00000000..15ee4c08 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/DecryptXMLResponseType.java @@ -0,0 +1,265 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for DecryptXMLResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DecryptXMLResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="CandidateDocument" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}XMLContentType"/>
+ *         <element name="DecryptedBinaryData" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+ *                 <attribute name="EncrElemSelector" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 <attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DecryptXMLResponseType", propOrder = { + "candidateDocument", + "decryptedBinaryData" +}) +public class DecryptXMLResponseType { + + @XmlElement(name = "CandidateDocument", type = at.gv.egiz.slbinding.impl.XMLContentType.class) + protected at.gv.egiz.slbinding.impl.XMLContentType candidateDocument; + @XmlElement(name = "DecryptedBinaryData") + protected List decryptedBinaryData; + + /** + * Gets the value of the candidateDocument property. + * + * @return + * possible object is + * {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.XMLContentType getCandidateDocument() { + return candidateDocument; + } + + /** + * Sets the value of the candidateDocument property. + * + * @param value + * allowed object is + * {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public void setCandidateDocument(at.buergerkarte.namespaces.securitylayer._1.XMLContentType value) { + this.candidateDocument = ((at.gv.egiz.slbinding.impl.XMLContentType) value); + } + + /** + * Gets the value of the decryptedBinaryData property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the decryptedBinaryData property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDecryptedBinaryData().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DecryptXMLResponseType.DecryptedBinaryData } + * + * + */ + public List getDecryptedBinaryData() { + if (decryptedBinaryData == null) { + decryptedBinaryData = new ArrayList(); + } + return this.decryptedBinaryData; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+     *       <attribute name="EncrElemSelector" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       <attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class DecryptedBinaryData { + + @XmlValue + protected byte[] value; + @XmlAttribute(name = "EncrElemSelector", required = true) + protected String encrElemSelector; + @XmlAttribute(name = "MimeType") + protected String mimeType; + @XmlAttribute(name = "Encoding") + @XmlSchemaType(name = "anyURI") + protected String encoding; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * byte[] + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + + /** + * Gets the value of the encrElemSelector property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncrElemSelector() { + return encrElemSelector; + } + + /** + * Sets the value of the encrElemSelector property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncrElemSelector(String value) { + this.encrElemSelector = value; + } + + /** + * Gets the value of the mimeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * Sets the value of the mimeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMimeType(String value) { + this.mimeType = value; + } + + /** + * Gets the value of the encoding property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncoding() { + return encoding; + } + + /** + * Sets the value of the encoding property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncoding(String value) { + this.encoding = value; + } + + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSRequestType.java new file mode 100644 index 00000000..1630df92 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSRequestType.java @@ -0,0 +1,152 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for EncryptCMSRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptCMSRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RecipientPublicKey" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CMSRecipientPublicKeyType" maxOccurs="unbounded"/>
+ *         <element name="ToBeEncrypted" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CMSToBeEncryptedType"/>
+ *       </sequence>
+ *       <attribute name="ReturnBinaryResult" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptCMSRequestType", propOrder = { + "recipientPublicKey", + "toBeEncrypted" +}) +public class EncryptCMSRequestType { + + @XmlElement(name = "RecipientPublicKey", required = true) + protected List recipientPublicKey; + @XmlElement(name = "ToBeEncrypted", required = true) + protected CMSToBeEncryptedType toBeEncrypted; + @XmlAttribute(name = "ReturnBinaryResult") + protected Boolean returnBinaryResult; + + /** + * Gets the value of the recipientPublicKey property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the recipientPublicKey property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRecipientPublicKey().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CMSRecipientPublicKeyType } + * + * + */ + public List getRecipientPublicKey() { + if (recipientPublicKey == null) { + recipientPublicKey = new ArrayList(); + } + return this.recipientPublicKey; + } + + /** + * Gets the value of the toBeEncrypted property. + * + * @return + * possible object is + * {@link CMSToBeEncryptedType } + * + */ + public CMSToBeEncryptedType getToBeEncrypted() { + return toBeEncrypted; + } + + /** + * Sets the value of the toBeEncrypted property. + * + * @param value + * allowed object is + * {@link CMSToBeEncryptedType } + * + */ + public void setToBeEncrypted(CMSToBeEncryptedType value) { + this.toBeEncrypted = value; + } + + /** + * Gets the value of the returnBinaryResult property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isReturnBinaryResult() { + if (returnBinaryResult == null) { + return false; + } else { + return returnBinaryResult; + } + } + + /** + * Sets the value of the returnBinaryResult property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setReturnBinaryResult(Boolean value) { + this.returnBinaryResult = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSResponseType.java new file mode 100644 index 00000000..1c27b997 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptCMSResponseType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for EncryptCMSResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptCMSResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CMSMessage" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptCMSResponseType", propOrder = { + "cmsMessage" +}) +public class EncryptCMSResponseType { + + @XmlElement(name = "CMSMessage", required = true) + protected byte[] cmsMessage; + + /** + * Gets the value of the cmsMessage property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getCMSMessage() { + return cmsMessage; + } + + /** + * Sets the value of the cmsMessage property. + * + * @param value + * allowed object is + * byte[] + */ + public void setCMSMessage(byte[] value) { + this.cmsMessage = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequest.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequest.java new file mode 100644 index 00000000..e03b78d2 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequest.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}EncryptXMLRequestType">
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "EncryptXMLRequest") +public class EncryptXMLRequest + extends EncryptXMLRequestType +{ + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequestType.java new file mode 100644 index 00000000..e027452c --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLRequestType.java @@ -0,0 +1,157 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for EncryptXMLRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptXMLRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RecipientPublicKey" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}XMLRecipientPublicKeyType" maxOccurs="unbounded"/>
+ *         <element name="ToBeEncrypted" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ToBeEncryptedType" maxOccurs="unbounded"/>
+ *         <element name="EncryptionInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}EncryptionInfoType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptXMLRequestType", propOrder = { + "recipientPublicKey", + "toBeEncrypted", + "encryptionInfo" +}) +@XmlSeeAlso({ + EncryptXMLRequest.class +}) +public class EncryptXMLRequestType { + + @XmlElement(name = "RecipientPublicKey", required = true) + protected List recipientPublicKey; + @XmlElement(name = "ToBeEncrypted", required = true) + protected List toBeEncrypted; + @XmlElement(name = "EncryptionInfo") + protected EncryptionInfoType encryptionInfo; + + /** + * Gets the value of the recipientPublicKey property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the recipientPublicKey property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRecipientPublicKey().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XMLRecipientPublicKeyType } + * + * + */ + public List getRecipientPublicKey() { + if (recipientPublicKey == null) { + recipientPublicKey = new ArrayList(); + } + return this.recipientPublicKey; + } + + /** + * Gets the value of the toBeEncrypted property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the toBeEncrypted property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getToBeEncrypted().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ToBeEncryptedType } + * + * + */ + public List getToBeEncrypted() { + if (toBeEncrypted == null) { + toBeEncrypted = new ArrayList(); + } + return this.toBeEncrypted; + } + + /** + * Gets the value of the encryptionInfo property. + * + * @return + * possible object is + * {@link EncryptionInfoType } + * + */ + public EncryptionInfoType getEncryptionInfo() { + return encryptionInfo; + } + + /** + * Sets the value of the encryptionInfo property. + * + * @param value + * allowed object is + * {@link EncryptionInfoType } + * + */ + public void setEncryptionInfo(EncryptionInfoType value) { + this.encryptionInfo = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLResponseType.java new file mode 100644 index 00000000..dfbd62ee --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptXMLResponseType.java @@ -0,0 +1,189 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for EncryptXMLResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptXMLResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EncryptionEnvironment">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <any/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="EncryptedData" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}EncryptedDataType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptXMLResponseType", propOrder = { + "encryptionEnvironment", + "encryptedData" +}) +public class EncryptXMLResponseType { + + @XmlElement(name = "EncryptionEnvironment", required = true) + protected EncryptXMLResponseType.EncryptionEnvironment encryptionEnvironment; + @XmlElement(name = "EncryptedData") + protected List encryptedData; + + /** + * Gets the value of the encryptionEnvironment property. + * + * @return + * possible object is + * {@link EncryptXMLResponseType.EncryptionEnvironment } + * + */ + public EncryptXMLResponseType.EncryptionEnvironment getEncryptionEnvironment() { + return encryptionEnvironment; + } + + /** + * Sets the value of the encryptionEnvironment property. + * + * @param value + * allowed object is + * {@link EncryptXMLResponseType.EncryptionEnvironment } + * + */ + public void setEncryptionEnvironment(EncryptXMLResponseType.EncryptionEnvironment value) { + this.encryptionEnvironment = value; + } + + /** + * Gets the value of the encryptedData property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the encryptedData property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEncryptedData().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EncryptedDataType } + * + * + */ + public List getEncryptedData() { + if (encryptedData == null) { + encryptedData = new ArrayList(); + } + return this.encryptedData; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <any/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "any" + }) + public static class EncryptionEnvironment { + + @XmlAnyElement(lax = true) + protected Object any; + + /** + * Gets the value of the any property. + * + * @return + * possible object is + * {@link Element } + * {@link Object } + * + */ + public Object getAny() { + return any; + } + + /** + * Sets the value of the any property. + * + * @param value + * allowed object is + * {@link Element } + * {@link Object } + * + */ + public void setAny(Object value) { + this.any = value; + } + + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptedDataType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptedDataType.java new file mode 100644 index 00000000..62931009 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptedDataType.java @@ -0,0 +1,110 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for EncryptedDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptedDataType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+ *       <attribute name="EncDataReference" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptedDataType", propOrder = { + "value" +}) +public class EncryptedDataType { + + @XmlValue + protected byte[] value; + @XmlAttribute(name = "EncDataReference", required = true) + @XmlSchemaType(name = "anyURI") + protected String encDataReference; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * byte[] + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + + /** + * Gets the value of the encDataReference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncDataReference() { + return encDataReference; + } + + /** + * Sets the value of the encDataReference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncDataReference(String value) { + this.encDataReference = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptionInfoType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptionInfoType.java new file mode 100644 index 00000000..84fe5c49 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/EncryptionInfoType.java @@ -0,0 +1,243 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for EncryptionInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptionInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EncryptionEnvironment" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLOptRefContentType"/>
+ *         <element name="EncryptedKeyLocation" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="ParentSelector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *                 <attribute name="NodeCount" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="Supplement" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}DataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptionInfoType", propOrder = { + "encryptionEnvironment", + "encryptedKeyLocation", + "supplement" +}) +public class EncryptionInfoType { + + @XmlElement(name = "EncryptionEnvironment", required = true) + protected Base64XMLOptRefContentType encryptionEnvironment; + @XmlElement(name = "EncryptedKeyLocation") + protected EncryptionInfoType.EncryptedKeyLocation encryptedKeyLocation; + @XmlElement(name = "Supplement") + protected List supplement; + + /** + * Gets the value of the encryptionEnvironment property. + * + * @return + * possible object is + * {@link Base64XMLOptRefContentType } + * + */ + public Base64XMLOptRefContentType getEncryptionEnvironment() { + return encryptionEnvironment; + } + + /** + * Sets the value of the encryptionEnvironment property. + * + * @param value + * allowed object is + * {@link Base64XMLOptRefContentType } + * + */ + public void setEncryptionEnvironment(Base64XMLOptRefContentType value) { + this.encryptionEnvironment = value; + } + + /** + * Gets the value of the encryptedKeyLocation property. + * + * @return + * possible object is + * {@link EncryptionInfoType.EncryptedKeyLocation } + * + */ + public EncryptionInfoType.EncryptedKeyLocation getEncryptedKeyLocation() { + return encryptedKeyLocation; + } + + /** + * Sets the value of the encryptedKeyLocation property. + * + * @param value + * allowed object is + * {@link EncryptionInfoType.EncryptedKeyLocation } + * + */ + public void setEncryptedKeyLocation(EncryptionInfoType.EncryptedKeyLocation value) { + this.encryptedKeyLocation = value; + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="ParentSelector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+     *       <attribute name="NodeCount" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class EncryptedKeyLocation { + + @XmlAttribute(name = "ParentSelector", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String parentSelector; + @XmlAttribute(name = "NodeCount", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger nodeCount; + + /** + * Gets the value of the parentSelector property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getParentSelector() { + return parentSelector; + } + + /** + * Sets the value of the parentSelector property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setParentSelector(String value) { + this.parentSelector = value; + } + + /** + * Gets the value of the nodeCount property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getNodeCount() { + return nodeCount; + } + + /** + * Sets the value of the nodeCount property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setNodeCount(BigInteger value) { + this.nodeCount = value; + } + + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ErrorResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ErrorResponseType.java new file mode 100644 index 00000000..bea8704b --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ErrorResponseType.java @@ -0,0 +1,105 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ErrorResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ErrorResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ErrorCode" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ErrorCodeType"/>
+ *         <element name="Info" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ErrorResponseType", propOrder = { + "errorCode", + "info" +}) +public class ErrorResponseType { + + @XmlElement(name = "ErrorCode") + protected int errorCode; + @XmlElement(name = "Info", required = true) + protected String info; + + /** + * Gets the value of the errorCode property. + * + */ + public int getErrorCode() { + return errorCode; + } + + /** + * Sets the value of the errorCode property. + * + */ + public void setErrorCode(int value) { + this.errorCode = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfo(String value) { + this.info = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequest.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequest.java new file mode 100644 index 00000000..c18c8c6e --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequest.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}GetPropertiesRequestType">
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "GetPropertiesRequest") +public class GetPropertiesRequest + extends GetPropertiesRequestType +{ + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequestType.java new file mode 100644 index 00000000..6e390ce1 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesRequestType.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetPropertiesRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetPropertiesRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetPropertiesRequestType") +@XmlSeeAlso({ + GetPropertiesRequest.class +}) +public class GetPropertiesRequestType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesResponseType.java new file mode 100644 index 00000000..0f546d88 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetPropertiesResponseType.java @@ -0,0 +1,265 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for GetPropertiesResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetPropertiesResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ViewerMediaType" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MimeTypeType" maxOccurs="unbounded"/>
+ *         <element name="XMLSignatureTransform" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded"/>
+ *         <element name="KeyboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}QualifiedBoxIdentifierType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Binding" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BindingType" maxOccurs="unbounded"/>
+ *         <element name="ProtocolVersion" type="{http://www.w3.org/2001/XMLSchema}token" maxOccurs="unbounded"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetPropertiesResponseType", propOrder = { + "viewerMediaType", + "xmlSignatureTransform", + "keyboxIdentifier", + "binding", + "protocolVersion", + "any" +}) +public class GetPropertiesResponseType { + + @XmlElement(name = "ViewerMediaType", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected List viewerMediaType; + @XmlElement(name = "XMLSignatureTransform", required = true) + @XmlSchemaType(name = "anyURI") + protected List xmlSignatureTransform; + @XmlElement(name = "KeyboxIdentifier") + protected List keyboxIdentifier; + @XmlElement(name = "Binding", required = true) + protected List binding; + @XmlElement(name = "ProtocolVersion", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected List protocolVersion; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the viewerMediaType property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the viewerMediaType property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getViewerMediaType().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getViewerMediaType() { + if (viewerMediaType == null) { + viewerMediaType = new ArrayList(); + } + return this.viewerMediaType; + } + + /** + * Gets the value of the xmlSignatureTransform property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the xmlSignatureTransform property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getXMLSignatureTransform().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getXMLSignatureTransform() { + if (xmlSignatureTransform == null) { + xmlSignatureTransform = new ArrayList(); + } + return this.xmlSignatureTransform; + } + + /** + * Gets the value of the keyboxIdentifier property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the keyboxIdentifier property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getKeyboxIdentifier().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link QualifiedBoxIdentifierType } + * + * + */ + public List getKeyboxIdentifier() { + if (keyboxIdentifier == null) { + keyboxIdentifier = new ArrayList(); + } + return this.keyboxIdentifier; + } + + /** + * Gets the value of the binding property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the binding property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBinding().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BindingType } + * + * + */ + public List getBinding() { + if (binding == null) { + binding = new ArrayList(); + } + return this.binding; + } + + /** + * Gets the value of the protocolVersion property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the protocolVersion property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getProtocolVersion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getProtocolVersion() { + if (protocolVersion == null) { + protocolVersion = new ArrayList(); + } + return this.protocolVersion; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusRequestType.java new file mode 100644 index 00000000..50c159a9 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusRequestType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetStatusRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetStatusRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="TokenStatus" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}TokenStatusType"/>
+ *         <element name="MaxDelay" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetStatusRequestType", propOrder = { + "tokenStatus", + "maxDelay" +}) +public class GetStatusRequestType { + + @XmlElement(name = "TokenStatus") + protected TokenStatusType tokenStatus; + @XmlElement(name = "MaxDelay") + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger maxDelay; + + /** + * Gets the value of the tokenStatus property. + * + * @return + * possible object is + * {@link TokenStatusType } + * + */ + public TokenStatusType getTokenStatus() { + return tokenStatus; + } + + /** + * Sets the value of the tokenStatus property. + * + * @param value + * allowed object is + * {@link TokenStatusType } + * + */ + public void setTokenStatus(TokenStatusType value) { + this.tokenStatus = value; + } + + /** + * Gets the value of the maxDelay property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getMaxDelay() { + return maxDelay; + } + + /** + * Sets the value of the maxDelay property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setMaxDelay(BigInteger value) { + this.maxDelay = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusResponseType.java new file mode 100644 index 00000000..41ba23b8 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/GetStatusResponseType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for GetStatusResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetStatusResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="TokenStatus" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}TokenStatusType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetStatusResponseType", propOrder = { + "tokenStatus" +}) +public class GetStatusResponseType { + + @XmlElement(name = "TokenStatus", required = true) + protected TokenStatusType tokenStatus; + + /** + * Gets the value of the tokenStatus property. + * + * @return + * possible object is + * {@link TokenStatusType } + * + */ + public TokenStatusType getTokenStatus() { + return tokenStatus; + } + + /** + * Sets the value of the tokenStatus property. + * + * @param value + * allowed object is + * {@link TokenStatusType } + * + */ + public void setTokenStatus(TokenStatusType value) { + this.tokenStatus = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/HashDataType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/HashDataType.java new file mode 100644 index 00000000..de03f034 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/HashDataType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for HashDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="HashDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLOptRefContentType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "HashDataType", propOrder = { + "metaInfo", + "content" +}) +public class HashDataType { + + @XmlElement(name = "MetaInfo", required = true) + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected Base64XMLOptRefContentType content; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link Base64XMLOptRefContentType } + * + */ + public Base64XMLOptRefContentType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link Base64XMLOptRefContentType } + * + */ + public void setContent(Base64XMLOptRefContentType value) { + this.content = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAssocArrayPairType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAssocArrayPairType.java new file mode 100644 index 00000000..996777e1 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAssocArrayPairType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxAssocArrayPairType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxAssocArrayPairType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLContentType">
+ *       <attribute name="Key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxAssocArrayPairType") +public class InfoboxAssocArrayPairType + extends Base64XMLContentType +{ + + @XmlAttribute(name = "Key", required = true) + protected String key; + + /** + * Gets the value of the key property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKey() { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKey(String value) { + this.key = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableRequestType.java new file mode 100644 index 00000000..d7d12767 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableRequestType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxAvailableRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxAvailableRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxAvailableRequestType") +public class InfoboxAvailableRequestType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableResponseType.java new file mode 100644 index 00000000..a3fb3b36 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxAvailableResponseType.java @@ -0,0 +1,95 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxAvailableResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxAvailableResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded" minOccurs="0">
+ *         <element name="InfoboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxAvailableResponseType", propOrder = { + "infoboxIdentifier" +}) +public class InfoboxAvailableResponseType { + + @XmlElement(name = "InfoboxIdentifier") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected List infoboxIdentifier; + + /** + * Gets the value of the infoboxIdentifier property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the infoboxIdentifier property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getInfoboxIdentifier().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getInfoboxIdentifier() { + if (infoboxIdentifier == null) { + infoboxIdentifier = new ArrayList(); + } + return this.infoboxIdentifier; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateRequestType.java new file mode 100644 index 00000000..0eaebd7b --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateRequestType.java @@ -0,0 +1,284 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxCreateRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxCreateRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InfoboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *         <element name="InfoboxType" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxTypeType"/>
+ *         <element name="Creator" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Purpose" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="ReadAccessAuthorization" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AccessAuthorizationType" minOccurs="0"/>
+ *         <element name="UpdateAccessAuthorization" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AccessAuthorizationType" minOccurs="0"/>
+ *         <element name="ReadUserConfirmation" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}UserConfirmationType" minOccurs="0"/>
+ *         <element name="UpdateUserConfirmation" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}UserConfirmationType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxCreateRequestType", propOrder = { + "infoboxIdentifier", + "infoboxType", + "creator", + "purpose", + "readAccessAuthorization", + "updateAccessAuthorization", + "readUserConfirmation", + "updateUserConfirmation" +}) +public class InfoboxCreateRequestType { + + @XmlElement(name = "InfoboxIdentifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String infoboxIdentifier; + @XmlElement(name = "InfoboxType", required = true) + protected InfoboxTypeType infoboxType; + @XmlElement(name = "Creator", required = true) + protected String creator; + @XmlElement(name = "Purpose", required = true) + protected String purpose; + @XmlElement(name = "ReadAccessAuthorization") + protected AccessAuthorizationType readAccessAuthorization; + @XmlElement(name = "UpdateAccessAuthorization") + protected AccessAuthorizationType updateAccessAuthorization; + @XmlElement(name = "ReadUserConfirmation") + protected UserConfirmationType readUserConfirmation; + @XmlElement(name = "UpdateUserConfirmation") + protected UserConfirmationType updateUserConfirmation; + + /** + * Gets the value of the infoboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfoboxIdentifier() { + return infoboxIdentifier; + } + + /** + * Sets the value of the infoboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfoboxIdentifier(String value) { + this.infoboxIdentifier = value; + } + + /** + * Gets the value of the infoboxType property. + * + * @return + * possible object is + * {@link InfoboxTypeType } + * + */ + public InfoboxTypeType getInfoboxType() { + return infoboxType; + } + + /** + * Sets the value of the infoboxType property. + * + * @param value + * allowed object is + * {@link InfoboxTypeType } + * + */ + public void setInfoboxType(InfoboxTypeType value) { + this.infoboxType = value; + } + + /** + * Gets the value of the creator property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreator() { + return creator; + } + + /** + * Sets the value of the creator property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreator(String value) { + this.creator = value; + } + + /** + * Gets the value of the purpose property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPurpose() { + return purpose; + } + + /** + * Sets the value of the purpose property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPurpose(String value) { + this.purpose = value; + } + + /** + * Gets the value of the readAccessAuthorization property. + * + * @return + * possible object is + * {@link AccessAuthorizationType } + * + */ + public AccessAuthorizationType getReadAccessAuthorization() { + return readAccessAuthorization; + } + + /** + * Sets the value of the readAccessAuthorization property. + * + * @param value + * allowed object is + * {@link AccessAuthorizationType } + * + */ + public void setReadAccessAuthorization(AccessAuthorizationType value) { + this.readAccessAuthorization = value; + } + + /** + * Gets the value of the updateAccessAuthorization property. + * + * @return + * possible object is + * {@link AccessAuthorizationType } + * + */ + public AccessAuthorizationType getUpdateAccessAuthorization() { + return updateAccessAuthorization; + } + + /** + * Sets the value of the updateAccessAuthorization property. + * + * @param value + * allowed object is + * {@link AccessAuthorizationType } + * + */ + public void setUpdateAccessAuthorization(AccessAuthorizationType value) { + this.updateAccessAuthorization = value; + } + + /** + * Gets the value of the readUserConfirmation property. + * + * @return + * possible object is + * {@link UserConfirmationType } + * + */ + public UserConfirmationType getReadUserConfirmation() { + return readUserConfirmation; + } + + /** + * Sets the value of the readUserConfirmation property. + * + * @param value + * allowed object is + * {@link UserConfirmationType } + * + */ + public void setReadUserConfirmation(UserConfirmationType value) { + this.readUserConfirmation = value; + } + + /** + * Gets the value of the updateUserConfirmation property. + * + * @return + * possible object is + * {@link UserConfirmationType } + * + */ + public UserConfirmationType getUpdateUserConfirmation() { + return updateUserConfirmation; + } + + /** + * Sets the value of the updateUserConfirmation property. + * + * @param value + * allowed object is + * {@link UserConfirmationType } + * + */ + public void setUpdateUserConfirmation(UserConfirmationType value) { + this.updateUserConfirmation = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateResponseType.java new file mode 100644 index 00000000..16558710 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxCreateResponseType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxCreateResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxCreateResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxCreateResponseType") +public class InfoboxCreateResponseType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteRequestType.java new file mode 100644 index 00000000..99a342d2 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteRequestType.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxDeleteRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxDeleteRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InfoboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxDeleteRequestType", propOrder = { + "infoboxIdentifier" +}) +public class InfoboxDeleteRequestType { + + @XmlElement(name = "InfoboxIdentifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String infoboxIdentifier; + + /** + * Gets the value of the infoboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfoboxIdentifier() { + return infoboxIdentifier; + } + + /** + * Sets the value of the infoboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfoboxIdentifier(String value) { + this.infoboxIdentifier = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteResponseType.java new file mode 100644 index 00000000..2ca2af9d --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxDeleteResponseType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxDeleteResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxDeleteResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxDeleteResponseType") +public class InfoboxDeleteResponseType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadDataAssocArrayType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadDataAssocArrayType.java new file mode 100644 index 00000000..2b410a53 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadDataAssocArrayType.java @@ -0,0 +1,132 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxReadDataAssocArrayType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadDataAssocArrayType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <sequence maxOccurs="unbounded" minOccurs="0">
+ *           <element name="Key" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *         </sequence>
+ *         <sequence maxOccurs="unbounded" minOccurs="0">
+ *           <element name="Pair" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxAssocArrayPairType"/>
+ *         </sequence>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadDataAssocArrayType", propOrder = { + "key", + "pair" +}) +public class InfoboxReadDataAssocArrayType { + + @XmlElement(name = "Key") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected List key; + @XmlElement(name = "Pair") + protected List pair; + + /** + * Gets the value of the key property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the key property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getKey().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getKey() { + if (key == null) { + key = new ArrayList(); + } + return this.key; + } + + /** + * Gets the value of the pair property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the pair property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPair().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link InfoboxAssocArrayPairType } + * + * + */ + public List getPair() { + if (pair == null) { + pair = new ArrayList(); + } + return this.pair; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsAssocArrayType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsAssocArrayType.java new file mode 100644 index 00000000..e9ec5140 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsAssocArrayType.java @@ -0,0 +1,450 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxReadParamsAssocArrayType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadParamsAssocArrayType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="ReadKeys">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="SearchString" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}WildCardSearchStringType" />
+ *                 <attribute name="UserMakesUnique" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="ReadPairs">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="SearchString" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}WildCardSearchStringType" />
+ *                 <attribute name="UserMakesUnique" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                 <attribute name="ValuesAreXMLEntities" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="ReadValue">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="Key" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType" />
+ *                 <attribute name="ValueIsXMLEntity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadParamsAssocArrayType", propOrder = { + "readKeys", + "readPairs", + "readValue" +}) +public class InfoboxReadParamsAssocArrayType { + + @XmlElement(name = "ReadKeys") + protected InfoboxReadParamsAssocArrayType.ReadKeys readKeys; + @XmlElement(name = "ReadPairs") + protected InfoboxReadParamsAssocArrayType.ReadPairs readPairs; + @XmlElement(name = "ReadValue") + protected InfoboxReadParamsAssocArrayType.ReadValue readValue; + + /** + * Gets the value of the readKeys property. + * + * @return + * possible object is + * {@link InfoboxReadParamsAssocArrayType.ReadKeys } + * + */ + public InfoboxReadParamsAssocArrayType.ReadKeys getReadKeys() { + return readKeys; + } + + /** + * Sets the value of the readKeys property. + * + * @param value + * allowed object is + * {@link InfoboxReadParamsAssocArrayType.ReadKeys } + * + */ + public void setReadKeys(InfoboxReadParamsAssocArrayType.ReadKeys value) { + this.readKeys = value; + } + + /** + * Gets the value of the readPairs property. + * + * @return + * possible object is + * {@link InfoboxReadParamsAssocArrayType.ReadPairs } + * + */ + public InfoboxReadParamsAssocArrayType.ReadPairs getReadPairs() { + return readPairs; + } + + /** + * Sets the value of the readPairs property. + * + * @param value + * allowed object is + * {@link InfoboxReadParamsAssocArrayType.ReadPairs } + * + */ + public void setReadPairs(InfoboxReadParamsAssocArrayType.ReadPairs value) { + this.readPairs = value; + } + + /** + * Gets the value of the readValue property. + * + * @return + * possible object is + * {@link InfoboxReadParamsAssocArrayType.ReadValue } + * + */ + public InfoboxReadParamsAssocArrayType.ReadValue getReadValue() { + return readValue; + } + + /** + * Sets the value of the readValue property. + * + * @param value + * allowed object is + * {@link InfoboxReadParamsAssocArrayType.ReadValue } + * + */ + public void setReadValue(InfoboxReadParamsAssocArrayType.ReadValue value) { + this.readValue = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="SearchString" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}WildCardSearchStringType" />
+     *       <attribute name="UserMakesUnique" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class ReadKeys { + + @XmlAttribute(name = "SearchString", required = true) + protected String searchString; + @XmlAttribute(name = "UserMakesUnique") + protected Boolean userMakesUnique; + + /** + * Gets the value of the searchString property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSearchString() { + return searchString; + } + + /** + * Sets the value of the searchString property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSearchString(String value) { + this.searchString = value; + } + + /** + * Gets the value of the userMakesUnique property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isUserMakesUnique() { + if (userMakesUnique == null) { + return false; + } else { + return userMakesUnique; + } + } + + /** + * Sets the value of the userMakesUnique property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setUserMakesUnique(Boolean value) { + this.userMakesUnique = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="SearchString" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}WildCardSearchStringType" />
+     *       <attribute name="UserMakesUnique" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       <attribute name="ValuesAreXMLEntities" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class ReadPairs { + + @XmlAttribute(name = "SearchString", required = true) + protected String searchString; + @XmlAttribute(name = "UserMakesUnique") + protected Boolean userMakesUnique; + @XmlAttribute(name = "ValuesAreXMLEntities") + protected Boolean valuesAreXMLEntities; + + /** + * Gets the value of the searchString property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSearchString() { + return searchString; + } + + /** + * Sets the value of the searchString property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSearchString(String value) { + this.searchString = value; + } + + /** + * Gets the value of the userMakesUnique property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isUserMakesUnique() { + if (userMakesUnique == null) { + return false; + } else { + return userMakesUnique; + } + } + + /** + * Sets the value of the userMakesUnique property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setUserMakesUnique(Boolean value) { + this.userMakesUnique = value; + } + + /** + * Gets the value of the valuesAreXMLEntities property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isValuesAreXMLEntities() { + if (valuesAreXMLEntities == null) { + return false; + } else { + return valuesAreXMLEntities; + } + } + + /** + * Sets the value of the valuesAreXMLEntities property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setValuesAreXMLEntities(Boolean value) { + this.valuesAreXMLEntities = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="Key" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType" />
+     *       <attribute name="ValueIsXMLEntity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class ReadValue { + + @XmlAttribute(name = "Key", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String key; + @XmlAttribute(name = "ValueIsXMLEntity") + protected Boolean valueIsXMLEntity; + + /** + * Gets the value of the key property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKey() { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKey(String value) { + this.key = value; + } + + /** + * Gets the value of the valueIsXMLEntity property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isValueIsXMLEntity() { + if (valueIsXMLEntity == null) { + return false; + } else { + return valueIsXMLEntity; + } + } + + /** + * Sets the value of the valueIsXMLEntity property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setValueIsXMLEntity(Boolean value) { + this.valueIsXMLEntity = value; + } + + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsBinaryFileType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsBinaryFileType.java new file mode 100644 index 00000000..7d454835 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadParamsBinaryFileType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxReadParamsBinaryFileType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadParamsBinaryFileType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="ContentIsXMLEntity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadParamsBinaryFileType") +public class InfoboxReadParamsBinaryFileType { + + @XmlAttribute(name = "ContentIsXMLEntity") + protected Boolean contentIsXMLEntity; + + /** + * Gets the value of the contentIsXMLEntity property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isContentIsXMLEntity() { + if (contentIsXMLEntity == null) { + return false; + } else { + return contentIsXMLEntity; + } + } + + /** + * Sets the value of the contentIsXMLEntity property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setContentIsXMLEntity(Boolean value) { + this.contentIsXMLEntity = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadRequestType.java new file mode 100644 index 00000000..cc155ba8 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadRequestType.java @@ -0,0 +1,174 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxReadRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InfoboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *         <choice>
+ *           <element name="BinaryFileParameters" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxReadParamsBinaryFileType"/>
+ *           <element name="AssocArrayParameters" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxReadParamsAssocArrayType"/>
+ *         </choice>
+ *         <element name="BoxSpecificParameters" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AnyChildrenType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadRequestType", propOrder = { + "infoboxIdentifier", + "binaryFileParameters", + "assocArrayParameters", + "boxSpecificParameters" +}) +public class InfoboxReadRequestType { + + @XmlElement(name = "InfoboxIdentifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String infoboxIdentifier; + @XmlElement(name = "BinaryFileParameters") + protected InfoboxReadParamsBinaryFileType binaryFileParameters; + @XmlElement(name = "AssocArrayParameters") + protected InfoboxReadParamsAssocArrayType assocArrayParameters; + @XmlElement(name = "BoxSpecificParameters") + protected AnyChildrenType boxSpecificParameters; + + /** + * Gets the value of the infoboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfoboxIdentifier() { + return infoboxIdentifier; + } + + /** + * Sets the value of the infoboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfoboxIdentifier(String value) { + this.infoboxIdentifier = value; + } + + /** + * Gets the value of the binaryFileParameters property. + * + * @return + * possible object is + * {@link InfoboxReadParamsBinaryFileType } + * + */ + public InfoboxReadParamsBinaryFileType getBinaryFileParameters() { + return binaryFileParameters; + } + + /** + * Sets the value of the binaryFileParameters property. + * + * @param value + * allowed object is + * {@link InfoboxReadParamsBinaryFileType } + * + */ + public void setBinaryFileParameters(InfoboxReadParamsBinaryFileType value) { + this.binaryFileParameters = value; + } + + /** + * Gets the value of the assocArrayParameters property. + * + * @return + * possible object is + * {@link InfoboxReadParamsAssocArrayType } + * + */ + public InfoboxReadParamsAssocArrayType getAssocArrayParameters() { + return assocArrayParameters; + } + + /** + * Sets the value of the assocArrayParameters property. + * + * @param value + * allowed object is + * {@link InfoboxReadParamsAssocArrayType } + * + */ + public void setAssocArrayParameters(InfoboxReadParamsAssocArrayType value) { + this.assocArrayParameters = value; + } + + /** + * Gets the value of the boxSpecificParameters property. + * + * @return + * possible object is + * {@link AnyChildrenType } + * + */ + public AnyChildrenType getBoxSpecificParameters() { + return boxSpecificParameters; + } + + /** + * Sets the value of the boxSpecificParameters property. + * + * @param value + * allowed object is + * {@link AnyChildrenType } + * + */ + public void setBoxSpecificParameters(AnyChildrenType value) { + this.boxSpecificParameters = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadResponseType.java new file mode 100644 index 00000000..74ed20d6 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxReadResponseType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxReadResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxReadResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="BinaryFileData" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLContentType"/>
+ *         <element name="AssocArrayData" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxReadDataAssocArrayType"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxReadResponseType", propOrder = { + "binaryFileData", + "assocArrayData" +}) +public class InfoboxReadResponseType { + + @XmlElement(name = "BinaryFileData") + protected Base64XMLContentType binaryFileData; + @XmlElement(name = "AssocArrayData") + protected InfoboxReadDataAssocArrayType assocArrayData; + + /** + * Gets the value of the binaryFileData property. + * + * @return + * possible object is + * {@link Base64XMLContentType } + * + */ + public Base64XMLContentType getBinaryFileData() { + return binaryFileData; + } + + /** + * Sets the value of the binaryFileData property. + * + * @param value + * allowed object is + * {@link Base64XMLContentType } + * + */ + public void setBinaryFileData(Base64XMLContentType value) { + this.binaryFileData = value; + } + + /** + * Gets the value of the assocArrayData property. + * + * @return + * possible object is + * {@link InfoboxReadDataAssocArrayType } + * + */ + public InfoboxReadDataAssocArrayType getAssocArrayData() { + return assocArrayData; + } + + /** + * Sets the value of the assocArrayData property. + * + * @param value + * allowed object is + * {@link InfoboxReadDataAssocArrayType } + * + */ + public void setAssocArrayData(InfoboxReadDataAssocArrayType value) { + this.assocArrayData = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxTypeType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxTypeType.java new file mode 100644 index 00000000..b316a512 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxTypeType.java @@ -0,0 +1,74 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxTypeType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="InfoboxTypeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="BinaryFile"/>
+ *     <enumeration value="AssocArray"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "InfoboxTypeType") +@XmlEnum +public enum InfoboxTypeType { + + @XmlEnumValue("BinaryFile") + BINARY_FILE("BinaryFile"), + @XmlEnumValue("AssocArray") + ASSOC_ARRAY("AssocArray"); + private final String value; + + InfoboxTypeType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static InfoboxTypeType fromValue(String v) { + for (InfoboxTypeType c: InfoboxTypeType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateParamsAssocArrayType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateParamsAssocArrayType.java new file mode 100644 index 00000000..c952a6b8 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateParamsAssocArrayType.java @@ -0,0 +1,297 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxUpdateParamsAssocArrayType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxUpdateParamsAssocArrayType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="UpdateKey">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="Key" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *                 <attribute name="NewKey" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="UpdateValue" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxAssocArrayPairType"/>
+ *         <element name="DeletePair">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="Key" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxUpdateParamsAssocArrayType", propOrder = { + "updateKey", + "updateValue", + "deletePair" +}) +public class InfoboxUpdateParamsAssocArrayType { + + @XmlElement(name = "UpdateKey") + protected InfoboxUpdateParamsAssocArrayType.UpdateKey updateKey; + @XmlElement(name = "UpdateValue") + protected InfoboxAssocArrayPairType updateValue; + @XmlElement(name = "DeletePair") + protected InfoboxUpdateParamsAssocArrayType.DeletePair deletePair; + + /** + * Gets the value of the updateKey property. + * + * @return + * possible object is + * {@link InfoboxUpdateParamsAssocArrayType.UpdateKey } + * + */ + public InfoboxUpdateParamsAssocArrayType.UpdateKey getUpdateKey() { + return updateKey; + } + + /** + * Sets the value of the updateKey property. + * + * @param value + * allowed object is + * {@link InfoboxUpdateParamsAssocArrayType.UpdateKey } + * + */ + public void setUpdateKey(InfoboxUpdateParamsAssocArrayType.UpdateKey value) { + this.updateKey = value; + } + + /** + * Gets the value of the updateValue property. + * + * @return + * possible object is + * {@link InfoboxAssocArrayPairType } + * + */ + public InfoboxAssocArrayPairType getUpdateValue() { + return updateValue; + } + + /** + * Sets the value of the updateValue property. + * + * @param value + * allowed object is + * {@link InfoboxAssocArrayPairType } + * + */ + public void setUpdateValue(InfoboxAssocArrayPairType value) { + this.updateValue = value; + } + + /** + * Gets the value of the deletePair property. + * + * @return + * possible object is + * {@link InfoboxUpdateParamsAssocArrayType.DeletePair } + * + */ + public InfoboxUpdateParamsAssocArrayType.DeletePair getDeletePair() { + return deletePair; + } + + /** + * Sets the value of the deletePair property. + * + * @param value + * allowed object is + * {@link InfoboxUpdateParamsAssocArrayType.DeletePair } + * + */ + public void setDeletePair(InfoboxUpdateParamsAssocArrayType.DeletePair value) { + this.deletePair = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="Key" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class DeletePair { + + @XmlAttribute(name = "Key", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String key; + + /** + * Gets the value of the key property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKey() { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKey(String value) { + this.key = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="Key" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+     *       <attribute name="NewKey" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class UpdateKey { + + @XmlAttribute(name = "Key", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String key; + @XmlAttribute(name = "NewKey", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String newKey; + + /** + * Gets the value of the key property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKey() { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKey(String value) { + this.key = value; + } + + /** + * Gets the value of the newKey property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNewKey() { + return newKey; + } + + /** + * Sets the value of the newKey property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNewKey(String value) { + this.newKey = value; + } + + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateRequestType.java new file mode 100644 index 00000000..d7d3262a --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateRequestType.java @@ -0,0 +1,174 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for InfoboxUpdateRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxUpdateRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InfoboxIdentifier" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}BoxIdentifierType"/>
+ *         <choice>
+ *           <element name="BinaryFileParameters" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLContentType"/>
+ *           <element name="AssocArrayParameters" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}InfoboxUpdateParamsAssocArrayType"/>
+ *         </choice>
+ *         <element name="BoxSpecificParameters" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AnyChildrenType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxUpdateRequestType", propOrder = { + "infoboxIdentifier", + "binaryFileParameters", + "assocArrayParameters", + "boxSpecificParameters" +}) +public class InfoboxUpdateRequestType { + + @XmlElement(name = "InfoboxIdentifier", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String infoboxIdentifier; + @XmlElement(name = "BinaryFileParameters") + protected Base64XMLContentType binaryFileParameters; + @XmlElement(name = "AssocArrayParameters") + protected InfoboxUpdateParamsAssocArrayType assocArrayParameters; + @XmlElement(name = "BoxSpecificParameters") + protected AnyChildrenType boxSpecificParameters; + + /** + * Gets the value of the infoboxIdentifier property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfoboxIdentifier() { + return infoboxIdentifier; + } + + /** + * Sets the value of the infoboxIdentifier property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfoboxIdentifier(String value) { + this.infoboxIdentifier = value; + } + + /** + * Gets the value of the binaryFileParameters property. + * + * @return + * possible object is + * {@link Base64XMLContentType } + * + */ + public Base64XMLContentType getBinaryFileParameters() { + return binaryFileParameters; + } + + /** + * Sets the value of the binaryFileParameters property. + * + * @param value + * allowed object is + * {@link Base64XMLContentType } + * + */ + public void setBinaryFileParameters(Base64XMLContentType value) { + this.binaryFileParameters = value; + } + + /** + * Gets the value of the assocArrayParameters property. + * + * @return + * possible object is + * {@link InfoboxUpdateParamsAssocArrayType } + * + */ + public InfoboxUpdateParamsAssocArrayType getAssocArrayParameters() { + return assocArrayParameters; + } + + /** + * Sets the value of the assocArrayParameters property. + * + * @param value + * allowed object is + * {@link InfoboxUpdateParamsAssocArrayType } + * + */ + public void setAssocArrayParameters(InfoboxUpdateParamsAssocArrayType value) { + this.assocArrayParameters = value; + } + + /** + * Gets the value of the boxSpecificParameters property. + * + * @return + * possible object is + * {@link AnyChildrenType } + * + */ + public AnyChildrenType getBoxSpecificParameters() { + return boxSpecificParameters; + } + + /** + * Sets the value of the boxSpecificParameters property. + * + * @param value + * allowed object is + * {@link AnyChildrenType } + * + */ + public void setBoxSpecificParameters(AnyChildrenType value) { + this.boxSpecificParameters = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateResponseType.java new file mode 100644 index 00000000..3f956cfb --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/InfoboxUpdateResponseType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InfoboxUpdateResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InfoboxUpdateResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InfoboxUpdateResponseType") +public class InfoboxUpdateResponseType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultInfoType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultInfoType.java new file mode 100644 index 00000000..37b3fc92 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultInfoType.java @@ -0,0 +1,109 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for ManifestRefsCheckResultInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ManifestRefsCheckResultInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ReferringSigReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *         <element name="FailedReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" maxOccurs="unbounded" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ManifestRefsCheckResultInfoType", propOrder = { + "content" +}) +public class ManifestRefsCheckResultInfoType { + + @XmlElementRefs({ + @XmlElementRef(name = "FailedReference", namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", type = JAXBElement.class), + @XmlElementRef(name = "ReferringSigReference", namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", type = JAXBElement.class) + }) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link String } + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultType.java new file mode 100644 index 00000000..9c36a603 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ManifestRefsCheckResultType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ManifestRefsCheckResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ManifestRefsCheckResultType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *         <element name="Info" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ManifestRefsCheckResultInfoType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ManifestRefsCheckResultType", propOrder = { + "code", + "info" +}) +public class ManifestRefsCheckResultType { + + @XmlElement(name = "Code", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger code; + @XmlElement(name = "Info", required = true) + protected ManifestRefsCheckResultInfoType info; + + /** + * Gets the value of the code property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getCode() { + return code; + } + + /** + * Sets the value of the code property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setCode(BigInteger value) { + this.code = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link ManifestRefsCheckResultInfoType } + * + */ + public ManifestRefsCheckResultInfoType getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link ManifestRefsCheckResultInfoType } + * + */ + public void setInfo(ManifestRefsCheckResultInfoType value) { + this.info = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/MetaInfoType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/MetaInfoType.java new file mode 100644 index 00000000..50d81319 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/MetaInfoType.java @@ -0,0 +1,152 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for MetaInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MetaInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MimeType" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MimeTypeType"/>
+ *         <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MetaInfoType", propOrder = { + "mimeType", + "description", + "any" +}) +public class MetaInfoType { + + @XmlElement(name = "MimeType", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String mimeType; + @XmlElement(name = "Description") + protected String description; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the mimeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * Sets the value of the mimeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMimeType(String value) { + this.mimeType = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationRequestType.java new file mode 100644 index 00000000..3df4df31 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationRequestType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for NullOperationRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="NullOperationRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "NullOperationRequestType") +public class NullOperationRequestType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationResponseType.java new file mode 100644 index 00000000..84bade8d --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/NullOperationResponseType.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for NullOperationResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="NullOperationResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "NullOperationResponseType") +public class NullOperationResponseType { + + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ObjectFactory.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ObjectFactory.java new file mode 100644 index 00000000..67ce0e2a --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ObjectFactory.java @@ -0,0 +1,1265 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; +import org.w3._2000._09.xmldsig_.KeyInfoType; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the at.buergerkarte.namespaces.securitylayer._1 package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _DecryptXMLResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "DecryptXMLResponse"); + private final static QName _GetPropertiesResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "GetPropertiesResponse"); + private final static QName _IdentityLinkDomainIdentifier_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "IdentityLinkDomainIdentifier"); + private final static QName _InfoboxDeleteResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxDeleteResponse"); + private final static QName _EncryptCMSResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "EncryptCMSResponse"); + private final static QName _VerifyXMLSignatureResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "VerifyXMLSignatureResponse"); + private final static QName _InfoboxUpdateRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxUpdateRequest"); + private final static QName _DecryptXMLRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "DecryptXMLRequest"); + private final static QName _ErrorResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "ErrorResponse"); + private final static QName _CreateXMLSignatureRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CreateXMLSignatureRequest"); + private final static QName _InfoboxCreateResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxCreateResponse"); + private final static QName _VerifyHashRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "VerifyHashRequest"); + private final static QName _GetStatusRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "GetStatusRequest"); + private final static QName _VerifyXMLSignatureRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "VerifyXMLSignatureRequest"); + private final static QName _InfoboxAvailableRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxAvailableRequest"); + private final static QName _VerifyHashResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "VerifyHashResponse"); + private final static QName _InfoboxUpdateResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxUpdateResponse"); + private final static QName _InfoboxDeleteRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxDeleteRequest"); + private final static QName _QualifiedCertificate_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "QualifiedCertificate"); + private final static QName _DecryptCMSRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "DecryptCMSRequest"); + private final static QName _NullOperationResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "NullOperationResponse"); + private final static QName _InfoboxCreateRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxCreateRequest"); + private final static QName _CreateHashResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CreateHashResponse"); + private final static QName _InfoboxReadRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxReadRequest"); + private final static QName _DecryptCMSResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "DecryptCMSResponse"); + private final static QName _EncryptCMSRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "EncryptCMSRequest"); + private final static QName _EncryptXMLResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "EncryptXMLResponse"); + private final static QName _CreateHashRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CreateHashRequest"); + private final static QName _VerifyCMSSignatureRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "VerifyCMSSignatureRequest"); + private final static QName _InfoboxReadResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxReadResponse"); + private final static QName _NullOperationRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "NullOperationRequest"); + private final static QName _GetStatusResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "GetStatusResponse"); + private final static QName _CreateCMSSignatureRequest_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CreateCMSSignatureRequest"); + private final static QName _VerifyCMSSignatureResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "VerifyCMSSignatureResponse"); + private final static QName _CreateCMSSignatureResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CreateCMSSignatureResponse"); + private final static QName _InfoboxAvailableResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "InfoboxAvailableResponse"); + private final static QName _CreateXMLSignatureResponse_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CreateXMLSignatureResponse"); + private final static QName _ManifestRefsCheckResultInfoTypeReferringSigReference_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "ReferringSigReference"); + private final static QName _ManifestRefsCheckResultInfoTypeFailedReference_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "FailedReference"); + private final static QName _VerifyCMSSignatureResponseTypeSignatureCheck_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "SignatureCheck"); + private final static QName _VerifyCMSSignatureResponseTypeCertificateCheck_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "CertificateCheck"); + private final static QName _VerifyCMSSignatureResponseTypeSignerInfo_QNAME = new QName("http://www.buergerkarte.at/namespaces/securitylayer/1.2#", "SignerInfo"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.buergerkarte.namespaces.securitylayer._1 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link ToBeEncryptedType.ElementContent } + * + */ + public ToBeEncryptedType.ElementContent createToBeEncryptedTypeElementContent() { + return new ToBeEncryptedType.ElementContent(); + } + + /** + * Create an instance of {@link InfoboxReadDataAssocArrayType } + * + */ + public InfoboxReadDataAssocArrayType createInfoboxReadDataAssocArrayType() { + return new InfoboxReadDataAssocArrayType(); + } + + /** + * Create an instance of {@link DecryptXMLRequestType } + * + */ + public DecryptXMLRequestType createDecryptXMLRequestType() { + return new DecryptXMLRequestType(); + } + + /** + * Create an instance of {@link Base64XMLLocRefOptRefContentType } + * + */ + public Base64XMLLocRefOptRefContentType createBase64XMLLocRefOptRefContentType() { + return new Base64XMLLocRefOptRefContentType(); + } + + /** + * Create an instance of {@link InfoboxUpdateRequestType } + * + */ + public InfoboxUpdateRequestType createInfoboxUpdateRequestType() { + return new InfoboxUpdateRequestType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureResponseType } + * + */ + public CreateXMLSignatureResponseType createCreateXMLSignatureResponseType() { + return new CreateXMLSignatureResponseType(); + } + + /** + * Create an instance of {@link DecryptCMSRequestType } + * + */ + public DecryptCMSRequestType createDecryptCMSRequestType() { + return new DecryptCMSRequestType(); + } + + /** + * Create an instance of {@link VerificationResultType } + * + */ + public VerificationResultType createVerificationResultType() { + return new VerificationResultType(); + } + + /** + * Create an instance of {@link VerifyHashResponseType } + * + */ + public VerifyHashResponseType createVerifyHashResponseType() { + return new VerifyHashResponseType(); + } + + /** + * Create an instance of {@link InfoboxReadParamsAssocArrayType.ReadValue } + * + */ + public InfoboxReadParamsAssocArrayType.ReadValue createInfoboxReadParamsAssocArrayTypeReadValue() { + return new InfoboxReadParamsAssocArrayType.ReadValue(); + } + + /** + * Create an instance of {@link ToBeEncryptedType } + * + */ + public ToBeEncryptedType createToBeEncryptedType() { + return new ToBeEncryptedType(); + } + + /** + * Create an instance of {@link DecryptCMSResponseType } + * + */ + public DecryptCMSResponseType createDecryptCMSResponseType() { + return new DecryptCMSResponseType(); + } + + /** + * Create an instance of {@link ManifestRefsCheckResultType } + * + */ + public ManifestRefsCheckResultType createManifestRefsCheckResultType() { + return new ManifestRefsCheckResultType(); + } + + /** + * Create an instance of {@link XMLRecipientPublicKeyType } + * + */ + public XMLRecipientPublicKeyType createXMLRecipientPublicKeyType() { + return new XMLRecipientPublicKeyType(); + } + + /** + * Create an instance of {@link InfoboxUpdateResponseType } + * + */ + public InfoboxUpdateResponseType createInfoboxUpdateResponseType() { + return new InfoboxUpdateResponseType(); + } + + /** + * Create an instance of {@link SignatureInfoCreationType } + * + */ + public SignatureInfoCreationType createSignatureInfoCreationType() { + return new SignatureInfoCreationType(); + } + + /** + * Create an instance of {@link HashDataType } + * + */ + public HashDataType createHashDataType() { + return new HashDataType(); + } + + /** + * Create an instance of {@link GetStatusRequestType } + * + */ + public GetStatusRequestType createGetStatusRequestType() { + return new GetStatusRequestType(); + } + + /** + * Create an instance of {@link AnyChildrenType } + * + */ + public AnyChildrenType createAnyChildrenType() { + return new AnyChildrenType(); + } + + /** + * Create an instance of {@link VerifyXMLSignatureResponseType } + * + */ + public VerifyXMLSignatureResponseType createVerifyXMLSignatureResponseType() { + return new VerifyXMLSignatureResponseType(); + } + + /** + * Create an instance of {@link DecryptXMLResponseType.DecryptedBinaryData } + * + */ + public DecryptXMLResponseType.DecryptedBinaryData createDecryptXMLResponseTypeDecryptedBinaryData() { + return new DecryptXMLResponseType.DecryptedBinaryData(); + } + + /** + * Create an instance of {@link GetStatusResponseType } + * + */ + public GetStatusResponseType createGetStatusResponseType() { + return new GetStatusResponseType(); + } + + /** + * Create an instance of {@link Base64XMLOptRefContentType } + * + */ + public Base64XMLOptRefContentType createBase64XMLOptRefContentType() { + return new Base64XMLOptRefContentType(); + } + + /** + * Create an instance of {@link InfoboxDeleteResponseType } + * + */ + public InfoboxDeleteResponseType createInfoboxDeleteResponseType() { + return new InfoboxDeleteResponseType(); + } + + /** + * Create an instance of {@link XMLToBeEncryptedNewType } + * + */ + public XMLToBeEncryptedNewType createXMLToBeEncryptedNewType() { + return new XMLToBeEncryptedNewType(); + } + + /** + * Create an instance of {@link CreateCMSSignatureResponseType } + * + */ + public CreateCMSSignatureResponseType createCreateCMSSignatureResponseType() { + return new CreateCMSSignatureResponseType(); + } + + /** + * Create an instance of {@link QualifiedBoxIdentifierType } + * + */ + public QualifiedBoxIdentifierType createQualifiedBoxIdentifierType() { + return new QualifiedBoxIdentifierType(); + } + + /** + * Create an instance of {@link VerifyHashInfoRequestType } + * + */ + public VerifyHashInfoRequestType createVerifyHashInfoRequestType() { + return new VerifyHashInfoRequestType(); + } + + /** + * Create an instance of {@link at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType createSignatureLocationType() { + return new at.gv.egiz.slbinding.impl.SignatureLocationType(); + } + + /** + * Create an instance of {@link EncryptCMSResponseType } + * + */ + public EncryptCMSResponseType createEncryptCMSResponseType() { + return new EncryptCMSResponseType(); + } + + /** + * Create an instance of {@link DataObjectInfoType } + * + */ + public DataObjectInfoType createDataObjectInfoType() { + return new DataObjectInfoType(); + } + + /** + * Create an instance of {@link CMSToBeEncryptedType } + * + */ + public CMSToBeEncryptedType createCMSToBeEncryptedType() { + return new CMSToBeEncryptedType(); + } + + /** + * Create an instance of {@link InfoboxCreateResponseType } + * + */ + public InfoboxCreateResponseType createInfoboxCreateResponseType() { + return new InfoboxCreateResponseType(); + } + + /** + * Create an instance of {@link EncryptionInfoType } + * + */ + public EncryptionInfoType createEncryptionInfoType() { + return new EncryptionInfoType(); + } + + /** + * Create an instance of {@link CMSDataObjectOptionalMetaType } + * + */ + public CMSDataObjectOptionalMetaType createCMSDataObjectOptionalMetaType() { + return new CMSDataObjectOptionalMetaType(); + } + + /** + * Create an instance of {@link InfoboxReadRequestType } + * + */ + public InfoboxReadRequestType createInfoboxReadRequestType() { + return new InfoboxReadRequestType(); + } + + /** + * Create an instance of {@link Base64OptRefContentType } + * + */ + public Base64OptRefContentType createBase64OptRefContentType() { + return new Base64OptRefContentType(); + } + + /** + * Create an instance of {@link CreateHashInfoRequestType } + * + */ + public CreateHashInfoRequestType createCreateHashInfoRequestType() { + return new CreateHashInfoRequestType(); + } + + /** + * Create an instance of {@link NullOperationRequestType } + * + */ + public NullOperationRequestType createNullOperationRequestType() { + return new NullOperationRequestType(); + } + + /** + * Create an instance of {@link VerifyHashRequestType } + * + */ + public VerifyHashRequestType createVerifyHashRequestType() { + return new VerifyHashRequestType(); + } + + /** + * Create an instance of {@link InfoboxReadParamsBinaryFileType } + * + */ + public InfoboxReadParamsBinaryFileType createInfoboxReadParamsBinaryFileType() { + return new InfoboxReadParamsBinaryFileType(); + } + + /** + * Create an instance of {@link CMSDataObjectRequiredMetaType } + * + */ + public CMSDataObjectRequiredMetaType createCMSDataObjectRequiredMetaType() { + return new CMSDataObjectRequiredMetaType(); + } + + /** + * Create an instance of {@link at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType createTransformsInfoType() { + return new at.gv.egiz.slbinding.impl.TransformsInfoType(); + } + + /** + * Create an instance of {@link Base64XMLContentType } + * + */ + public Base64XMLContentType createBase64XMLContentType() { + return new Base64XMLContentType(); + } + + /** + * Create an instance of {@link CreateXMLSignatureRequestType } + * + */ + public CreateXMLSignatureRequestType createCreateXMLSignatureRequestType() { + return new CreateXMLSignatureRequestType(); + } + + /** + * Create an instance of {@link VerifyCMSSignatureRequestType } + * + */ + public VerifyCMSSignatureRequestType createVerifyCMSSignatureRequestType() { + return new VerifyCMSSignatureRequestType(); + } + + /** + * Create an instance of {@link InfoboxUpdateParamsAssocArrayType } + * + */ + public InfoboxUpdateParamsAssocArrayType createInfoboxUpdateParamsAssocArrayType() { + return new InfoboxUpdateParamsAssocArrayType(); + } + + /** + * Create an instance of {@link VerifyCMSSignatureResponseType } + * + */ + public VerifyCMSSignatureResponseType createVerifyCMSSignatureResponseType() { + return new VerifyCMSSignatureResponseType(); + } + + /** + * Create an instance of {@link BindingType } + * + */ + public BindingType createBindingType() { + return new BindingType(); + } + + /** + * Create an instance of {@link UserConfirmationType } + * + */ + public UserConfirmationType createUserConfirmationType() { + return new UserConfirmationType(); + } + + /** + * Create an instance of {@link ToBeEncryptedType.Element } + * + */ + public ToBeEncryptedType.Element createToBeEncryptedTypeElement() { + return new ToBeEncryptedType.Element(); + } + + /** + * Create an instance of {@link Base64ContentType } + * + */ + public Base64ContentType createBase64ContentType() { + return new Base64ContentType(); + } + + /** + * Create an instance of {@link CreateCMSSignatureRequestType } + * + */ + public CreateCMSSignatureRequestType createCreateCMSSignatureRequestType() { + return new CreateCMSSignatureRequestType(); + } + + /** + * Create an instance of {@link InfoboxReadParamsAssocArrayType } + * + */ + public InfoboxReadParamsAssocArrayType createInfoboxReadParamsAssocArrayType() { + return new InfoboxReadParamsAssocArrayType(); + } + + /** + * Create an instance of {@link AnyMixedChildrenType } + * + */ + public AnyMixedChildrenType createAnyMixedChildrenType() { + return new AnyMixedChildrenType(); + } + + /** + * Create an instance of {@link SignatureInfoVerificationType } + * + */ + public SignatureInfoVerificationType createSignatureInfoVerificationType() { + return new SignatureInfoVerificationType(); + } + + /** + * Create an instance of {@link CreateHashInfoResponseType } + * + */ + public CreateHashInfoResponseType createCreateHashInfoResponseType() { + return new CreateHashInfoResponseType(); + } + + /** + * Create an instance of {@link ErrorResponseType } + * + */ + public ErrorResponseType createErrorResponseType() { + return new ErrorResponseType(); + } + + /** + * Create an instance of {@link InfoboxUpdateParamsAssocArrayType.DeletePair } + * + */ + public InfoboxUpdateParamsAssocArrayType.DeletePair createInfoboxUpdateParamsAssocArrayTypeDeletePair() { + return new InfoboxUpdateParamsAssocArrayType.DeletePair(); + } + + /** + * Create an instance of {@link EncryptionInfoType.EncryptedKeyLocation } + * + */ + public EncryptionInfoType.EncryptedKeyLocation createEncryptionInfoTypeEncryptedKeyLocation() { + return new EncryptionInfoType.EncryptedKeyLocation(); + } + + /** + * Create an instance of {@link InfoboxAvailableRequestType } + * + */ + public InfoboxAvailableRequestType createInfoboxAvailableRequestType() { + return new InfoboxAvailableRequestType(); + } + + /** + * Create an instance of {@link CMSRecipientPublicKeyType } + * + */ + public CMSRecipientPublicKeyType createCMSRecipientPublicKeyType() { + return new CMSRecipientPublicKeyType(); + } + + /** + * Create an instance of {@link EncryptXMLRequestType } + * + */ + public EncryptXMLRequestType createEncryptXMLRequestType() { + return new EncryptXMLRequestType(); + } + + /** + * Create an instance of {@link ReferencesCheckResultInfoType } + * + */ + public ReferencesCheckResultInfoType createReferencesCheckResultInfoType() { + return new ReferencesCheckResultInfoType(); + } + + /** + * Create an instance of {@link GetPropertiesRequestType } + * + */ + public GetPropertiesRequestType createGetPropertiesRequestType() { + return new GetPropertiesRequestType(); + } + + /** + * Create an instance of {@link AccessAuthorizationType } + * + */ + public AccessAuthorizationType createAccessAuthorizationType() { + return new AccessAuthorizationType(); + } + + /** + * Create an instance of {@link MetaInfoType } + * + */ + public MetaInfoType createMetaInfoType() { + return new MetaInfoType(); + } + + /** + * Create an instance of {@link InfoboxReadParamsAssocArrayType.ReadKeys } + * + */ + public InfoboxReadParamsAssocArrayType.ReadKeys createInfoboxReadParamsAssocArrayTypeReadKeys() { + return new InfoboxReadParamsAssocArrayType.ReadKeys(); + } + + /** + * Create an instance of {@link InfoboxCreateRequestType } + * + */ + public InfoboxCreateRequestType createInfoboxCreateRequestType() { + return new InfoboxCreateRequestType(); + } + + /** + * Create an instance of {@link InfoboxReadParamsAssocArrayType.ReadPairs } + * + */ + public InfoboxReadParamsAssocArrayType.ReadPairs createInfoboxReadParamsAssocArrayTypeReadPairs() { + return new InfoboxReadParamsAssocArrayType.ReadPairs(); + } + + /** + * Create an instance of {@link VerifyXMLSignatureRequestType } + * + */ + public VerifyXMLSignatureRequestType createVerifyXMLSignatureRequestType() { + return new VerifyXMLSignatureRequestType(); + } + + /** + * Create an instance of {@link EncryptedDataType } + * + */ + public EncryptedDataType createEncryptedDataType() { + return new EncryptedDataType(); + } + + /** + * Create an instance of {@link ReferencesCheckResultType } + * + */ + public ReferencesCheckResultType createReferencesCheckResultType() { + return new ReferencesCheckResultType(); + } + + /** + * Create an instance of {@link InfoboxAvailableResponseType } + * + */ + public InfoboxAvailableResponseType createInfoboxAvailableResponseType() { + return new InfoboxAvailableResponseType(); + } + + /** + * Create an instance of {@link XMLToBeEncryptedNewContentType } + * + */ + public XMLToBeEncryptedNewContentType createXMLToBeEncryptedNewContentType() { + return new XMLToBeEncryptedNewContentType(); + } + + /** + * Create an instance of {@link RequesterIDType } + * + */ + public RequesterIDType createRequesterIDType() { + return new RequesterIDType(); + } + + /** + * Create an instance of {@link EncryptXMLResponseType.EncryptionEnvironment } + * + */ + public EncryptXMLResponseType.EncryptionEnvironment createEncryptXMLResponseTypeEncryptionEnvironment() { + return new EncryptXMLResponseType.EncryptionEnvironment(); + } + + /** + * Create an instance of {@link CMSEncryptedContentType } + * + */ + public CMSEncryptedContentType createCMSEncryptedContentType() { + return new CMSEncryptedContentType(); + } + + /** + * Create an instance of {@link CheckResultType } + * + */ + public CheckResultType createCheckResultType() { + return new CheckResultType(); + } + + /** + * Create an instance of {@link Base64XMLLocRefContentType } + * + */ + public Base64XMLLocRefContentType createBase64XMLLocRefContentType() { + return new Base64XMLLocRefContentType(); + } + + /** + * Create an instance of {@link InfoboxReadResponseType } + * + */ + public InfoboxReadResponseType createInfoboxReadResponseType() { + return new InfoboxReadResponseType(); + } + + /** + * Create an instance of {@link at.buergerkarte.namespaces.securitylayer._1.XMLContentType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.XMLContentType createXMLContentType() { + return new at.gv.egiz.slbinding.impl.XMLContentType(); + } + + /** + * Create an instance of {@link EncryptXMLRequest } + * + */ + public EncryptXMLRequest createEncryptXMLRequest() { + return new EncryptXMLRequest(); + } + + /** + * Create an instance of {@link InfoboxDeleteRequestType } + * + */ + public InfoboxDeleteRequestType createInfoboxDeleteRequestType() { + return new InfoboxDeleteRequestType(); + } + + /** + * Create an instance of {@link CreateHashRequestType } + * + */ + public CreateHashRequestType createCreateHashRequestType() { + return new CreateHashRequestType(); + } + + /** + * Create an instance of {@link InfoboxAssocArrayPairType } + * + */ + public InfoboxAssocArrayPairType createInfoboxAssocArrayPairType() { + return new InfoboxAssocArrayPairType(); + } + + /** + * Create an instance of {@link DataObjectAssociationType } + * + */ + public DataObjectAssociationType createDataObjectAssociationType() { + return new DataObjectAssociationType(); + } + + /** + * Create an instance of {@link InfoboxUpdateParamsAssocArrayType.UpdateKey } + * + */ + public InfoboxUpdateParamsAssocArrayType.UpdateKey createInfoboxUpdateParamsAssocArrayTypeUpdateKey() { + return new InfoboxUpdateParamsAssocArrayType.UpdateKey(); + } + + /** + * Create an instance of {@link GetPropertiesResponseType } + * + */ + public GetPropertiesResponseType createGetPropertiesResponseType() { + return new GetPropertiesResponseType(); + } + + /** + * Create an instance of {@link GetPropertiesRequest } + * + */ + public GetPropertiesRequest createGetPropertiesRequest() { + return new GetPropertiesRequest(); + } + + /** + * Create an instance of {@link ManifestRefsCheckResultInfoType } + * + */ + public ManifestRefsCheckResultInfoType createManifestRefsCheckResultInfoType() { + return new ManifestRefsCheckResultInfoType(); + } + + /** + * Create an instance of {@link DecryptXMLResponseType } + * + */ + public DecryptXMLResponseType createDecryptXMLResponseType() { + return new DecryptXMLResponseType(); + } + + /** + * Create an instance of {@link CreateHashResponseType } + * + */ + public CreateHashResponseType createCreateHashResponseType() { + return new CreateHashResponseType(); + } + + /** + * Create an instance of {@link EncryptCMSRequestType } + * + */ + public EncryptCMSRequestType createEncryptCMSRequestType() { + return new EncryptCMSRequestType(); + } + + /** + * Create an instance of {@link Base64XMLLocRefReqRefContentType } + * + */ + public Base64XMLLocRefReqRefContentType createBase64XMLLocRefReqRefContentType() { + return new Base64XMLLocRefReqRefContentType(); + } + + /** + * Create an instance of {@link NullOperationResponseType } + * + */ + public NullOperationResponseType createNullOperationResponseType() { + return new NullOperationResponseType(); + } + + /** + * Create an instance of {@link EncryptXMLResponseType } + * + */ + public EncryptXMLResponseType createEncryptXMLResponseType() { + return new EncryptXMLResponseType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DecryptXMLResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "DecryptXMLResponse") + public JAXBElement createDecryptXMLResponse(DecryptXMLResponseType value) { + return new JAXBElement(_DecryptXMLResponse_QNAME, DecryptXMLResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetPropertiesResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "GetPropertiesResponse") + public JAXBElement createGetPropertiesResponse(GetPropertiesResponseType value) { + return new JAXBElement(_GetPropertiesResponse_QNAME, GetPropertiesResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "IdentityLinkDomainIdentifier") + public JAXBElement createIdentityLinkDomainIdentifier(String value) { + return new JAXBElement(_IdentityLinkDomainIdentifier_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxDeleteResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxDeleteResponse") + public JAXBElement createInfoboxDeleteResponse(InfoboxDeleteResponseType value) { + return new JAXBElement(_InfoboxDeleteResponse_QNAME, InfoboxDeleteResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EncryptCMSResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "EncryptCMSResponse") + public JAXBElement createEncryptCMSResponse(EncryptCMSResponseType value) { + return new JAXBElement(_EncryptCMSResponse_QNAME, EncryptCMSResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyXMLSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "VerifyXMLSignatureResponse") + public JAXBElement createVerifyXMLSignatureResponse(VerifyXMLSignatureResponseType value) { + return new JAXBElement(_VerifyXMLSignatureResponse_QNAME, VerifyXMLSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxUpdateRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxUpdateRequest") + public JAXBElement createInfoboxUpdateRequest(InfoboxUpdateRequestType value) { + return new JAXBElement(_InfoboxUpdateRequest_QNAME, InfoboxUpdateRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DecryptXMLRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "DecryptXMLRequest") + public JAXBElement createDecryptXMLRequest(DecryptXMLRequestType value) { + return new JAXBElement(_DecryptXMLRequest_QNAME, DecryptXMLRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ErrorResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "ErrorResponse") + public JAXBElement createErrorResponse(ErrorResponseType value) { + return new JAXBElement(_ErrorResponse_QNAME, ErrorResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateXMLSignatureRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CreateXMLSignatureRequest") + public JAXBElement createCreateXMLSignatureRequest(CreateXMLSignatureRequestType value) { + return new JAXBElement(_CreateXMLSignatureRequest_QNAME, CreateXMLSignatureRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxCreateResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxCreateResponse") + public JAXBElement createInfoboxCreateResponse(InfoboxCreateResponseType value) { + return new JAXBElement(_InfoboxCreateResponse_QNAME, InfoboxCreateResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyHashRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "VerifyHashRequest") + public JAXBElement createVerifyHashRequest(VerifyHashRequestType value) { + return new JAXBElement(_VerifyHashRequest_QNAME, VerifyHashRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetStatusRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "GetStatusRequest") + public JAXBElement createGetStatusRequest(GetStatusRequestType value) { + return new JAXBElement(_GetStatusRequest_QNAME, GetStatusRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyXMLSignatureRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "VerifyXMLSignatureRequest") + public JAXBElement createVerifyXMLSignatureRequest(VerifyXMLSignatureRequestType value) { + return new JAXBElement(_VerifyXMLSignatureRequest_QNAME, VerifyXMLSignatureRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxAvailableRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxAvailableRequest") + public JAXBElement createInfoboxAvailableRequest(InfoboxAvailableRequestType value) { + return new JAXBElement(_InfoboxAvailableRequest_QNAME, InfoboxAvailableRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyHashResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "VerifyHashResponse") + public JAXBElement createVerifyHashResponse(VerifyHashResponseType value) { + return new JAXBElement(_VerifyHashResponse_QNAME, VerifyHashResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxUpdateResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxUpdateResponse") + public JAXBElement createInfoboxUpdateResponse(InfoboxUpdateResponseType value) { + return new JAXBElement(_InfoboxUpdateResponse_QNAME, InfoboxUpdateResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxDeleteRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxDeleteRequest") + public JAXBElement createInfoboxDeleteRequest(InfoboxDeleteRequestType value) { + return new JAXBElement(_InfoboxDeleteRequest_QNAME, InfoboxDeleteRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "QualifiedCertificate") + public JAXBElement createQualifiedCertificate(Object value) { + return new JAXBElement(_QualifiedCertificate_QNAME, Object.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DecryptCMSRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "DecryptCMSRequest") + public JAXBElement createDecryptCMSRequest(DecryptCMSRequestType value) { + return new JAXBElement(_DecryptCMSRequest_QNAME, DecryptCMSRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link NullOperationResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "NullOperationResponse") + public JAXBElement createNullOperationResponse(NullOperationResponseType value) { + return new JAXBElement(_NullOperationResponse_QNAME, NullOperationResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxCreateRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxCreateRequest") + public JAXBElement createInfoboxCreateRequest(InfoboxCreateRequestType value) { + return new JAXBElement(_InfoboxCreateRequest_QNAME, InfoboxCreateRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateHashResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CreateHashResponse") + public JAXBElement createCreateHashResponse(CreateHashResponseType value) { + return new JAXBElement(_CreateHashResponse_QNAME, CreateHashResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxReadRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxReadRequest") + public JAXBElement createInfoboxReadRequest(InfoboxReadRequestType value) { + return new JAXBElement(_InfoboxReadRequest_QNAME, InfoboxReadRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DecryptCMSResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "DecryptCMSResponse") + public JAXBElement createDecryptCMSResponse(DecryptCMSResponseType value) { + return new JAXBElement(_DecryptCMSResponse_QNAME, DecryptCMSResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EncryptCMSRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "EncryptCMSRequest") + public JAXBElement createEncryptCMSRequest(EncryptCMSRequestType value) { + return new JAXBElement(_EncryptCMSRequest_QNAME, EncryptCMSRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EncryptXMLResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "EncryptXMLResponse") + public JAXBElement createEncryptXMLResponse(EncryptXMLResponseType value) { + return new JAXBElement(_EncryptXMLResponse_QNAME, EncryptXMLResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateHashRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CreateHashRequest") + public JAXBElement createCreateHashRequest(CreateHashRequestType value) { + return new JAXBElement(_CreateHashRequest_QNAME, CreateHashRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyCMSSignatureRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "VerifyCMSSignatureRequest") + public JAXBElement createVerifyCMSSignatureRequest(VerifyCMSSignatureRequestType value) { + return new JAXBElement(_VerifyCMSSignatureRequest_QNAME, VerifyCMSSignatureRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxReadResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxReadResponse") + public JAXBElement createInfoboxReadResponse(InfoboxReadResponseType value) { + return new JAXBElement(_InfoboxReadResponse_QNAME, InfoboxReadResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link NullOperationRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "NullOperationRequest") + public JAXBElement createNullOperationRequest(NullOperationRequestType value) { + return new JAXBElement(_NullOperationRequest_QNAME, NullOperationRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetStatusResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "GetStatusResponse") + public JAXBElement createGetStatusResponse(GetStatusResponseType value) { + return new JAXBElement(_GetStatusResponse_QNAME, GetStatusResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateCMSSignatureRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CreateCMSSignatureRequest") + public JAXBElement createCreateCMSSignatureRequest(CreateCMSSignatureRequestType value) { + return new JAXBElement(_CreateCMSSignatureRequest_QNAME, CreateCMSSignatureRequestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VerifyCMSSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "VerifyCMSSignatureResponse") + public JAXBElement createVerifyCMSSignatureResponse(VerifyCMSSignatureResponseType value) { + return new JAXBElement(_VerifyCMSSignatureResponse_QNAME, VerifyCMSSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateCMSSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CreateCMSSignatureResponse") + public JAXBElement createCreateCMSSignatureResponse(CreateCMSSignatureResponseType value) { + return new JAXBElement(_CreateCMSSignatureResponse_QNAME, CreateCMSSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InfoboxAvailableResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "InfoboxAvailableResponse") + public JAXBElement createInfoboxAvailableResponse(InfoboxAvailableResponseType value) { + return new JAXBElement(_InfoboxAvailableResponse_QNAME, InfoboxAvailableResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CreateXMLSignatureResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CreateXMLSignatureResponse") + public JAXBElement createCreateXMLSignatureResponse(CreateXMLSignatureResponseType value) { + return new JAXBElement(_CreateXMLSignatureResponse_QNAME, CreateXMLSignatureResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "ReferringSigReference", scope = ManifestRefsCheckResultInfoType.class) + public JAXBElement createManifestRefsCheckResultInfoTypeReferringSigReference(BigInteger value) { + return new JAXBElement(_ManifestRefsCheckResultInfoTypeReferringSigReference_QNAME, BigInteger.class, ManifestRefsCheckResultInfoType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "FailedReference", scope = ManifestRefsCheckResultInfoType.class) + public JAXBElement createManifestRefsCheckResultInfoTypeFailedReference(BigInteger value) { + return new JAXBElement(_ManifestRefsCheckResultInfoTypeFailedReference_QNAME, BigInteger.class, ManifestRefsCheckResultInfoType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "FailedReference", scope = ReferencesCheckResultInfoType.class) + public JAXBElement createReferencesCheckResultInfoTypeFailedReference(BigInteger value) { + return new JAXBElement(_ManifestRefsCheckResultInfoTypeFailedReference_QNAME, BigInteger.class, ReferencesCheckResultInfoType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CheckResultType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "SignatureCheck", scope = VerifyCMSSignatureResponseType.class) + public JAXBElement createVerifyCMSSignatureResponseTypeSignatureCheck(CheckResultType value) { + return new JAXBElement(_VerifyCMSSignatureResponseTypeSignatureCheck_QNAME, CheckResultType.class, VerifyCMSSignatureResponseType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CheckResultType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "CertificateCheck", scope = VerifyCMSSignatureResponseType.class) + public JAXBElement createVerifyCMSSignatureResponseTypeCertificateCheck(CheckResultType value) { + return new JAXBElement(_VerifyCMSSignatureResponseTypeCertificateCheck_QNAME, CheckResultType.class, VerifyCMSSignatureResponseType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", name = "SignerInfo", scope = VerifyCMSSignatureResponseType.class) + public JAXBElement createVerifyCMSSignatureResponseTypeSignerInfo(KeyInfoType value) { + return new JAXBElement(_VerifyCMSSignatureResponseTypeSignerInfo_QNAME, KeyInfoType.class, VerifyCMSSignatureResponseType.class, value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/QualifiedBoxIdentifierType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/QualifiedBoxIdentifierType.java new file mode 100644 index 00000000..0912608b --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/QualifiedBoxIdentifierType.java @@ -0,0 +1,124 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for QualifiedBoxIdentifierType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="QualifiedBoxIdentifierType">
+ *   <simpleContent>
+ *     <extension base="<http://www.buergerkarte.at/namespaces/securitylayer/1.2#>BoxIdentifierType">
+ *       <attribute name="Signature" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="Encryption" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "QualifiedBoxIdentifierType", propOrder = { + "value" +}) +public class QualifiedBoxIdentifierType { + + @XmlValue + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String value; + @XmlAttribute(name = "Signature", required = true) + protected boolean signature; + @XmlAttribute(name = "Encryption", required = true) + protected boolean encryption; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the signature property. + * + */ + public boolean isSignature() { + return signature; + } + + /** + * Sets the value of the signature property. + * + */ + public void setSignature(boolean value) { + this.signature = value; + } + + /** + * Gets the value of the encryption property. + * + */ + public boolean isEncryption() { + return encryption; + } + + /** + * Sets the value of the encryption property. + * + */ + public void setEncryption(boolean value) { + this.encryption = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultInfoType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultInfoType.java new file mode 100644 index 00000000..4446361e --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultInfoType.java @@ -0,0 +1,103 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for ReferencesCheckResultInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferencesCheckResultInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FailedReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" maxOccurs="unbounded" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferencesCheckResultInfoType", propOrder = { + "content" +}) +public class ReferencesCheckResultInfoType { + + @XmlElementRef(name = "FailedReference", namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", type = JAXBElement.class) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link String } + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultType.java new file mode 100644 index 00000000..79a2a0c4 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReferencesCheckResultType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ReferencesCheckResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferencesCheckResultType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
+ *         <element name="Info" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ReferencesCheckResultInfoType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferencesCheckResultType", propOrder = { + "code", + "info" +}) +public class ReferencesCheckResultType { + + @XmlElement(name = "Code", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger code; + @XmlElement(name = "Info") + protected ReferencesCheckResultInfoType info; + + /** + * Gets the value of the code property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getCode() { + return code; + } + + /** + * Sets the value of the code property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setCode(BigInteger value) { + this.code = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link ReferencesCheckResultInfoType } + * + */ + public ReferencesCheckResultInfoType getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link ReferencesCheckResultInfoType } + * + */ + public void setInfo(ReferencesCheckResultInfoType value) { + this.info = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/RequesterIDType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/RequesterIDType.java new file mode 100644 index 00000000..8b8257e5 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/RequesterIDType.java @@ -0,0 +1,110 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for RequesterIDType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RequesterIDType">
+ *   <simpleContent>
+ *     <extension base="<http://www.buergerkarte.at/namespaces/securitylayer/1.2#>RequesterIDSimpleType">
+ *       <attribute name="AuthenticationClass" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AuthenticationClassType" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RequesterIDType", propOrder = { + "value" +}) +public class RequesterIDType { + + @XmlValue + protected String value; + @XmlAttribute(name = "AuthenticationClass", required = true) + protected AuthenticationClassType authenticationClass; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the authenticationClass property. + * + * @return + * possible object is + * {@link AuthenticationClassType } + * + */ + public AuthenticationClassType getAuthenticationClass() { + return authenticationClass; + } + + /** + * Sets the value of the authenticationClass property. + * + * @param value + * allowed object is + * {@link AuthenticationClassType } + * + */ + public void setAuthenticationClass(AuthenticationClassType value) { + this.authenticationClass = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReturnResultType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReturnResultType.java new file mode 100644 index 00000000..8deef3c5 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ReturnResultType.java @@ -0,0 +1,77 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ReturnResultType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="ReturnResultType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="binary"/>
+ *     <enumeration value="xml"/>
+ *     <enumeration value="none"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "ReturnResultType") +@XmlEnum +public enum ReturnResultType { + + @XmlEnumValue("binary") + BINARY("binary"), + @XmlEnumValue("xml") + XML("xml"), + @XmlEnumValue("none") + NONE("none"); + private final String value; + + ReturnResultType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ReturnResultType fromValue(String v) { + for (ReturnResultType c: ReturnResultType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoCreationType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoCreationType.java new file mode 100644 index 00000000..ca5a6f6f --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoCreationType.java @@ -0,0 +1,148 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignatureInfoCreationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureInfoCreationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignatureEnvironment" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLOptRefContentType"/>
+ *         <element name="SignatureLocation" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}SignatureLocationType"/>
+ *         <element name="Supplement" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}DataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureInfoCreationType", propOrder = { + "signatureEnvironment", + "signatureLocation", + "supplement" +}) +public class SignatureInfoCreationType { + + @XmlElement(name = "SignatureEnvironment", required = true) + protected Base64XMLOptRefContentType signatureEnvironment; + @XmlElement(name = "SignatureLocation", required = true, type = at.gv.egiz.slbinding.impl.SignatureLocationType.class) + protected at.gv.egiz.slbinding.impl.SignatureLocationType signatureLocation; + @XmlElement(name = "Supplement") + protected List supplement; + + /** + * Gets the value of the signatureEnvironment property. + * + * @return + * possible object is + * {@link Base64XMLOptRefContentType } + * + */ + public Base64XMLOptRefContentType getSignatureEnvironment() { + return signatureEnvironment; + } + + /** + * Sets the value of the signatureEnvironment property. + * + * @param value + * allowed object is + * {@link Base64XMLOptRefContentType } + * + */ + public void setSignatureEnvironment(Base64XMLOptRefContentType value) { + this.signatureEnvironment = value; + } + + /** + * Gets the value of the signatureLocation property. + * + * @return + * possible object is + * {@link at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType } + * + */ + public at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType getSignatureLocation() { + return signatureLocation; + } + + /** + * Sets the value of the signatureLocation property. + * + * @param value + * allowed object is + * {@link at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType } + * + */ + public void setSignatureLocation(at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType value) { + this.signatureLocation = ((at.gv.egiz.slbinding.impl.SignatureLocationType) value); + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoVerificationType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoVerificationType.java new file mode 100644 index 00000000..64fc4295 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureInfoVerificationType.java @@ -0,0 +1,118 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignatureInfoVerificationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureInfoVerificationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignatureEnvironment" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLOptRefContentType"/>
+ *         <element name="SignatureLocation" type="{http://www.w3.org/2001/XMLSchema}token"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureInfoVerificationType", propOrder = { + "signatureEnvironment", + "signatureLocation" +}) +public class SignatureInfoVerificationType { + + @XmlElement(name = "SignatureEnvironment", required = true) + protected Base64XMLOptRefContentType signatureEnvironment; + @XmlElement(name = "SignatureLocation", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String signatureLocation; + + /** + * Gets the value of the signatureEnvironment property. + * + * @return + * possible object is + * {@link Base64XMLOptRefContentType } + * + */ + public Base64XMLOptRefContentType getSignatureEnvironment() { + return signatureEnvironment; + } + + /** + * Sets the value of the signatureEnvironment property. + * + * @param value + * allowed object is + * {@link Base64XMLOptRefContentType } + * + */ + public void setSignatureEnvironment(Base64XMLOptRefContentType value) { + this.signatureEnvironment = value; + } + + /** + * Gets the value of the signatureLocation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSignatureLocation() { + return signatureLocation; + } + + /** + * Sets the value of the signatureLocation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSignatureLocation(String value) { + this.signatureLocation = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureLocationType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureLocationType.java new file mode 100644 index 00000000..f98af421 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/SignatureLocationType.java @@ -0,0 +1,117 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignatureLocationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureLocationType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>token">
+ *       <attribute name="Index" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureLocationType", propOrder = { + "value" +}) +public class SignatureLocationType { + + @XmlValue + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String value; + @XmlAttribute(name = "Index", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger index; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the index property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getIndex() { + return index; + } + + /** + * Sets the value of the index property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setIndex(BigInteger value) { + this.index = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ToBeEncryptedType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ToBeEncryptedType.java new file mode 100644 index 00000000..18c8f0ca --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/ToBeEncryptedType.java @@ -0,0 +1,325 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for ToBeEncryptedType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ToBeEncryptedType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="Element">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="Selector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *                 <attribute name="EncDataReference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="ElementContent">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="Selector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *                 <attribute name="EncDataReference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="New" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}XMLToBeEncryptedNewType"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ToBeEncryptedType", propOrder = { + "element", + "elementContent", + "_new" +}) +public class ToBeEncryptedType { + + @XmlElement(name = "Element") + protected ToBeEncryptedType.Element element; + @XmlElement(name = "ElementContent") + protected ToBeEncryptedType.ElementContent elementContent; + @XmlElement(name = "New") + protected XMLToBeEncryptedNewType _new; + + /** + * Gets the value of the element property. + * + * @return + * possible object is + * {@link ToBeEncryptedType.Element } + * + */ + public ToBeEncryptedType.Element getElement() { + return element; + } + + /** + * Sets the value of the element property. + * + * @param value + * allowed object is + * {@link ToBeEncryptedType.Element } + * + */ + public void setElement(ToBeEncryptedType.Element value) { + this.element = value; + } + + /** + * Gets the value of the elementContent property. + * + * @return + * possible object is + * {@link ToBeEncryptedType.ElementContent } + * + */ + public ToBeEncryptedType.ElementContent getElementContent() { + return elementContent; + } + + /** + * Sets the value of the elementContent property. + * + * @param value + * allowed object is + * {@link ToBeEncryptedType.ElementContent } + * + */ + public void setElementContent(ToBeEncryptedType.ElementContent value) { + this.elementContent = value; + } + + /** + * Gets the value of the new property. + * + * @return + * possible object is + * {@link XMLToBeEncryptedNewType } + * + */ + public XMLToBeEncryptedNewType getNew() { + return _new; + } + + /** + * Sets the value of the new property. + * + * @param value + * allowed object is + * {@link XMLToBeEncryptedNewType } + * + */ + public void setNew(XMLToBeEncryptedNewType value) { + this._new = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="Selector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+     *       <attribute name="EncDataReference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Element { + + @XmlAttribute(name = "Selector", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String selector; + @XmlAttribute(name = "EncDataReference") + @XmlSchemaType(name = "anyURI") + protected String encDataReference; + + /** + * Gets the value of the selector property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSelector() { + return selector; + } + + /** + * Sets the value of the selector property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSelector(String value) { + this.selector = value; + } + + /** + * Gets the value of the encDataReference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncDataReference() { + return encDataReference; + } + + /** + * Sets the value of the encDataReference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncDataReference(String value) { + this.encDataReference = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="Selector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+     *       <attribute name="EncDataReference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class ElementContent { + + @XmlAttribute(name = "Selector", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String selector; + @XmlAttribute(name = "EncDataReference") + @XmlSchemaType(name = "anyURI") + protected String encDataReference; + + /** + * Gets the value of the selector property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSelector() { + return selector; + } + + /** + * Sets the value of the selector property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSelector(String value) { + this.selector = value; + } + + /** + * Gets the value of the encDataReference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncDataReference() { + return encDataReference; + } + + /** + * Sets the value of the encDataReference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncDataReference(String value) { + this.encDataReference = value; + } + + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TokenStatusType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TokenStatusType.java new file mode 100644 index 00000000..7e92572b --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TokenStatusType.java @@ -0,0 +1,74 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TokenStatusType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="TokenStatusType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="ready"/>
+ *     <enumeration value="removed"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "TokenStatusType") +@XmlEnum +public enum TokenStatusType { + + @XmlEnumValue("ready") + READY("ready"), + @XmlEnumValue("removed") + REMOVED("removed"); + private final String value; + + TokenStatusType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static TokenStatusType fromValue(String v) { + for (TokenStatusType c: TokenStatusType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TransformsInfoType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TransformsInfoType.java new file mode 100644 index 00000000..5ee40b95 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/TransformsInfoType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.TransformsType; + + +/** + *

Java class for TransformsInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformsInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element name="FinalDataMetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformsInfoType", propOrder = { + "transforms", + "finalDataMetaInfo" +}) +public class TransformsInfoType { + + @XmlElement(name = "Transforms", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected TransformsType transforms; + @XmlElement(name = "FinalDataMetaInfo", required = true) + protected MetaInfoType finalDataMetaInfo; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the finalDataMetaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getFinalDataMetaInfo() { + return finalDataMetaInfo; + } + + /** + * Sets the value of the finalDataMetaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setFinalDataMetaInfo(MetaInfoType value) { + this.finalDataMetaInfo = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationSimpleType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationSimpleType.java new file mode 100644 index 00000000..9419a284 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationSimpleType.java @@ -0,0 +1,80 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for UserConfirmationSimpleType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="UserConfirmationSimpleType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="none"/>
+ *     <enumeration value="info"/>
+ *     <enumeration value="confirm"/>
+ *     <enumeration value="confirmWithSecret"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "UserConfirmationSimpleType") +@XmlEnum +public enum UserConfirmationSimpleType { + + @XmlEnumValue("none") + NONE("none"), + @XmlEnumValue("info") + INFO("info"), + @XmlEnumValue("confirm") + CONFIRM("confirm"), + @XmlEnumValue("confirmWithSecret") + CONFIRM_WITH_SECRET("confirmWithSecret"); + private final String value; + + UserConfirmationSimpleType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static UserConfirmationSimpleType fromValue(String v) { + for (UserConfirmationSimpleType c: UserConfirmationSimpleType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationType.java new file mode 100644 index 00000000..33d2b530 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/UserConfirmationType.java @@ -0,0 +1,102 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for UserConfirmationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="UserConfirmationType">
+ *   <simpleContent>
+ *     <extension base="<http://www.buergerkarte.at/namespaces/securitylayer/1.2#>UserConfirmationSimpleType">
+ *       <attribute name="UserMayChange" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "UserConfirmationType", propOrder = { + "value" +}) +public class UserConfirmationType { + + @XmlValue + protected UserConfirmationSimpleType value; + @XmlAttribute(name = "UserMayChange", required = true) + protected boolean userMayChange; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link UserConfirmationSimpleType } + * + */ + public UserConfirmationSimpleType getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link UserConfirmationSimpleType } + * + */ + public void setValue(UserConfirmationSimpleType value) { + this.value = value; + } + + /** + * Gets the value of the userMayChange property. + * + */ + public boolean isUserMayChange() { + return userMayChange; + } + + /** + * Sets the value of the userMayChange property. + * + */ + public void setUserMayChange(boolean value) { + this.userMayChange = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerificationResultType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerificationResultType.java new file mode 100644 index 00000000..e484619f --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerificationResultType.java @@ -0,0 +1,105 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerificationResultType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerificationResultType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FriendlyName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Result" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerificationResultType", propOrder = { + "friendlyName", + "result" +}) +public class VerificationResultType { + + @XmlElement(name = "FriendlyName") + protected String friendlyName; + @XmlElement(name = "Result") + protected boolean result; + + /** + * Gets the value of the friendlyName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFriendlyName() { + return friendlyName; + } + + /** + * Sets the value of the friendlyName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFriendlyName(String value) { + this.friendlyName = value; + } + + /** + * Gets the value of the result property. + * + */ + public boolean isResult() { + return result; + } + + /** + * Sets the value of the result property. + * + */ + public void setResult(boolean value) { + this.result = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureRequestType.java new file mode 100644 index 00000000..8d6701e5 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureRequestType.java @@ -0,0 +1,177 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for VerifyCMSSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyCMSSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="CMSSignature" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <element name="DataObject" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Signatories" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}SignatoriesType" default="1" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyCMSSignatureRequestType", propOrder = { + "dateTime", + "cmsSignature", + "dataObject" +}) +public class VerifyCMSSignatureRequestType { + + @XmlElement(name = "DateTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar dateTime; + @XmlElement(name = "CMSSignature", required = true) + protected byte[] cmsSignature; + @XmlElement(name = "DataObject") + protected CMSDataObjectOptionalMetaType dataObject; + @XmlAttribute(name = "Signatories") + protected List signatories; + + /** + * Gets the value of the dateTime property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDateTime() { + return dateTime; + } + + /** + * Sets the value of the dateTime property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDateTime(XMLGregorianCalendar value) { + this.dateTime = value; + } + + /** + * Gets the value of the cmsSignature property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getCMSSignature() { + return cmsSignature; + } + + /** + * Sets the value of the cmsSignature property. + * + * @param value + * allowed object is + * byte[] + */ + public void setCMSSignature(byte[] value) { + this.cmsSignature = ((byte[]) value); + } + + /** + * Gets the value of the dataObject property. + * + * @return + * possible object is + * {@link CMSDataObjectOptionalMetaType } + * + */ + public CMSDataObjectOptionalMetaType getDataObject() { + return dataObject; + } + + /** + * Sets the value of the dataObject property. + * + * @param value + * allowed object is + * {@link CMSDataObjectOptionalMetaType } + * + */ + public void setDataObject(CMSDataObjectOptionalMetaType value) { + this.dataObject = value; + } + + /** + * Gets the value of the signatories property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signatories property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignatories().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getSignatories() { + if (signatories == null) { + signatories = new ArrayList(); + } + return this.signatories; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureResponseType.java new file mode 100644 index 00000000..ab44ec4d --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyCMSSignatureResponseType.java @@ -0,0 +1,103 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.KeyInfoType; + + +/** + *

Java class for VerifyCMSSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyCMSSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <element name="SignerInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/>
+ *         <element name="SignatureCheck" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CheckResultType"/>
+ *         <element name="CertificateCheck" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CheckResultType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyCMSSignatureResponseType", propOrder = { + "signerInfoAndSignatureCheckAndCertificateCheck" +}) +public class VerifyCMSSignatureResponseType { + + @XmlElementRefs({ + @XmlElementRef(name = "CertificateCheck", namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", type = JAXBElement.class), + @XmlElementRef(name = "SignerInfo", namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", type = JAXBElement.class), + @XmlElementRef(name = "SignatureCheck", namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", type = JAXBElement.class) + }) + protected List> signerInfoAndSignatureCheckAndCertificateCheck; + + /** + * Gets the value of the signerInfoAndSignatureCheckAndCertificateCheck property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signerInfoAndSignatureCheckAndCertificateCheck property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignerInfoAndSignatureCheckAndCertificateCheck().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link CheckResultType }{@code >} + * {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >} + * {@link JAXBElement }{@code <}{@link CheckResultType }{@code >} + * + * + */ + public List> getSignerInfoAndSignatureCheckAndCertificateCheck() { + if (signerInfoAndSignatureCheckAndCertificateCheck == null) { + signerInfoAndSignatureCheckAndCertificateCheck = new ArrayList>(); + } + return this.signerInfoAndSignatureCheckAndCertificateCheck; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashInfoRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashInfoRequestType.java new file mode 100644 index 00000000..7b1c143d --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashInfoRequestType.java @@ -0,0 +1,169 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerifyHashInfoRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyHashInfoRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashData" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}HashDataType"/>
+ *         <element name="HashAlgorithm" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *         <element name="FriendlyName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="HashValue" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyHashInfoRequestType", propOrder = { + "hashData", + "hashAlgorithm", + "friendlyName", + "hashValue" +}) +public class VerifyHashInfoRequestType { + + @XmlElement(name = "HashData", required = true) + protected HashDataType hashData; + @XmlElement(name = "HashAlgorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String hashAlgorithm; + @XmlElement(name = "FriendlyName") + protected String friendlyName; + @XmlElement(name = "HashValue", required = true) + protected byte[] hashValue; + + /** + * Gets the value of the hashData property. + * + * @return + * possible object is + * {@link HashDataType } + * + */ + public HashDataType getHashData() { + return hashData; + } + + /** + * Sets the value of the hashData property. + * + * @param value + * allowed object is + * {@link HashDataType } + * + */ + public void setHashData(HashDataType value) { + this.hashData = value; + } + + /** + * Gets the value of the hashAlgorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHashAlgorithm() { + return hashAlgorithm; + } + + /** + * Sets the value of the hashAlgorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHashAlgorithm(String value) { + this.hashAlgorithm = value; + } + + /** + * Gets the value of the friendlyName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFriendlyName() { + return friendlyName; + } + + /** + * Sets the value of the friendlyName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFriendlyName(String value) { + this.friendlyName = value; + } + + /** + * Gets the value of the hashValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getHashValue() { + return hashValue; + } + + /** + * Sets the value of the hashValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setHashValue(byte[] value) { + this.hashValue = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashRequestType.java new file mode 100644 index 00000000..ba7adb76 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashRequestType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerifyHashRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyHashRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}VerifyHashInfoRequestType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyHashRequestType", propOrder = { + "hashInfo" +}) +public class VerifyHashRequestType { + + @XmlElement(name = "HashInfo", required = true) + protected List hashInfo; + + /** + * Gets the value of the hashInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hashInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getHashInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link VerifyHashInfoRequestType } + * + * + */ + public List getHashInfo() { + if (hashInfo == null) { + hashInfo = new ArrayList(); + } + return this.hashInfo; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashResponseType.java new file mode 100644 index 00000000..d277ebe3 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyHashResponseType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for VerifyHashResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyHashResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="VerificationResult" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}VerificationResultType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyHashResponseType", propOrder = { + "verificationResult" +}) +public class VerifyHashResponseType { + + @XmlElement(name = "VerificationResult", required = true) + protected List verificationResult; + + /** + * Gets the value of the verificationResult property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the verificationResult property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getVerificationResult().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link VerificationResultType } + * + * + */ + public List getVerificationResult() { + if (verificationResult == null) { + verificationResult = new ArrayList(); + } + return this.verificationResult; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureRequestType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureRequestType.java new file mode 100644 index 00000000..c7ee75d4 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureRequestType.java @@ -0,0 +1,151 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for VerifyXMLSignatureRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyXMLSignatureRequestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="SignatureInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}SignatureInfoVerificationType"/>
+ *         <element name="Supplement" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}DataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyXMLSignatureRequestType", propOrder = { + "dateTime", + "signatureInfo", + "supplement" +}) +public class VerifyXMLSignatureRequestType { + + @XmlElement(name = "DateTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar dateTime; + @XmlElement(name = "SignatureInfo", required = true) + protected SignatureInfoVerificationType signatureInfo; + @XmlElement(name = "Supplement") + protected List supplement; + + /** + * Gets the value of the dateTime property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDateTime() { + return dateTime; + } + + /** + * Sets the value of the dateTime property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDateTime(XMLGregorianCalendar value) { + this.dateTime = value; + } + + /** + * Gets the value of the signatureInfo property. + * + * @return + * possible object is + * {@link SignatureInfoVerificationType } + * + */ + public SignatureInfoVerificationType getSignatureInfo() { + return signatureInfo; + } + + /** + * Sets the value of the signatureInfo property. + * + * @param value + * allowed object is + * {@link SignatureInfoVerificationType } + * + */ + public void setSignatureInfo(SignatureInfoVerificationType value) { + this.signatureInfo = value; + } + + /** + * Gets the value of the supplement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the supplement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSupplement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectAssociationType } + * + * + */ + public List getSupplement() { + if (supplement == null) { + supplement = new ArrayList(); + } + return this.supplement; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureResponseType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureResponseType.java new file mode 100644 index 00000000..b0106756 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/VerifyXMLSignatureResponseType.java @@ -0,0 +1,205 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.KeyInfoType; + + +/** + *

Java class for VerifyXMLSignatureResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="VerifyXMLSignatureResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignerInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/>
+ *         <element name="SignatureCheck" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ReferencesCheckResultType"/>
+ *         <element name="SignatureManifestCheck" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ReferencesCheckResultType"/>
+ *         <element name="XMLDSIGManifestCheck" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ManifestRefsCheckResultType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CertificateCheck" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CheckResultType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VerifyXMLSignatureResponseType", propOrder = { + "signerInfo", + "signatureCheck", + "signatureManifestCheck", + "xmldsigManifestCheck", + "certificateCheck" +}) +public class VerifyXMLSignatureResponseType { + + @XmlElement(name = "SignerInfo", required = true) + protected KeyInfoType signerInfo; + @XmlElement(name = "SignatureCheck", required = true) + protected ReferencesCheckResultType signatureCheck; + @XmlElement(name = "SignatureManifestCheck", required = true) + protected ReferencesCheckResultType signatureManifestCheck; + @XmlElement(name = "XMLDSIGManifestCheck") + protected List xmldsigManifestCheck; + @XmlElement(name = "CertificateCheck", required = true) + protected CheckResultType certificateCheck; + + /** + * Gets the value of the signerInfo property. + * + * @return + * possible object is + * {@link KeyInfoType } + * + */ + public KeyInfoType getSignerInfo() { + return signerInfo; + } + + /** + * Sets the value of the signerInfo property. + * + * @param value + * allowed object is + * {@link KeyInfoType } + * + */ + public void setSignerInfo(KeyInfoType value) { + this.signerInfo = value; + } + + /** + * Gets the value of the signatureCheck property. + * + * @return + * possible object is + * {@link ReferencesCheckResultType } + * + */ + public ReferencesCheckResultType getSignatureCheck() { + return signatureCheck; + } + + /** + * Sets the value of the signatureCheck property. + * + * @param value + * allowed object is + * {@link ReferencesCheckResultType } + * + */ + public void setSignatureCheck(ReferencesCheckResultType value) { + this.signatureCheck = value; + } + + /** + * Gets the value of the signatureManifestCheck property. + * + * @return + * possible object is + * {@link ReferencesCheckResultType } + * + */ + public ReferencesCheckResultType getSignatureManifestCheck() { + return signatureManifestCheck; + } + + /** + * Sets the value of the signatureManifestCheck property. + * + * @param value + * allowed object is + * {@link ReferencesCheckResultType } + * + */ + public void setSignatureManifestCheck(ReferencesCheckResultType value) { + this.signatureManifestCheck = value; + } + + /** + * Gets the value of the xmldsigManifestCheck property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the xmldsigManifestCheck property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getXMLDSIGManifestCheck().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ManifestRefsCheckResultType } + * + * + */ + public List getXMLDSIGManifestCheck() { + if (xmldsigManifestCheck == null) { + xmldsigManifestCheck = new ArrayList(); + } + return this.xmldsigManifestCheck; + } + + /** + * Gets the value of the certificateCheck property. + * + * @return + * possible object is + * {@link CheckResultType } + * + */ + public CheckResultType getCertificateCheck() { + return certificateCheck; + } + + /** + * Sets the value of the certificateCheck property. + * + * @param value + * allowed object is + * {@link CheckResultType } + * + */ + public void setCertificateCheck(CheckResultType value) { + this.certificateCheck = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLContentType.java new file mode 100644 index 00000000..f45220ed --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLContentType.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for XMLContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="XMLContentType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}AnyMixedChildrenType">
+ *       <attribute ref="{http://www.w3.org/XML/1998/namespace}space"/>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XMLContentType") +public class XMLContentType + extends AnyMixedChildrenType +{ + + @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String space; + + /** + * Gets the value of the space property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSpace() { + return space; + } + + /** + * Sets the value of the space property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSpace(String value) { + this.space = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLRecipientPublicKeyType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLRecipientPublicKeyType.java new file mode 100644 index 00000000..a862050f --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLRecipientPublicKeyType.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.KeyValueType; + + +/** + *

Java class for XMLRecipientPublicKeyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="XMLRecipientPublicKeyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/>
+ *         <element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XMLRecipientPublicKeyType", propOrder = { + "keyValue", + "x509Certificate" +}) +public class XMLRecipientPublicKeyType { + + @XmlElement(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected KeyValueType keyValue; + @XmlElement(name = "X509Certificate") + protected byte[] x509Certificate; + + /** + * Gets the value of the keyValue property. + * + * @return + * possible object is + * {@link KeyValueType } + * + */ + public KeyValueType getKeyValue() { + return keyValue; + } + + /** + * Sets the value of the keyValue property. + * + * @param value + * allowed object is + * {@link KeyValueType } + * + */ + public void setKeyValue(KeyValueType value) { + this.keyValue = value; + } + + /** + * Gets the value of the x509Certificate property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getX509Certificate() { + return x509Certificate; + } + + /** + * Sets the value of the x509Certificate property. + * + * @param value + * allowed object is + * byte[] + */ + public void setX509Certificate(byte[] value) { + this.x509Certificate = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewContentType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewContentType.java new file mode 100644 index 00000000..fe1fb6db --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewContentType.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for XMLToBeEncryptedNewContentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="XMLToBeEncryptedNewContentType">
+ *   <complexContent>
+ *     <extension base="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}Base64XMLLocRefContentType">
+ *       <attribute name="EncDataReference" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XMLToBeEncryptedNewContentType") +public class XMLToBeEncryptedNewContentType + extends Base64XMLLocRefContentType +{ + + @XmlAttribute(name = "EncDataReference") + @XmlSchemaType(name = "anyURI") + protected String encDataReference; + + /** + * Gets the value of the encDataReference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncDataReference() { + return encDataReference; + } + + /** + * Sets the value of the encDataReference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncDataReference(String value) { + this.encDataReference = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewType.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewType.java new file mode 100644 index 00000000..7e65a1b7 --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/XMLToBeEncryptedNewType.java @@ -0,0 +1,175 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + + +package at.buergerkarte.namespaces.securitylayer._1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for XMLToBeEncryptedNewType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="XMLToBeEncryptedNewType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MetaInfo" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}MetaInfoType"/>
+ *         <element name="Content" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}XMLToBeEncryptedNewContentType"/>
+ *       </sequence>
+ *       <attribute name="ParentSelector" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
+ *       <attribute name="NodeCount" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XMLToBeEncryptedNewType", propOrder = { + "metaInfo", + "content" +}) +public class XMLToBeEncryptedNewType { + + @XmlElement(name = "MetaInfo", required = true) + protected MetaInfoType metaInfo; + @XmlElement(name = "Content", required = true) + protected XMLToBeEncryptedNewContentType content; + @XmlAttribute(name = "ParentSelector", required = true) + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String parentSelector; + @XmlAttribute(name = "NodeCount", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger nodeCount; + + /** + * Gets the value of the metaInfo property. + * + * @return + * possible object is + * {@link MetaInfoType } + * + */ + public MetaInfoType getMetaInfo() { + return metaInfo; + } + + /** + * Sets the value of the metaInfo property. + * + * @param value + * allowed object is + * {@link MetaInfoType } + * + */ + public void setMetaInfo(MetaInfoType value) { + this.metaInfo = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link XMLToBeEncryptedNewContentType } + * + */ + public XMLToBeEncryptedNewContentType getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link XMLToBeEncryptedNewContentType } + * + */ + public void setContent(XMLToBeEncryptedNewContentType value) { + this.content = value; + } + + /** + * Gets the value of the parentSelector property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getParentSelector() { + return parentSelector; + } + + /** + * Sets the value of the parentSelector property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setParentSelector(String value) { + this.parentSelector = value; + } + + /** + * Gets the value of the nodeCount property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getNodeCount() { + return nodeCount; + } + + /** + * Sets the value of the nodeCount property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setNodeCount(BigInteger value) { + this.nodeCount = value; + } + +} diff --git a/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/package-info.java b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/package-info.java new file mode 100644 index 00000000..666834ce --- /dev/null +++ b/utils/src/main/java/at/buergerkarte/namespaces/securitylayer/_1/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:41:37 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package at.buergerkarte.namespaces.securitylayer._1; diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractAddressType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractAddressType.java new file mode 100644 index 00000000..ab531403 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractAddressType.java @@ -0,0 +1,159 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.namespace.QName; + + +/** + * main structure of address data + * + *

Java class for AbstractAddressType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AbstractAddressType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="Identification" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}IdentificationType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AbstractAddressType", propOrder = { + "identification" +}) +@XmlSeeAlso({ + TelephoneAddressType.class, + InternetAddressType.class, + TypedPostalAddressType.class +}) +public abstract class AbstractAddressType { + + @XmlElement(name = "Identification") + protected List identification; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the identification property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the identification property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getIdentification().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link IdentificationType } + * + * + */ + public List getIdentification() { + if (identification == null) { + identification = new ArrayList(); + } + return this.identification; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractPersonType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractPersonType.java new file mode 100644 index 00000000..1efb7ed5 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/AbstractPersonType.java @@ -0,0 +1,159 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.namespace.QName; + + +/** + * main structure of person data + * + *

Java class for AbstractPersonType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AbstractPersonType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="Identification" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}IdentificationType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AbstractPersonType", propOrder = { + "identification" +}) +@XmlSeeAlso({ + PersonDataType.class, + PhysicalPersonType.class, + CorporateBodyType.class +}) +public abstract class AbstractPersonType { + + @XmlElement(name = "Identification") + protected List identification; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the identification property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the identification property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getIdentification().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link IdentificationType } + * + * + */ + public List getIdentification() { + if (identification == null) { + identification = new ArrayList(); + } + return this.identification; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/CorporateBodyType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/CorporateBodyType.java new file mode 100644 index 00000000..2474b618 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/CorporateBodyType.java @@ -0,0 +1,260 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + * juridical person, organisation + * + *

Java class for CorporateBodyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CorporateBodyType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractPersonType">
+ *       <sequence minOccurs="0">
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="FullName" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
+ *         <element name="AlternativeName" type="{http://www.w3.org/2001/XMLSchema}token" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="LegalForm" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *         <element name="Organisation" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CorporateBodyType", propOrder = { + "type", + "fullName", + "alternativeName", + "legalForm", + "organisation", + "any" +}) +public class CorporateBodyType + extends AbstractPersonType +{ + + @XmlElement(name = "Type") + @XmlSchemaType(name = "anyURI") + protected List type; + @XmlElement(name = "FullName") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String fullName; + @XmlElement(name = "AlternativeName") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected List alternativeName; + @XmlElement(name = "LegalForm") + @XmlSchemaType(name = "anyURI") + protected String legalForm; + @XmlElement(name = "Organisation") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String organisation; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the type property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the type property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getType().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getType() { + if (type == null) { + type = new ArrayList(); + } + return this.type; + } + + /** + * Gets the value of the fullName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFullName() { + return fullName; + } + + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFullName(String value) { + this.fullName = value; + } + + /** + * Gets the value of the alternativeName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the alternativeName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAlternativeName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAlternativeName() { + if (alternativeName == null) { + alternativeName = new ArrayList(); + } + return this.alternativeName; + } + + /** + * Gets the value of the legalForm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLegalForm() { + return legalForm; + } + + /** + * Sets the value of the legalForm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLegalForm(String value) { + this.legalForm = value; + } + + /** + * Gets the value of the organisation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOrganisation() { + return organisation; + } + + /** + * Sets the value of the organisation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOrganisation(String value) { + this.organisation = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link Element } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedAlternativeNameTypeType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedAlternativeNameTypeType.java new file mode 100644 index 00000000..938136b7 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedAlternativeNameTypeType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DefinedAlternativeNameTypeType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="DefinedAlternativeNameTypeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="ArtistName"/>
+ *     <enumeration value="NickName"/>
+ *     <enumeration value="FormerName"/>
+ *     <enumeration value="Alias"/>
+ *     <enumeration value="MaidenName"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "DefinedAlternativeNameTypeType") +@XmlEnum +public enum DefinedAlternativeNameTypeType { + + @XmlEnumValue("ArtistName") + ARTIST_NAME("ArtistName"), + @XmlEnumValue("NickName") + NICK_NAME("NickName"), + @XmlEnumValue("FormerName") + FORMER_NAME("FormerName"), + @XmlEnumValue("Alias") + ALIAS("Alias"), + @XmlEnumValue("MaidenName") + MAIDEN_NAME("MaidenName"); + private final String value; + + DefinedAlternativeNameTypeType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static DefinedAlternativeNameTypeType fromValue(String v) { + for (DefinedAlternativeNameTypeType c: DefinedAlternativeNameTypeType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedRelationType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedRelationType.java new file mode 100644 index 00000000..972db662 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/DefinedRelationType.java @@ -0,0 +1,95 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DefinedRelationType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="DefinedRelationType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="family:Parent"/>
+ *     <enumeration value="family:Child"/>
+ *     <enumeration value="family:Sibling"/>
+ *     <enumeration value="family:Grandparent"/>
+ *     <enumeration value="family:Grandchild"/>
+ *     <enumeration value="family:Spouse"/>
+ *     <enumeration value="function:LegalGuardian"/>
+ *     <enumeration value="function:IsGuardedBy"/>
+ *     <enumeration value="function:Cohabitant"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "DefinedRelationType") +@XmlEnum +public enum DefinedRelationType { + + @XmlEnumValue("family:Parent") + FAMILY_PARENT("family:Parent"), + @XmlEnumValue("family:Child") + FAMILY_CHILD("family:Child"), + @XmlEnumValue("family:Sibling") + FAMILY_SIBLING("family:Sibling"), + @XmlEnumValue("family:Grandparent") + FAMILY_GRANDPARENT("family:Grandparent"), + @XmlEnumValue("family:Grandchild") + FAMILY_GRANDCHILD("family:Grandchild"), + @XmlEnumValue("family:Spouse") + FAMILY_SPOUSE("family:Spouse"), + @XmlEnumValue("function:LegalGuardian") + FUNCTION_LEGAL_GUARDIAN("function:LegalGuardian"), + @XmlEnumValue("function:IsGuardedBy") + FUNCTION_IS_GUARDED_BY("function:IsGuardedBy"), + @XmlEnumValue("function:Cohabitant") + FUNCTION_COHABITANT("function:Cohabitant"); + private final String value; + + DefinedRelationType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static DefinedRelationType fromValue(String v) { + for (DefinedRelationType c: DefinedRelationType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/IdentificationType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/IdentificationType.java new file mode 100644 index 00000000..ae647fb5 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/IdentificationType.java @@ -0,0 +1,333 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + * unique identifier + * + *

Java class for IdentificationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="IdentificationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Value">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *         <element name="Authority" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "IdentificationType", propOrder = { + "value", + "type", + "authority", + "any" +}) +public class IdentificationType { + + @XmlElement(name = "Value", required = true) + protected IdentificationType.Value value; + @XmlElement(name = "Type", required = true) + @XmlSchemaType(name = "anyURI") + protected String type; + @XmlElement(name = "Authority") + @XmlSchemaType(name = "anyURI") + protected String authority; + @XmlAnyElement(lax = true) + protected List any; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link IdentificationType.Value } + * + */ + public IdentificationType.Value getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link IdentificationType.Value } + * + */ + public void setValue(IdentificationType.Value value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the authority property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAuthority() { + return authority; + } + + /** + * Sets the value of the authority property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAuthority(String value) { + this.authority = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link Element } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Value { + + @XmlValue + protected String value; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/InternetAddressType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/InternetAddressType.java new file mode 100644 index 00000000..4787d299 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/InternetAddressType.java @@ -0,0 +1,158 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.KeyInfoType; +import org.w3c.dom.Element; + + +/** + * internet based communication + * + *

Java class for InternetAddressType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InternetAddressType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractAddressType">
+ *       <sequence minOccurs="0">
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
+ *         <element name="Address" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *         <any/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InternetAddressType", propOrder = { + "keyInfo", + "address", + "any" +}) +public class InternetAddressType + extends AbstractAddressType +{ + + @XmlElement(name = "KeyInfo", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected KeyInfoType keyInfo; + @XmlElement(name = "Address") + @XmlSchemaType(name = "anyURI") + protected String address; + @XmlAnyElement(lax = true) + protected List any; + + /** + * certificate for secure communication + * + * @return + * possible object is + * {@link KeyInfoType } + * + */ + public KeyInfoType getKeyInfo() { + return keyInfo; + } + + /** + * Sets the value of the keyInfo property. + * + * @param value + * allowed object is + * {@link KeyInfoType } + * + */ + public void setKeyInfo(KeyInfoType value) { + this.keyInfo = value; + } + + /** + * Gets the value of the address property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAddress() { + return address; + } + + /** + * Sets the value of the address property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAddress(String value) { + this.address = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link Element } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MaritalStatusType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MaritalStatusType.java new file mode 100644 index 00000000..06a0cf72 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MaritalStatusType.java @@ -0,0 +1,80 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for MaritalStatusType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="MaritalStatusType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
+ *     <enumeration value="single"/>
+ *     <enumeration value="married"/>
+ *     <enumeration value="divorced"/>
+ *     <enumeration value="widowed"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "MaritalStatusType") +@XmlEnum +public enum MaritalStatusType { + + @XmlEnumValue("single") + SINGLE("single"), + @XmlEnumValue("married") + MARRIED("married"), + @XmlEnumValue("divorced") + DIVORCED("divorced"), + @XmlEnumValue("widowed") + WIDOWED("widowed"); + private final String value; + + MaritalStatusType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static MaritalStatusType fromValue(String v) { + for (MaritalStatusType c: MaritalStatusType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MobileTelcomNumberType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MobileTelcomNumberType.java new file mode 100644 index 00000000..3ee9e156 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/MobileTelcomNumberType.java @@ -0,0 +1,83 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for MobileTelcomNumberType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MobileTelcomNumberType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}TelcomNumberType">
+ *       <attribute name="smsEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MobileTelcomNumberType") +public class MobileTelcomNumberType + extends TelcomNumberType +{ + + @XmlAttribute + protected Boolean smsEnabled; + + /** + * Gets the value of the smsEnabled property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isSmsEnabled() { + return smsEnabled; + } + + /** + * Sets the value of the smsEnabled property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setSmsEnabled(Boolean value) { + this.smsEnabled = value; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/ObjectFactory.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/ObjectFactory.java new file mode 100644 index 00000000..53e21a04 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/ObjectFactory.java @@ -0,0 +1,436 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the at.gv.e_government.reference.namespace.persondata._20020228_ package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _NationalNumber_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "NationalNumber"); + private final static QName _TypedPostalAddress_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "TypedPostalAddress"); + private final static QName _Extension_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Extension"); + private final static QName _Address_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Address"); + private final static QName _PhysicalPerson_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "PhysicalPerson"); + private final static QName _InternationalCountryCode_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "InternationalCountryCode"); + private final static QName _CorporateBody_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "CorporateBody"); + private final static QName _Mobile_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Mobile"); + private final static QName _Person_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Person"); + private final static QName _AreaCityCode_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "AreaCityCode"); + private final static QName _Pager_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Pager"); + private final static QName _TTYTDD_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "TTYTDD"); + private final static QName _PersonData_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "PersonData"); + private final static QName _SubscriberNumber_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "SubscriberNumber"); + private final static QName _Fax_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Fax"); + private final static QName _PersonName_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "PersonName"); + private final static QName _Telephone_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "Telephone"); + private final static QName _PostalAddress_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "PostalAddress"); + private final static QName _TelephoneAddress_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "TelephoneAddress"); + private final static QName _InternetAddress_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "InternetAddress"); + private final static QName _FormattedNumber_QNAME = new QName("http://reference.e-government.gv.at/namespace/persondata/20020228#", "FormattedNumber"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.e_government.reference.namespace.persondata._20020228_ + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link PersonDataType } + * + */ + public PersonDataType createPersonDataType() { + return new PersonDataType(); + } + + /** + * Create an instance of {@link PhysicalPersonType } + * + */ + public PhysicalPersonType createPhysicalPersonType() { + return new PhysicalPersonType(); + } + + /** + * Create an instance of {@link PersonNameType.Affix } + * + */ + public PersonNameType.Affix createPersonNameTypeAffix() { + return new PersonNameType.Affix(); + } + + /** + * Create an instance of {@link PostalAddressType } + * + */ + public PostalAddressType createPostalAddressType() { + return new PostalAddressType(); + } + + /** + * Create an instance of {@link TypedPostalAddressType } + * + */ + public TypedPostalAddressType createTypedPostalAddressType() { + return new TypedPostalAddressType(); + } + + /** + * Create an instance of {@link TelcomNumberType } + * + */ + public TelcomNumberType createTelcomNumberType() { + return new TelcomNumberType(); + } + + /** + * Create an instance of {@link PhysicalPersonType.AlternativeName } + * + */ + public PhysicalPersonType.AlternativeName createPhysicalPersonTypeAlternativeName() { + return new PhysicalPersonType.AlternativeName(); + } + + /** + * Create an instance of {@link TelephoneAddressType } + * + */ + public TelephoneAddressType createTelephoneAddressType() { + return new TelephoneAddressType(); + } + + /** + * Create an instance of {@link MobileTelcomNumberType } + * + */ + public MobileTelcomNumberType createMobileTelcomNumberType() { + return new MobileTelcomNumberType(); + } + + /** + * Create an instance of {@link TelcomNumberListType } + * + */ + public TelcomNumberListType createTelcomNumberListType() { + return new TelcomNumberListType(); + } + + /** + * Create an instance of {@link CorporateBodyType } + * + */ + public CorporateBodyType createCorporateBodyType() { + return new CorporateBodyType(); + } + + /** + * Create an instance of {@link PhysicalPersonType.RelatedPerson } + * + */ + public PhysicalPersonType.RelatedPerson createPhysicalPersonTypeRelatedPerson() { + return new PhysicalPersonType.RelatedPerson(); + } + + /** + * Create an instance of {@link PersonNameType.FormattedName } + * + */ + public PersonNameType.FormattedName createPersonNameTypeFormattedName() { + return new PersonNameType.FormattedName(); + } + + /** + * Create an instance of {@link PersonNameType } + * + */ + public PersonNameType createPersonNameType() { + return new PersonNameType(); + } + + /** + * Create an instance of {@link PostalAddressType.DeliveryAddress } + * + */ + public PostalAddressType.DeliveryAddress createPostalAddressTypeDeliveryAddress() { + return new PostalAddressType.DeliveryAddress(); + } + + /** + * Create an instance of {@link PersonNameType.FamilyName } + * + */ + public PersonNameType.FamilyName createPersonNameTypeFamilyName() { + return new PersonNameType.FamilyName(); + } + + /** + * Create an instance of {@link PersonDataType.AdditionalData } + * + */ + public PersonDataType.AdditionalData createPersonDataTypeAdditionalData() { + return new PersonDataType.AdditionalData(); + } + + /** + * Create an instance of {@link PostalAddressType.Recipient } + * + */ + public PostalAddressType.Recipient createPostalAddressTypeRecipient() { + return new PostalAddressType.Recipient(); + } + + /** + * Create an instance of {@link IdentificationType.Value } + * + */ + public IdentificationType.Value createIdentificationTypeValue() { + return new IdentificationType.Value(); + } + + /** + * Create an instance of {@link IdentificationType } + * + */ + public IdentificationType createIdentificationType() { + return new IdentificationType(); + } + + /** + * Create an instance of {@link InternetAddressType } + * + */ + public InternetAddressType createInternetAddressType() { + return new InternetAddressType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "NationalNumber") + public JAXBElement createNationalNumber(String value) { + return new JAXBElement(_NationalNumber_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TypedPostalAddressType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "TypedPostalAddress") + public JAXBElement createTypedPostalAddress(TypedPostalAddressType value) { + return new JAXBElement(_TypedPostalAddress_QNAME, TypedPostalAddressType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Extension") + public JAXBElement createExtension(String value) { + return new JAXBElement(_Extension_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Address") + public JAXBElement createAddress(AbstractAddressType value) { + return new JAXBElement(_Address_QNAME, AbstractAddressType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "PhysicalPerson") + public JAXBElement createPhysicalPerson(PhysicalPersonType value) { + return new JAXBElement(_PhysicalPerson_QNAME, PhysicalPersonType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "InternationalCountryCode") + public JAXBElement createInternationalCountryCode(String value) { + return new JAXBElement(_InternationalCountryCode_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "CorporateBody") + public JAXBElement createCorporateBody(CorporateBodyType value) { + return new JAXBElement(_CorporateBody_QNAME, CorporateBodyType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MobileTelcomNumberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Mobile") + public JAXBElement createMobile(MobileTelcomNumberType value) { + return new JAXBElement(_Mobile_QNAME, MobileTelcomNumberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Person") + public JAXBElement createPerson(AbstractPersonType value) { + return new JAXBElement(_Person_QNAME, AbstractPersonType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "AreaCityCode") + public JAXBElement createAreaCityCode(String value) { + return new JAXBElement(_AreaCityCode_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TelcomNumberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Pager") + public JAXBElement createPager(TelcomNumberType value) { + return new JAXBElement(_Pager_QNAME, TelcomNumberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TelcomNumberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "TTYTDD") + public JAXBElement createTTYTDD(TelcomNumberType value) { + return new JAXBElement(_TTYTDD_QNAME, TelcomNumberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PersonDataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "PersonData") + public JAXBElement createPersonData(PersonDataType value) { + return new JAXBElement(_PersonData_QNAME, PersonDataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "SubscriberNumber") + public JAXBElement createSubscriberNumber(String value) { + return new JAXBElement(_SubscriberNumber_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TelcomNumberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Fax") + public JAXBElement createFax(TelcomNumberType value) { + return new JAXBElement(_Fax_QNAME, TelcomNumberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PersonNameType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "PersonName") + public JAXBElement createPersonName(PersonNameType value) { + return new JAXBElement(_PersonName_QNAME, PersonNameType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TelcomNumberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "Telephone") + public JAXBElement createTelephone(TelcomNumberType value) { + return new JAXBElement(_Telephone_QNAME, TelcomNumberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "PostalAddress") + public JAXBElement createPostalAddress(PostalAddressType value) { + return new JAXBElement(_PostalAddress_QNAME, PostalAddressType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "TelephoneAddress") + public JAXBElement createTelephoneAddress(TelephoneAddressType value) { + return new JAXBElement(_TelephoneAddress_QNAME, TelephoneAddressType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InternetAddressType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "InternetAddress") + public JAXBElement createInternetAddress(InternetAddressType value) { + return new JAXBElement(_InternetAddress_QNAME, InternetAddressType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", name = "FormattedNumber") + public JAXBElement createFormattedNumber(String value) { + return new JAXBElement(_FormattedNumber_QNAME, String.class, null, value); + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonDataType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonDataType.java new file mode 100644 index 00000000..345e03ab --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonDataType.java @@ -0,0 +1,262 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.SignatureType; +import org.w3c.dom.Element; + + +/** + * signed person datastructure. The first Identification elements (from the base type) denote the record as such (e.g. database key for this record) - not to be mistaken for identifiers of the person or of an address (they have their own Identification elements). + * + *

Java class for PersonDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PersonDataType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractPersonType">
+ *       <sequence>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Person"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Address" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AdditionalData" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence maxOccurs="unbounded" minOccurs="0">
+ *                   <any/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PersonDataType", propOrder = { + "person", + "address", + "signature", + "additionalData" +}) +public class PersonDataType + extends AbstractPersonType +{ + + @XmlElement(name = "Person", required = true) + protected AbstractPersonType person; + @XmlElement(name = "Address") + protected List address; + @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected List signature; + @XmlElement(name = "AdditionalData") + protected PersonDataType.AdditionalData additionalData; + + /** + * Gets the value of the person property. + * + * @return + * possible object is + * {@link AbstractPersonType } + * + */ + public AbstractPersonType getPerson() { + return person; + } + + /** + * Sets the value of the person property. + * + * @param value + * allowed object is + * {@link AbstractPersonType } + * + */ + public void setPerson(AbstractPersonType value) { + this.person = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AbstractAddressType } + * + * + */ + public List getAddress() { + if (address == null) { + address = new ArrayList(); + } + return this.address; + } + + /** + * one or more electronic signatures applied on fields above Gets the value of the signature property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signature property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignature().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SignatureType } + * + * + */ + public List getSignature() { + if (signature == null) { + signature = new ArrayList(); + } + return this.signature; + } + + /** + * Gets the value of the additionalData property. + * + * @return + * possible object is + * {@link PersonDataType.AdditionalData } + * + */ + public PersonDataType.AdditionalData getAdditionalData() { + return additionalData; + } + + /** + * Sets the value of the additionalData property. + * + * @param value + * allowed object is + * {@link PersonDataType.AdditionalData } + * + */ + public void setAdditionalData(PersonDataType.AdditionalData value) { + this.additionalData = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence maxOccurs="unbounded" minOccurs="0">
+     *         <any/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class AdditionalData { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getContent().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link String } + * {@link Element } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonNameType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonNameType.java new file mode 100644 index 00000000..5534897c --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PersonNameType.java @@ -0,0 +1,636 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for PersonNameType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PersonNameType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FormattedName" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="type" default="presentation">
+ *                   <simpleType>
+ *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                       <enumeration value="presentation"/>
+ *                       <enumeration value="legal"/>
+ *                       <enumeration value="sortOrder"/>
+ *                     </restriction>
+ *                   </simpleType>
+ *                 </attribute>
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="LegalName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="GivenName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="PreferredGivenName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="MiddleName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="FamilyName" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="primary" default="undefined">
+ *                   <simpleType>
+ *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                       <enumeration value="true"/>
+ *                       <enumeration value="false"/>
+ *                       <enumeration value="undefined"/>
+ *                     </restriction>
+ *                   </simpleType>
+ *                 </attribute>
+ *                 <attribute name="prefix" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="Affix" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="type" use="required">
+ *                   <simpleType>
+ *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                       <enumeration value="academicGrade"/>
+ *                       <enumeration value="aristocraticPrefix"/>
+ *                       <enumeration value="aristocraticTitle"/>
+ *                       <enumeration value="familyNamePrefix"/>
+ *                       <enumeration value="familyNameSuffix"/>
+ *                       <enumeration value="formOfAddress"/>
+ *                       <enumeration value="generation"/>
+ *                       <enumeration value="qualification"/>
+ *                     </restriction>
+ *                   </simpleType>
+ *                 </attribute>
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PersonNameType", propOrder = { + "formattedName", + "legalName", + "givenName", + "preferredGivenName", + "middleName", + "familyName", + "affix" +}) +@XmlSeeAlso({ + at.gv.e_government.reference.namespace.persondata._20020228_.PhysicalPersonType.AlternativeName.class +}) +public class PersonNameType { + + @XmlElement(name = "FormattedName") + protected List formattedName; + @XmlElement(name = "LegalName") + protected String legalName; + @XmlElement(name = "GivenName") + protected List givenName; + @XmlElement(name = "PreferredGivenName") + protected String preferredGivenName; + @XmlElement(name = "MiddleName") + protected String middleName; + @XmlElement(name = "FamilyName") + protected List familyName; + @XmlElement(name = "Affix") + protected List affix; + + /** + * Gets the value of the formattedName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the formattedName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFormattedName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PersonNameType.FormattedName } + * + * + */ + public List getFormattedName() { + if (formattedName == null) { + formattedName = new ArrayList(); + } + return this.formattedName; + } + + /** + * Gets the value of the legalName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLegalName() { + return legalName; + } + + /** + * Sets the value of the legalName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLegalName(String value) { + this.legalName = value; + } + + /** + * Gets the value of the givenName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the givenName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getGivenName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getGivenName() { + if (givenName == null) { + givenName = new ArrayList(); + } + return this.givenName; + } + + /** + * Gets the value of the preferredGivenName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPreferredGivenName() { + return preferredGivenName; + } + + /** + * Sets the value of the preferredGivenName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPreferredGivenName(String value) { + this.preferredGivenName = value; + } + + /** + * Gets the value of the middleName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMiddleName() { + return middleName; + } + + /** + * Sets the value of the middleName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMiddleName(String value) { + this.middleName = value; + } + + /** + * Gets the value of the familyName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the familyName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFamilyName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PersonNameType.FamilyName } + * + * + */ + public List getFamilyName() { + if (familyName == null) { + familyName = new ArrayList(); + } + return this.familyName; + } + + /** + * Gets the value of the affix property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the affix property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAffix().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PersonNameType.Affix } + * + * + */ + public List getAffix() { + if (affix == null) { + affix = new ArrayList(); + } + return this.affix; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="type" use="required">
+     *         <simpleType>
+     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             <enumeration value="academicGrade"/>
+     *             <enumeration value="aristocraticPrefix"/>
+     *             <enumeration value="aristocraticTitle"/>
+     *             <enumeration value="familyNamePrefix"/>
+     *             <enumeration value="familyNameSuffix"/>
+     *             <enumeration value="formOfAddress"/>
+     *             <enumeration value="generation"/>
+     *             <enumeration value="qualification"/>
+     *           </restriction>
+     *         </simpleType>
+     *       </attribute>
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Affix { + + @XmlValue + protected String value; + @XmlAttribute(required = true) + protected String type; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="primary" default="undefined">
+     *         <simpleType>
+     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             <enumeration value="true"/>
+     *             <enumeration value="false"/>
+     *             <enumeration value="undefined"/>
+     *           </restriction>
+     *         </simpleType>
+     *       </attribute>
+     *       <attribute name="prefix" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class FamilyName { + + @XmlValue + protected String value; + @XmlAttribute + protected String primary; + @XmlAttribute + protected String prefix; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the primary property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrimary() { + if (primary == null) { + return "undefined"; + } else { + return primary; + } + } + + /** + * Sets the value of the primary property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrimary(String value) { + this.primary = value; + } + + /** + * Gets the value of the prefix property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrefix() { + return prefix; + } + + /** + * Sets the value of the prefix property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrefix(String value) { + this.prefix = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="type" default="presentation">
+     *         <simpleType>
+     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             <enumeration value="presentation"/>
+     *             <enumeration value="legal"/>
+     *             <enumeration value="sortOrder"/>
+     *           </restriction>
+     *         </simpleType>
+     *       </attribute>
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class FormattedName { + + @XmlValue + protected String value; + @XmlAttribute + protected String type; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + if (type == null) { + return "presentation"; + } else { + return type; + } + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PhysicalPersonType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PhysicalPersonType.java new file mode 100644 index 00000000..e3b31fd2 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PhysicalPersonType.java @@ -0,0 +1,565 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + * physical person + * + *

Java class for PhysicalPersonType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PhysicalPersonType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractPersonType">
+ *       <sequence minOccurs="0">
+ *         <element name="Name" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}PersonNameType" minOccurs="0"/>
+ *         <element name="AlternativeName" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}PersonNameType">
+ *                 <attribute name="Type" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AlternativeNameTypeType" />
+ *               </extension>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="MaritalStatus" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}MaritalStatusType" minOccurs="0"/>
+ *         <element name="Sex" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}SexType" minOccurs="0"/>
+ *         <element name="DateOfBirth" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}DateOfBirthType" minOccurs="0"/>
+ *         <element name="PlaceOfBirth" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
+ *         <element name="CountryOfBirth" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
+ *         <element name="Nationality" type="{http://www.w3.org/2001/XMLSchema}token" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Confession" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
+ *         <element name="relatedPerson" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="TypeOfRelation" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}RelationType" maxOccurs="unbounded"/>
+ *                   <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Person"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <any/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PhysicalPersonType", propOrder = { + "name", + "alternativeName", + "maritalStatus", + "sex", + "dateOfBirth", + "placeOfBirth", + "countryOfBirth", + "nationality", + "confession", + "relatedPerson", + "any" +}) +public class PhysicalPersonType + extends AbstractPersonType +{ + + @XmlElement(name = "Name") + protected PersonNameType name; + @XmlElement(name = "AlternativeName") + protected List alternativeName; + @XmlElement(name = "MaritalStatus") + protected MaritalStatusType maritalStatus; + @XmlElement(name = "Sex") + protected SexType sex; + @XmlElement(name = "DateOfBirth") + protected String dateOfBirth; + @XmlElement(name = "PlaceOfBirth") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String placeOfBirth; + @XmlElement(name = "CountryOfBirth") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String countryOfBirth; + @XmlElement(name = "Nationality") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected List nationality; + @XmlElement(name = "Confession") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlSchemaType(name = "token") + protected String confession; + protected List relatedPerson; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link PersonNameType } + * + */ + public PersonNameType getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link PersonNameType } + * + */ + public void setName(PersonNameType value) { + this.name = value; + } + + /** + * Gets the value of the alternativeName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the alternativeName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAlternativeName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PhysicalPersonType.AlternativeName } + * + * + */ + public List getAlternativeName() { + if (alternativeName == null) { + alternativeName = new ArrayList(); + } + return this.alternativeName; + } + + /** + * Gets the value of the maritalStatus property. + * + * @return + * possible object is + * {@link MaritalStatusType } + * + */ + public MaritalStatusType getMaritalStatus() { + return maritalStatus; + } + + /** + * Sets the value of the maritalStatus property. + * + * @param value + * allowed object is + * {@link MaritalStatusType } + * + */ + public void setMaritalStatus(MaritalStatusType value) { + this.maritalStatus = value; + } + + /** + * Gets the value of the sex property. + * + * @return + * possible object is + * {@link SexType } + * + */ + public SexType getSex() { + return sex; + } + + /** + * Sets the value of the sex property. + * + * @param value + * allowed object is + * {@link SexType } + * + */ + public void setSex(SexType value) { + this.sex = value; + } + + /** + * Gets the value of the dateOfBirth property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDateOfBirth() { + return dateOfBirth; + } + + /** + * Sets the value of the dateOfBirth property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDateOfBirth(String value) { + this.dateOfBirth = value; + } + + /** + * Gets the value of the placeOfBirth property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPlaceOfBirth() { + return placeOfBirth; + } + + /** + * Sets the value of the placeOfBirth property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPlaceOfBirth(String value) { + this.placeOfBirth = value; + } + + /** + * Gets the value of the countryOfBirth property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCountryOfBirth() { + return countryOfBirth; + } + + /** + * Sets the value of the countryOfBirth property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCountryOfBirth(String value) { + this.countryOfBirth = value; + } + + /** + * Gets the value of the nationality property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the nationality property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getNationality().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getNationality() { + if (nationality == null) { + nationality = new ArrayList(); + } + return this.nationality; + } + + /** + * Gets the value of the confession property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getConfession() { + return confession; + } + + /** + * Sets the value of the confession property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setConfession(String value) { + this.confession = value; + } + + /** + * Gets the value of the relatedPerson property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the relatedPerson property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRelatedPerson().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PhysicalPersonType.RelatedPerson } + * + * + */ + public List getRelatedPerson() { + if (relatedPerson == null) { + relatedPerson = new ArrayList(); + } + return this.relatedPerson; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link Element } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}PersonNameType">
+     *       <attribute name="Type" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AlternativeNameTypeType" />
+     *     </extension>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class AlternativeName + extends PersonNameType + { + + @XmlAttribute(name = "Type") + protected String type; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="TypeOfRelation" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}RelationType" maxOccurs="unbounded"/>
+     *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Person"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "typeOfRelation", + "person" + }) + public static class RelatedPerson { + + @XmlElement(name = "TypeOfRelation", required = true) + protected List typeOfRelation; + @XmlElement(name = "Person", required = true) + protected AbstractPersonType person; + + /** + * Gets the value of the typeOfRelation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the typeOfRelation property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getTypeOfRelation().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getTypeOfRelation() { + if (typeOfRelation == null) { + typeOfRelation = new ArrayList(); + } + return this.typeOfRelation; + } + + /** + * Gets the value of the person property. + * + * @return + * possible object is + * {@link AbstractPersonType } + * + */ + public AbstractPersonType getPerson() { + return person; + } + + /** + * Sets the value of the person property. + * + * @param value + * allowed object is + * {@link AbstractPersonType } + * + */ + public void setPerson(AbstractPersonType value) { + this.person = value; + } + + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PostalAddressType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PostalAddressType.java new file mode 100644 index 00000000..bdda75c2 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/PostalAddressType.java @@ -0,0 +1,627 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for PostalAddressType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PostalAddressType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CountryCode" minOccurs="0">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <pattern value="[A-Z]{2}"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="PostalCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Region" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Municipality" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="DeliveryAddress" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="AddressLine" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *                   <element name="StreetName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   <element name="BuildingNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   <element name="Unit" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   <element name="PostOfficeBox" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="Recipient" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="PersonName" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}PersonNameType" minOccurs="0"/>
+ *                   <element name="AdditionalText" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *                   <element name="Organization" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   <element name="OrganizationName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="type" default="undefined">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="postOfficeBoxAddress"/>
+ *             <enumeration value="streetAddress"/>
+ *             <enumeration value="militaryAddress"/>
+ *             <enumeration value="undefined"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PostalAddressType", propOrder = { + "countryCode", + "postalCode", + "region", + "municipality", + "deliveryAddress", + "recipient" +}) +public class PostalAddressType { + + @XmlElement(name = "CountryCode") + protected String countryCode; + @XmlElement(name = "PostalCode") + protected String postalCode; + @XmlElement(name = "Region") + protected List region; + @XmlElement(name = "Municipality") + protected String municipality; + @XmlElement(name = "DeliveryAddress") + protected PostalAddressType.DeliveryAddress deliveryAddress; + @XmlElement(name = "Recipient") + protected List recipient; + @XmlAttribute + protected String type; + + /** + * Gets the value of the countryCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCountryCode() { + return countryCode; + } + + /** + * Sets the value of the countryCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCountryCode(String value) { + this.countryCode = value; + } + + /** + * Gets the value of the postalCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPostalCode() { + return postalCode; + } + + /** + * Sets the value of the postalCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPostalCode(String value) { + this.postalCode = value; + } + + /** + * Gets the value of the region property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the region property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRegion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getRegion() { + if (region == null) { + region = new ArrayList(); + } + return this.region; + } + + /** + * Gets the value of the municipality property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMunicipality() { + return municipality; + } + + /** + * Sets the value of the municipality property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMunicipality(String value) { + this.municipality = value; + } + + /** + * Gets the value of the deliveryAddress property. + * + * @return + * possible object is + * {@link PostalAddressType.DeliveryAddress } + * + */ + public PostalAddressType.DeliveryAddress getDeliveryAddress() { + return deliveryAddress; + } + + /** + * Sets the value of the deliveryAddress property. + * + * @param value + * allowed object is + * {@link PostalAddressType.DeliveryAddress } + * + */ + public void setDeliveryAddress(PostalAddressType.DeliveryAddress value) { + this.deliveryAddress = value; + } + + /** + * Gets the value of the recipient property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the recipient property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRecipient().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PostalAddressType.Recipient } + * + * + */ + public List getRecipient() { + if (recipient == null) { + recipient = new ArrayList(); + } + return this.recipient; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + if (type == null) { + return "undefined"; + } else { + return type; + } + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="AddressLine" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+     *         <element name="StreetName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         <element name="BuildingNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         <element name="Unit" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         <element name="PostOfficeBox" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "addressLine", + "streetName", + "buildingNumber", + "unit", + "postOfficeBox" + }) + public static class DeliveryAddress { + + @XmlElement(name = "AddressLine") + protected List addressLine; + @XmlElement(name = "StreetName") + protected String streetName; + @XmlElement(name = "BuildingNumber") + protected String buildingNumber; + @XmlElement(name = "Unit") + protected String unit; + @XmlElement(name = "PostOfficeBox") + protected String postOfficeBox; + + /** + * Gets the value of the addressLine property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the addressLine property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getAddressLine().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAddressLine() { + if (addressLine == null) { + addressLine = new ArrayList(); + } + return this.addressLine; + } + + /** + * Gets the value of the streetName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStreetName() { + return streetName; + } + + /** + * Sets the value of the streetName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStreetName(String value) { + this.streetName = value; + } + + /** + * Gets the value of the buildingNumber property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBuildingNumber() { + return buildingNumber; + } + + /** + * Sets the value of the buildingNumber property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBuildingNumber(String value) { + this.buildingNumber = value; + } + + /** + * Gets the value of the unit property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUnit() { + return unit; + } + + /** + * Sets the value of the unit property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUnit(String value) { + this.unit = value; + } + + /** + * Gets the value of the postOfficeBox property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPostOfficeBox() { + return postOfficeBox; + } + + /** + * Sets the value of the postOfficeBox property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPostOfficeBox(String value) { + this.postOfficeBox = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="PersonName" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}PersonNameType" minOccurs="0"/>
+     *         <element name="AdditionalText" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+     *         <element name="Organization" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         <element name="OrganizationName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "personName", + "additionalText", + "organization", + "organizationName" + }) + public static class Recipient { + + @XmlElement(name = "PersonName") + protected PersonNameType personName; + @XmlElement(name = "AdditionalText") + protected List additionalText; + @XmlElement(name = "Organization") + protected String organization; + @XmlElement(name = "OrganizationName") + protected String organizationName; + + /** + * Gets the value of the personName property. + * + * @return + * possible object is + * {@link PersonNameType } + * + */ + public PersonNameType getPersonName() { + return personName; + } + + /** + * Sets the value of the personName property. + * + * @param value + * allowed object is + * {@link PersonNameType } + * + */ + public void setPersonName(PersonNameType value) { + this.personName = value; + } + + /** + * Gets the value of the additionalText property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the additionalText property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getAdditionalText().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAdditionalText() { + if (additionalText == null) { + additionalText = new ArrayList(); + } + return this.additionalText; + } + + /** + * Gets the value of the organization property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOrganization() { + return organization; + } + + /** + * Sets the value of the organization property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOrganization(String value) { + this.organization = value; + } + + /** + * Gets the value of the organizationName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOrganizationName() { + return organizationName; + } + + /** + * Sets the value of the organizationName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOrganizationName(String value) { + this.organizationName = value; + } + + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/SexType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/SexType.java new file mode 100644 index 00000000..c6231233 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/SexType.java @@ -0,0 +1,77 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SexType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="SexType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
+ *     <enumeration value="male"/>
+ *     <enumeration value="female"/>
+ *     <enumeration value="unknown"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "SexType") +@XmlEnum +public enum SexType { + + @XmlEnumValue("male") + MALE("male"), + @XmlEnumValue("female") + FEMALE("female"), + @XmlEnumValue("unknown") + UNKNOWN("unknown"); + private final String value; + + SexType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static SexType fromValue(String v) { + for (SexType c: SexType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberListType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberListType.java new file mode 100644 index 00000000..6a2cc863 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberListType.java @@ -0,0 +1,197 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TelcomNumberListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TelcomNumberListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Telephone" minOccurs="0"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Mobile" minOccurs="0"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Fax" minOccurs="0"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}Pager" minOccurs="0"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}TTYTDD" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TelcomNumberListType", propOrder = { + "telephone", + "mobile", + "fax", + "pager", + "ttytdd" +}) +public class TelcomNumberListType { + + @XmlElement(name = "Telephone") + protected TelcomNumberType telephone; + @XmlElement(name = "Mobile") + protected MobileTelcomNumberType mobile; + @XmlElement(name = "Fax") + protected TelcomNumberType fax; + @XmlElement(name = "Pager") + protected TelcomNumberType pager; + @XmlElement(name = "TTYTDD") + protected TelcomNumberType ttytdd; + + /** + * Gets the value of the telephone property. + * + * @return + * possible object is + * {@link TelcomNumberType } + * + */ + public TelcomNumberType getTelephone() { + return telephone; + } + + /** + * Sets the value of the telephone property. + * + * @param value + * allowed object is + * {@link TelcomNumberType } + * + */ + public void setTelephone(TelcomNumberType value) { + this.telephone = value; + } + + /** + * Gets the value of the mobile property. + * + * @return + * possible object is + * {@link MobileTelcomNumberType } + * + */ + public MobileTelcomNumberType getMobile() { + return mobile; + } + + /** + * Sets the value of the mobile property. + * + * @param value + * allowed object is + * {@link MobileTelcomNumberType } + * + */ + public void setMobile(MobileTelcomNumberType value) { + this.mobile = value; + } + + /** + * Gets the value of the fax property. + * + * @return + * possible object is + * {@link TelcomNumberType } + * + */ + public TelcomNumberType getFax() { + return fax; + } + + /** + * Sets the value of the fax property. + * + * @param value + * allowed object is + * {@link TelcomNumberType } + * + */ + public void setFax(TelcomNumberType value) { + this.fax = value; + } + + /** + * Gets the value of the pager property. + * + * @return + * possible object is + * {@link TelcomNumberType } + * + */ + public TelcomNumberType getPager() { + return pager; + } + + /** + * Sets the value of the pager property. + * + * @param value + * allowed object is + * {@link TelcomNumberType } + * + */ + public void setPager(TelcomNumberType value) { + this.pager = value; + } + + /** + * Gets the value of the ttytdd property. + * + * @return + * possible object is + * {@link TelcomNumberType } + * + */ + public TelcomNumberType getTTYTDD() { + return ttytdd; + } + + /** + * Sets the value of the ttytdd property. + * + * @param value + * allowed object is + * {@link TelcomNumberType } + * + */ + public void setTTYTDD(TelcomNumberType value) { + this.ttytdd = value; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberType.java new file mode 100644 index 00000000..8b4aa3aa --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelcomNumberType.java @@ -0,0 +1,225 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TelcomNumberType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TelcomNumberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}FormattedNumber"/>
+ *         <group ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}TelcomNumberGroup"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TelcomNumberType", propOrder = { + "formattedNumber", + "internationalCountryCode", + "nationalNumber", + "areaCityCode", + "subscriberNumber", + "extension" +}) +@XmlSeeAlso({ + MobileTelcomNumberType.class +}) +public class TelcomNumberType { + + @XmlElement(name = "FormattedNumber") + protected String formattedNumber; + @XmlElement(name = "InternationalCountryCode") + protected String internationalCountryCode; + @XmlElement(name = "NationalNumber") + protected String nationalNumber; + @XmlElement(name = "AreaCityCode") + protected String areaCityCode; + @XmlElement(name = "SubscriberNumber") + protected String subscriberNumber; + @XmlElement(name = "Extension") + protected String extension; + + /** + * Gets the value of the formattedNumber property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormattedNumber() { + return formattedNumber; + } + + /** + * Sets the value of the formattedNumber property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormattedNumber(String value) { + this.formattedNumber = value; + } + + /** + * Gets the value of the internationalCountryCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInternationalCountryCode() { + return internationalCountryCode; + } + + /** + * Sets the value of the internationalCountryCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInternationalCountryCode(String value) { + this.internationalCountryCode = value; + } + + /** + * Gets the value of the nationalNumber property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNationalNumber() { + return nationalNumber; + } + + /** + * Sets the value of the nationalNumber property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNationalNumber(String value) { + this.nationalNumber = value; + } + + /** + * Gets the value of the areaCityCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAreaCityCode() { + return areaCityCode; + } + + /** + * Sets the value of the areaCityCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAreaCityCode(String value) { + this.areaCityCode = value; + } + + /** + * Gets the value of the subscriberNumber property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSubscriberNumber() { + return subscriberNumber; + } + + /** + * Sets the value of the subscriberNumber property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSubscriberNumber(String value) { + this.subscriberNumber = value; + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setExtension(String value) { + this.extension = value; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelephoneAddressType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelephoneAddressType.java new file mode 100644 index 00000000..9facdf9a --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TelephoneAddressType.java @@ -0,0 +1,162 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + * phone numbers + * + *

Java class for TelephoneAddressType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TelephoneAddressType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractAddressType">
+ *       <sequence minOccurs="0">
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Number" type="{http://reference.e-government.gv.at/namespace/persondata/20020228#}TelcomNumberType"/>
+ *         <any/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TelephoneAddressType", propOrder = { + "type", + "number", + "any" +}) +public class TelephoneAddressType + extends AbstractAddressType +{ + + @XmlElement(name = "Type") + @XmlSchemaType(name = "anyURI") + protected List type; + @XmlElement(name = "Number") + protected TelcomNumberType number; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the type property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the type property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getType().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getType() { + if (type == null) { + type = new ArrayList(); + } + return this.type; + } + + /** + * Gets the value of the number property. + * + * @return + * possible object is + * {@link TelcomNumberType } + * + */ + public TelcomNumberType getNumber() { + return number; + } + + /** + * Sets the value of the number property. + * + * @param value + * allowed object is + * {@link TelcomNumberType } + * + */ + public void setNumber(TelcomNumberType value) { + this.number = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link Element } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TypedPostalAddressType.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TypedPostalAddressType.java new file mode 100644 index 00000000..3184b3e7 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/TypedPostalAddressType.java @@ -0,0 +1,157 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + + +package at.gv.e_government.reference.namespace.persondata._20020228_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + * postal address + * + *

Java class for TypedPostalAddressType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TypedPostalAddressType">
+ *   <complexContent>
+ *     <extension base="{http://reference.e-government.gv.at/namespace/persondata/20020228#}AbstractAddressType">
+ *       <sequence minOccurs="0">
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *         <element ref="{http://reference.e-government.gv.at/namespace/persondata/20020228#}PostalAddress"/>
+ *         <any/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TypedPostalAddressType", propOrder = { + "type", + "postalAddress", + "any" +}) +public class TypedPostalAddressType + extends AbstractAddressType +{ + + @XmlElement(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + @XmlElement(name = "PostalAddress") + protected PostalAddressType postalAddress; + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the postalAddress property. + * + * @return + * possible object is + * {@link PostalAddressType } + * + */ + public PostalAddressType getPostalAddress() { + return postalAddress; + } + + /** + * Sets the value of the postalAddress property. + * + * @param value + * allowed object is + * {@link PostalAddressType } + * + */ + public void setPostalAddress(PostalAddressType value) { + this.postalAddress = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link Element } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/package-info.java b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/package-info.java new file mode 100644 index 00000000..f95c7b54 --- /dev/null +++ b/utils/src/main/java/at/gv/e_government/reference/namespace/persondata/_20020228_/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:43:54 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package at.gv.e_government.reference.namespace.persondata._20020228_; diff --git a/utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java b/utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java new file mode 100644 index 00000000..5e191c79 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java @@ -0,0 +1,23 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.ui; + +public interface BKUControllerInterface { + + public void shutDown(); + +} diff --git a/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java b/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java new file mode 100644 index 00000000..5aa74d99 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java @@ -0,0 +1,202 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.ui; + +import java.awt.AWTException; +import java.awt.Image; +import java.awt.MenuItem; +import java.awt.PopupMenu; +import java.awt.SystemTray; +import java.awt.TrayIcon; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.IOException; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.util.ResourceBundle; + +import javax.imageio.ImageIO; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class TrayIconDialog implements TrayIconDialogInterface { + + private static Log log = LogFactory.getLog(TrayIconDialog.class); + private static TrayIconDialogInterface instance; + private boolean isSupported; + private BKUControllerInterface shutDown; + private TrayIcon trayIcon = null; + private ResourceBundle resourceBundle = null; + + private TrayIconDialog() { + } + + private void displayTrayMsg(String captionID, String messageID, + TrayIcon.MessageType type) { + if ((isSupported) && (resourceBundle != null)) { + try { + trayIcon.displayMessage(resourceBundle.getString(captionID), + resourceBundle.getString(messageID), type); + } catch (Exception ex) { + log.error(ex); + } + } + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayInfo(java.lang.String + * , java.lang.String) + */ + public void displayInfo(String captionID, String messageID) { + displayTrayMsg(captionID, messageID, TrayIcon.MessageType.INFO); + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayWarning(java.lang + * .String, java.lang.String) + */ + public void displayWarning(String captionID, String messageID) { + displayTrayMsg(captionID, messageID, TrayIcon.MessageType.WARNING); + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayError(java.lang. + * String, java.lang.String) + */ + public void displayError(String captionID, String messageID) { + displayTrayMsg(captionID, messageID, TrayIcon.MessageType.ERROR); + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#init(java.util.ResourceBundle + * ) + */ + public void init(ResourceBundle resourceBundel) { + this.resourceBundle = resourceBundel; + isSupported = SystemTray.isSupported(); + log.info("Trayicon supported: " + isSupported); + try { + if (isSupported) { + SystemTray tray = SystemTray.getSystemTray(); + Image image = ImageIO.read(getClass().getClassLoader() + .getResourceAsStream("at/gv/egiz/bku/local/ui/chipperling.png")); + PopupMenu popup = new PopupMenu(); + MenuItem exitItem = new MenuItem(resourceBundel + .getString("TrayMenu.Shutdown")); + popup.add(exitItem); + exitItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + log.info("Calling Shutdown"); + if (shutDown != null) { + shutDown.shutDown(); + } + } + }); + + trayIcon = new TrayIcon(image, "BKULogo", popup); + trayIcon.setImageAutoSize(true); + trayIcon.setToolTip(resourceBundel.getString("TrayMenu.Tooltip")); + try { + tray.add(trayIcon); + } catch (AWTException e) { + log.error("TrayIcon could not be added.", e); + isSupported = false; + } + } + } catch (IOException e) { + log.error(e); + } + } + + /* + * (non-Javadoc) + * + * @see + * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#setShutdownHook(at.gv.egiz + * .bku.local.ui.BKUControllerInterface) + */ + public void setShutdownHook(BKUControllerInterface shutDown) { + this.shutDown = shutDown; + } + + @SuppressWarnings("unchecked") + public synchronized static TrayIconDialogInterface getInstance() { + ClassLoader cl = TrayIconDialog.class.getClassLoader(); + if (instance == null) { + if (cl.toString().startsWith("sun.")) { + instance = new TrayIconDialog(); + return instance; + } + ClassLoader parent = cl; + while (!parent.toString().startsWith("sun.")) { + parent = parent.getParent(); + } + try { + Class otherClassInstance = (Class) parent + .loadClass(TrayIconDialog.class.getName()); + Method getInstanceMethod = otherClassInstance.getDeclaredMethod( + "getInstance", new Class[] {}); + Object otherSingleton = getInstanceMethod.invoke(null, new Object[] {}); + instance = (TrayIconDialogInterface) Proxy.newProxyInstance(cl, + new Class[] { TrayIconDialogInterface.class }, + new PassThroughProxyHandler(otherSingleton)); + } catch (ClassNotFoundException ce) { + instance = new TrayIconDialog(); + } catch (Exception e) { + log.error(e); + instance = new TrayIconDialog(); + } + return instance; + } + return instance; + } + + /** + * + * Only works for public methods + * + */ + static class PassThroughProxyHandler implements InvocationHandler { + private final Object delegate; + + public PassThroughProxyHandler(Object delegate) { + this.delegate = delegate; + } + + public Object invoke(Object proxy, Method method, Object[] args) + throws Throwable { + Method delegateMethod = delegate.getClass().getMethod(method.getName(), + method.getParameterTypes()); + return delegateMethod.invoke(delegate, args); + } + } + +} diff --git a/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java b/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java new file mode 100644 index 00000000..87c64102 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java @@ -0,0 +1,33 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.local.ui; + +import java.util.ResourceBundle; + +public interface TrayIconDialogInterface { + + public abstract void displayInfo(String captionID, String messageID); + + public abstract void displayWarning(String captionID, String messageID); + + public abstract void displayError(String captionID, String messageID); + + public abstract void init(ResourceBundle resourceBundel); + + public abstract void setShutdownHook(BKUControllerInterface shutDown); + +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/HexDump.java b/utils/src/main/java/at/gv/egiz/bku/utils/HexDump.java new file mode 100644 index 00000000..88d49bad --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/HexDump.java @@ -0,0 +1,75 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.io.Writer; + +public class HexDump { + + public static String hexDump(InputStream is) throws IOException { + StringWriter writer = new StringWriter(); + hexDump(is, writer); + return writer.toString(); + } + + public static void hexDump(InputStream is, Writer writer) throws IOException { + hexDump(is, writer, 16); + } + + public static void hexDump(InputStream is, Writer writer, int chunkSize) throws IOException { + + byte[] chunk = new byte[chunkSize]; + long adr = 0; + for (int l; (l = is.read(chunk)) != -1;) { + + writer.append(String.format("[%06x]", adr)); + for (int i = 0; i < l; i++) { + if (i % 8 == 0) { + writer.append(" "); + } else { + writer.append(":"); + } + writer.append(Integer.toHexString((chunk[i] & 240) >> 4)); + writer.append(Integer.toHexString(chunk[i] & 15)); + } + + for (int i = 0; i < (chunkSize - l); i++) { + writer.append(" "); + } + + for (int i = 0; i < l; i++) { + if (i % 8 == 0) { + writer.append(" "); + } + if (chunk[i] > 31 && chunk[i] < 127) { + writer.append((char) chunk[i]); + } else { + writer.append("."); + } + } + + writer.append("\n"); + adr += l; + + } + + } + +} diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/StreamUtil.java b/utils/src/main/java/at/gv/egiz/bku/utils/StreamUtil.java new file mode 100644 index 00000000..a774df2b --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/StreamUtil.java @@ -0,0 +1,101 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; + +public class StreamUtil { + + /** + * Copies data. None of the streams will be closed. + * + * @param is + * @param os + * @throws IOException + */ + public static void copyStream(InputStream is, OutputStream os) + throws IOException { + copyStream(is, os, 1024); + } + + /** + * Copies data. None of the streams will be closed. + * + * @param is + * @param os + * @throws IOException + */ + public static void copyStream(InputStream is, OutputStream os, int bufferSize) + throws IOException { + byte[] buffer = new byte[bufferSize]; + copyStream(is, os, buffer); + } + + /** + * Copies data. None of the streams will be closed. + * + * @param is + * @param os + * @throws IOException + */ + public static void copyStream(InputStream is, OutputStream os, byte[] buffer) + throws IOException { + for (int i = is.read(buffer); i > -1; i = is.read(buffer)) { + os.write(buffer, 0, i); + } + } + + /** + * Copies data. None of the streams will be closed. + * + * @param is + * @param os + * @throws IOException + */ + public static void copyStream(Reader is, Writer os) + throws IOException { + copyStream(is, os, 1024); + } + + /** + * Copies data. None of the streams will be closed. + * + * @param is + * @param os + * @throws IOException + */ + public static void copyStream(Reader is, Writer os, int bufferSize) + throws IOException { + char[] chars = new char[bufferSize]; + for (int i = is.read(chars); i > -1; i = is.read(chars)) { + os.write(chars, 0, i); + } + } + + + public static String asString(InputStream is, String charset) + throws IOException { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + copyStream(is, os); + return new String(os.toByteArray(), charset); + } +} diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/binding/Protocol.java b/utils/src/main/java/at/gv/egiz/bku/utils/binding/Protocol.java new file mode 100644 index 00000000..f0504697 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/binding/Protocol.java @@ -0,0 +1,41 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.binding; + +public enum Protocol { + HTTP("http"), HTTPS("https"); + + private String name; + + Protocol(String s) { + name = s; + } + + public String toString() { + return name; + } + + public static Protocol fromString(String protocol) { + if (HTTP.toString().equalsIgnoreCase(protocol)) { + return HTTP; + } + if (HTTPS.toString().equalsIgnoreCase(protocol)) { + return HTTPS; + } + return null; + } +} diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/FormDataURLSupplier.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/FormDataURLSupplier.java new file mode 100644 index 00000000..7272f1bb --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/FormDataURLSupplier.java @@ -0,0 +1,26 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +import java.io.InputStream; + +public interface FormDataURLSupplier { + public static final String PROPERTY_KEY_NAME = "at.gv.egiz.bku.util.urldereferencer.FormDataURLSupplier"; + + public InputStream getFormData(String aParameterName); + public String getFormDataContentType(String aParameterName); +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/HTTPURLProtocolHandlerImpl.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/HTTPURLProtocolHandlerImpl.java new file mode 100644 index 00000000..5cba2e1d --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/HTTPURLProtocolHandlerImpl.java @@ -0,0 +1,76 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.security.InvalidParameterException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class HTTPURLProtocolHandlerImpl implements URLProtocolHandler { + + private static Log log = LogFactory.getLog(HTTPURLProtocolHandlerImpl.class); + + public final static String HTTP = "http"; + public final static String HTTPS = "https"; + public final static String FORMDATA = "formdata"; + public final static String[] PROTOCOLS = { HTTP, HTTPS, FORMDATA }; + + public StreamData dereference(String aUrl, URLDereferencerContext aContext) + throws IOException { + String urlString = aUrl.toLowerCase().trim(); + if (urlString.startsWith(FORMDATA)) { + log.debug("Requested to dereference a formdata url"); + return dereferenceFormData(aUrl, aContext); + } + + URL url = new URL(aUrl); + if ((!HTTP.equalsIgnoreCase(url.getProtocol()) && (!HTTPS + .equalsIgnoreCase(url.getProtocol())))) { + throw new InvalidParameterException("Url " + aUrl + " not supported"); + } + return dereferenceHTTP(url); + } + + protected StreamData dereferenceHTTP(URL url) throws IOException { + HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); + return new StreamData(url.toString(), httpConn.getContentType(), httpConn + .getInputStream()); + } + + protected StreamData dereferenceFormData(String aUrl, + URLDereferencerContext aContext) throws IOException { + log.debug("Dereferencing formdata url: " + aUrl); + String[] parts = aUrl.split(":", 2); + FormDataURLSupplier supplier = (FormDataURLSupplier) aContext + .getProperty(FormDataURLSupplier.PROPERTY_KEY_NAME); + if (supplier == null) { + throw new NullPointerException( + "No FormdataUrlSupplier found in provided context"); + } + String contentType = supplier.getFormDataContentType(parts[1]); + InputStream is = supplier.getFormData(parts[1]); + if (is != null) { + return new StreamData(aUrl, contentType, is); + } + return null; + } +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/SimpleFormDataContextImpl.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/SimpleFormDataContextImpl.java new file mode 100644 index 00000000..e9da9c81 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/SimpleFormDataContextImpl.java @@ -0,0 +1,41 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +public class SimpleFormDataContextImpl implements URLDereferencerContext { + protected FormDataURLSupplier formdata; + + /** + * + * @param formdata must not be null + */ + public SimpleFormDataContextImpl(FormDataURLSupplier formdata) { + if (formdata == null) { + throw new NullPointerException("FormdataURLSupplier must not be null"); + } + this.formdata = formdata; + } + + @Override + public Object getProperty(Object key) { + if (key.equals(FormDataURLSupplier.PROPERTY_KEY_NAME)) { + return formdata; + } + return null; + } + +} diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/StreamData.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/StreamData.java new file mode 100644 index 00000000..541c6878 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/StreamData.java @@ -0,0 +1,61 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +import java.io.InputStream; + +/** + * This class models the result when dereferencing an URL. + * + */ +public class StreamData { + + protected InputStream inputStream; + protected String url; + protected String contentType; + + /** + * + * @param url + * @param contentType + * @param stream must not be null + */ + public StreamData(String url, String contentType, InputStream stream) { + if (stream == null) { + throw new NullPointerException("Parameter inputstream must not be null"); + } + inputStream = stream; + this.contentType = contentType; + this.url = url; + } + + public String getUrl() { + return url; + } + + /** + * + * @return the returned stream must be closed + */ + public InputStream getStream() { + return inputStream; + } + + public String getContentType() { + return contentType; + } +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URIResolverAdapter.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URIResolverAdapter.java new file mode 100644 index 00000000..2d11010e --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URIResolverAdapter.java @@ -0,0 +1,96 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import javax.xml.transform.Source; +import javax.xml.transform.TransformerException; +import javax.xml.transform.URIResolver; +import javax.xml.transform.stream.StreamSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Adapter to make the Urldereferencer work as URIResolver for + * Stylesheettransforms. + * + * @author wbauer + * + */ +public class URIResolverAdapter implements URIResolver { + + private static Log log = LogFactory.getLog(URIResolverAdapter.class); + + private URLDereferencer urlDereferencer; + private URLDereferencerContext ctx; + + /** + * + * @param deferecencer + * must not be null + * @param ctx may be null + */ + public URIResolverAdapter(URLDereferencer deferecencer, + URLDereferencerContext ctx) { + if (deferecencer == null) { + throw new NullPointerException("Urlderefencer must not be set to null"); + } + this.urlDereferencer = deferecencer; + this.ctx = ctx; + } + + @Override + public Source resolve(String href, String base) throws TransformerException { + log.debug("Resolving href: "+href+" base: "+base); + try { + URI baseUri = null; + URI hrefUri = new URI(href); + if (base != null) { + baseUri = new URI(base); + } + URI abs; + if (baseUri != null) { + abs = baseUri.resolve(hrefUri); + } else { + abs = hrefUri; + } + if (!abs.isAbsolute()) { + throw new TransformerException("Only absolute URLs are supported"); + } + return new StreamSource(urlDereferencer.dereference(abs.toString(), ctx) + .getStream()); + } catch (URISyntaxException e) { + throw new TransformerException("Cannot resolve URI: base:" + base + + " href:" + href, e); + } catch (IOException iox) { + throw new TransformerException("Cannot resolve URI: base:" + base + + " href:" + href, iox); + } + } + + public URLDereferencerContext getCtx() { + return ctx; + } + + public void setCtx(URLDereferencerContext ctx) { + this.ctx = ctx; + } +} diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencer.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencer.java new file mode 100644 index 00000000..d747753f --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencer.java @@ -0,0 +1,90 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Class used to dereference (external URLs). + * + * @author wbauer + * + */ +public class URLDereferencer { + + private static Log log = LogFactory.getLog(URLDereferencer.class); + + private static URLDereferencer instance = new URLDereferencer(); + + private Map handlerMap = new HashMap(); + + private URLDereferencer() { + registerHandlers(); + } + + /** + * + * @param aUrl + * must not be null + * @param aContext + * @throws MalformedURLException + * if the protocol is not supported + */ + public StreamData dereference(String aUrl, URLDereferencerContext aContext) + throws IOException { + log.debug("Looking for handler for URL: " + aUrl); + int i = aUrl.indexOf(":"); + if (i == -1) { + throw new MalformedURLException("Invalid url: " + aUrl); + } + String protocol = aUrl.substring(0, i).toLowerCase().trim(); + URLProtocolHandler handler = handlerMap.get(protocol); + if (handler == null) { + throw new MalformedURLException("No handler for protocol: " + protocol + + " found"); + } + return handler.dereference(aUrl, aContext); + } + + /** + * Registers a handler for a protocol. + * + * @param aProtocol + * @param aHandler + * may be set to null to disable this protocol + */ + public void registerHandler(String aProtocol, URLProtocolHandler aHandler) { + handlerMap.put(aProtocol.toLowerCase(), aHandler); + } + + public static URLDereferencer getInstance() { + return instance; + } + + protected void registerHandlers() { + URLProtocolHandler handler = new HTTPURLProtocolHandlerImpl(); + for (String proto : HTTPURLProtocolHandlerImpl.PROTOCOLS) { + handlerMap.put(proto, handler); + } + } +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencerContext.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencerContext.java new file mode 100644 index 00000000..6befd5b3 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLDereferencerContext.java @@ -0,0 +1,27 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +public interface URLDereferencerContext { + + /** + * + * @param key + * @return may return null + */ + public Object getProperty(Object key); +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLProtocolHandler.java b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLProtocolHandler.java new file mode 100644 index 00000000..f584f450 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/bku/utils/urldereferencer/URLProtocolHandler.java @@ -0,0 +1,32 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils.urldereferencer; + +import java.io.IOException; +import java.net.MalformedURLException; + + +public interface URLProtocolHandler { + /** + * + * @param aUrl + * @param aContext + * @return the streamdata of this url or null if the url cannot be resolved. + * @throws IOException + */ + public StreamData dereference(String aUrl, URLDereferencerContext aContext) throws IOException; +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/dom/DOMUtils.java b/utils/src/main/java/at/gv/egiz/dom/DOMUtils.java new file mode 100644 index 00000000..32c7c5e6 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/dom/DOMUtils.java @@ -0,0 +1,115 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.dom; + +import iaik.utils.Base64OutputStream; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Text; +import org.w3c.dom.bootstrap.DOMImplementationRegistry; +import org.w3c.dom.ls.DOMImplementationLS; + +public final class DOMUtils { + + /** + * DOM Implementation. + */ + private static String DOM_LS_3_0 = "LS 3.0"; + + private static DOMImplementationLS domImplLS; + + private DOMUtils() { + } + + private static synchronized void ensureDOMImplementation() { + + if (domImplLS == null) { + + DOMImplementationRegistry registry; + try { + registry = DOMImplementationRegistry.newInstance(); + } catch (Exception e) { + throw new RuntimeException("Failed to get DOMImplementationRegistry."); + } + + domImplLS = (DOMImplementationLS) registry.getDOMImplementation(DOM_LS_3_0); + if (domImplLS == null) { + throw new RuntimeException("Failed to get DOMImplementation " + DOM_LS_3_0); + } + + } + + } + + public static DOMImplementationLS getDOMImplementationLS() { + + if (domImplLS == null) { + ensureDOMImplementation(); + } + + return domImplLS; + } + + public static Document createDocument() { + + // This does not work with the Xerces-J version (2.6.2) included in Java 6 + //document = ((DOMImplementation) domImplLS).createDocument(null, null, null); + // Therefore we have to employ the good old DocumentBuilderFactory + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db; + try { + db = dbf.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + throw new RuntimeException(e); + } + return db.newDocument(); + + } + + public static Text createBase64Text(byte[] bytes, Document doc) throws IOException { + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + Base64OutputStream base64OutputStream = new Base64OutputStream(outputStream); + base64OutputStream.write(bytes); + base64OutputStream.flush(); + return doc.createTextNode(outputStream.toString("ASCII")); + + } + + public static Text createBase64Text(InputStream bytes, Document doc) throws IOException { + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + Base64OutputStream base64OutputStream = new Base64OutputStream(outputStream, new byte[] {0xa}); + + byte[] b = new byte[2^8]; + for(int l; (l = bytes.read(b)) != -1;) { + base64OutputStream.write(b, 0, l); + } + + base64OutputStream.flush(); + return doc.createTextNode(outputStream.toString("ASCII")); + } + +} diff --git a/utils/src/main/java/at/gv/egiz/idlink/CompressedIdentityLinkFactory.java b/utils/src/main/java/at/gv/egiz/idlink/CompressedIdentityLinkFactory.java new file mode 100644 index 00000000..5f4e5d92 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/idlink/CompressedIdentityLinkFactory.java @@ -0,0 +1,416 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.security.PublicKey; +import java.security.cert.X509Certificate; +import java.util.List; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.bind.PropertyException; +import javax.xml.bind.Unmarshaller; +import javax.xml.transform.Source; +import javax.xml.transform.dom.DOMResult; + +import org.w3._2000._09.xmldsig_.KeyValueType; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import at.buergerkarte.namespaces.personenbindung._20020506_.CompressedIdentityLinkType; +import at.gv.e_government.reference.namespace.persondata._20020228_.AbstractPersonType; +import at.gv.e_government.reference.namespace.persondata._20020228_.IdentificationType; +import at.gv.e_government.reference.namespace.persondata._20020228_.PersonNameType; +import at.gv.e_government.reference.namespace.persondata._20020228_.PhysicalPersonType; +import at.gv.e_government.reference.namespace.persondata._20020228_.IdentificationType.Value; +import at.gv.e_government.reference.namespace.persondata._20020228_.PersonNameType.FamilyName; +import at.gv.egiz.idlink.ans1.CitizenPublicKey; +import at.gv.egiz.idlink.ans1.IdentityLink; +import at.gv.egiz.idlink.ans1.PersonData; +import at.gv.egiz.idlink.ans1.PhysicalPersonData; +import at.gv.egiz.xmldsig.KeyTypeNotSupportedException; +import at.gv.egiz.xmldsig.KeyValueFactory; + +public class CompressedIdentityLinkFactory { + + /** + * The instance returned by {@link #getInstance()}. + */ + private static CompressedIdentityLinkFactory instance; + + /** + * The JAXBContext. + */ + private static JAXBContext jaxbContext; + + /** + * The KeyValueFactory. + */ + private static KeyValueFactory keyValueFactory; + + /** + * Get an instance of this CompressedIdentityLinkFactory. + * + * @return an instance of this CompressedIdentityLinkFactory + */ + public synchronized static CompressedIdentityLinkFactory getInstance() { + if (instance == null) { + instance = new CompressedIdentityLinkFactory(); + } + return instance; + } + + /** + * Private constructor. + */ + private CompressedIdentityLinkFactory() { + + keyValueFactory = new KeyValueFactory(); + + StringBuffer packageNames = new StringBuffer(); + packageNames.append(at.gv.e_government.reference.namespace.persondata._20020228_.ObjectFactory.class.getPackage().getName()); + packageNames.append(":"); + packageNames.append(org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName()); + packageNames.append(":"); + packageNames.append(org.w3._2001._04.xmldsig_more_.ObjectFactory.class.getPackage().getName()); + packageNames.append(":"); + packageNames.append(at.buergerkarte.namespaces.personenbindung._20020506_.ObjectFactory.class.getPackage().getName()); + + try { + jaxbContext = JAXBContext.newInstance(packageNames.toString()); + } catch (JAXBException e) { + // we should not get an JAXBException initializing the JAXBContext + throw new RuntimeException(e); + } + + } + + public IdentityLink createIdLink(CompressedIdentityLinkType compressedIdentityLinkType) { + + // IssuerTemplate + String issuerTemplate = compressedIdentityLinkType.getIssuerTemplate(); + + // AssertionId + String assertionID = compressedIdentityLinkType.getAssertionID(); + + // IssueInstant + String issueInstant = compressedIdentityLinkType.getIssueInstant(); + + AbstractPersonType personDataType = compressedIdentityLinkType.getPersonData(); + + String baseId = null; + + List identifications = personDataType.getIdentification(); + for (IdentificationType identificationType : identifications) { + String type = identificationType.getType(); + if ("urn:publicid:gv.at:baseid".equals(type)) { + baseId = identificationType.getValue().getValue(); + } + } + + String givenName = null; + String familyName = null; + String dateOfBirth = null; + + if (personDataType instanceof PhysicalPersonType) { + PhysicalPersonType physicalPersonType = (PhysicalPersonType) personDataType; + PersonNameType name = physicalPersonType.getName(); + List givenNames = name.getGivenName(); + if (!givenNames.isEmpty()) { + givenName = givenNames.get(0); + } + List familyNames = name.getFamilyName(); + if (!familyNames.isEmpty()) { + familyName = familyNames.get(0).getValue(); + } + dateOfBirth = physicalPersonType.getDateOfBirth(); + } + + PhysicalPersonData physicalPersonData = new PhysicalPersonData(baseId, givenName, familyName, dateOfBirth); + PersonData personData = new PersonData(physicalPersonData); + + int numKeys = compressedIdentityLinkType.getCitizenPublicKey().size(); + CitizenPublicKey[] citizenPublicKeys = new CitizenPublicKey[numKeys]; + for (int i = 0; i < numKeys;) { + citizenPublicKeys[i] = new CitizenPublicKey(++i); + } + + byte[] signatureValue = compressedIdentityLinkType.getSignatureValue(); + byte[] referenceDigest = compressedIdentityLinkType.getReferenceDigest(); + byte[] referenceManifestDigest = compressedIdentityLinkType.getReferenceManifestDigest(); + byte[] manifestReferenceDigest = compressedIdentityLinkType.getManifestReferenceDigest(); + + IdentityLink idLink = new IdentityLink(issuerTemplate, assertionID, issueInstant, personData, citizenPublicKeys, signatureValue); + idLink.setReferenceDigest(referenceDigest); + idLink.setReferenceManifestDigest(referenceManifestDigest); + idLink.setManifestReferenceDigest(manifestReferenceDigest); + + return idLink; + + } + + /** + * Creates a new CompressedIdentityLink element from the given + * ASN.1 representation of an idLink. + * + * @param idLink + * the ASN.1 representation of an IdentityLink + * @param certificates + * a list of {@link X509Certificate}s containing the corresponding + * public keys + * @param domainId TODO + * @return a new CompressedIdentityLink element + * + * @throws NullPointerException + * if idLink or certificates is + * null + * @throws IllegalArgumentException + * if idLink references certificates not in the range + * of the certificates list + */ + public JAXBElement createCompressedIdentityLink( + at.gv.egiz.idlink.ans1.IdentityLink idLink, + List certificates, String domainId) { + + at.gv.e_government.reference.namespace.persondata._20020228_.ObjectFactory prFactory = + new at.gv.e_government.reference.namespace.persondata._20020228_.ObjectFactory(); + + at.buergerkarte.namespaces.personenbindung._20020506_.ObjectFactory pbFactory = + new at.buergerkarte.namespaces.personenbindung._20020506_.ObjectFactory(); + + org.w3._2000._09.xmldsig_.ObjectFactory dsFactory = new org.w3._2000._09.xmldsig_.ObjectFactory(); + + // PersonData + PhysicalPersonData __physicalPersonData = idLink.getPersonData() + .getPhysicalPerson(); + + Value identificationTypeValue = prFactory.createIdentificationTypeValue(); + identificationTypeValue.setValue(__physicalPersonData.getBaseId()); + IdentificationType identificationType = prFactory + .createIdentificationType(); + identificationType.setValue(identificationTypeValue); + if (domainId != null) { + identificationType.setType(domainId); + } else { + identificationType.setType("urn:publicid:gv.at:baseid"); + } + + PersonNameType personNameType = prFactory.createPersonNameType(); + FamilyName personNameTypeFamilyName = prFactory + .createPersonNameTypeFamilyName(); + personNameTypeFamilyName.setValue(__physicalPersonData.getFamilyName()); + personNameType.getFamilyName().add(personNameTypeFamilyName); + personNameType.getGivenName().add(__physicalPersonData.getGivenName()); + + PhysicalPersonType physicalPersonType = prFactory + .createPhysicalPersonType(); + physicalPersonType.getIdentification().add(identificationType); + physicalPersonType.setName(personNameType); + physicalPersonType.setDateOfBirth(__physicalPersonData.getDateOfBirth()); + + // CompressedIdentityLink + CompressedIdentityLinkType compressedIdentityLinkType = pbFactory + .createCompressedIdentityLinkType(); + compressedIdentityLinkType.setIssuerTemplate(idLink.getIssuerTemplate()); + compressedIdentityLinkType.setAssertionID(idLink.getAssertionID()); + compressedIdentityLinkType.setIssueInstant(idLink.getIssueInstant()); + compressedIdentityLinkType.setPersonData(physicalPersonType); + + // CitizenPublicKey + CitizenPublicKey[] __citizenPublicKeys = idLink.getCitizenPublicKeys(); + for (CitizenPublicKey __citizenPublicKey : __citizenPublicKeys) { + + X509Certificate certificate = certificates.get(__citizenPublicKey.getOnToken()); + PublicKey publicKey = certificate.getPublicKey(); + + JAXBElement keyValue; + try { + keyValue = keyValueFactory.createKeyValue(publicKey); + } catch (KeyTypeNotSupportedException e) { + // TODO: handle exception properly + throw new RuntimeException(e); + } + + KeyValueType keyValueType = dsFactory.createKeyValueType(); + keyValueType.getContent().add(keyValue); + + compressedIdentityLinkType.getCitizenPublicKey().add(keyValueType); + } + + compressedIdentityLinkType.setSignatureValue(idLink.getSignatureValue()); + compressedIdentityLinkType.setReferenceDigest(idLink.getReferenceDigest()); + compressedIdentityLinkType.setReferenceManifestDigest(idLink + .getReferenceManifestDigest()); + compressedIdentityLinkType.setManifestReferenceDigest(idLink + .getManifestReferenceDigest()); + JAXBElement compressedIdentityLink = pbFactory + .createCompressedIdentityLink(compressedIdentityLinkType); + + return compressedIdentityLink; + + } + + /** + * Marshall the given compressedIdentityLink into a DOM document + * with the given Nodes as parent and nextSibling + * nodes. + * + * @param compressedIdentityLink + * the CompressedIdentityLink element + * @param parent + * the parent node + * @param nextSibling + * the next sibling node (may be null) + * @param applyWorkarounds + * apply workarounds as spefiyed by + * {@link #applyWorkarounds(Element, int)} + * + * @throws JAXBException + * if an unexpected error occurs while marshalling + * @throws NullPointerException + * if compressdIdentityLink or parent is + * null + */ + public void marshallCompressedIdentityLink( + JAXBElement compressedIdentityLink, + Node parent, Node nextSibling, boolean applyWorkarounds) throws JAXBException { + + DOMResult result = new DOMResult(parent, nextSibling); + + + try { + Marshaller marshaller = jaxbContext.createMarshaller(); + + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); + + marshaller.marshal(compressedIdentityLink, result); + } catch (PropertyException e) { + throw new RuntimeException(e); + } + + if (applyWorkarounds) { + Element element = (Element) ((nextSibling != null) + ? nextSibling.getPreviousSibling() + : parent.getFirstChild()); + applyWorkarounds(element, 76); + } + + } + + @SuppressWarnings("unchecked") + public CompressedIdentityLinkType unmarshallCompressedIdentityLink(Source source) throws JAXBException { + + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + + return ((JAXBElement) unmarshaller.unmarshal(source)).getValue(); + + } + + /** + * Apply some workarounds to the given CompressedIdentityLink + * element to achieve compatibility with IdentityLink + * transformation stylesheets that have been designed for a (buggy) form of + * the CompressedIdentityLink as produced by a well-known citizen card + * environment implementation. + * + *
    + *
  1. Replace the attribute node URN of the + * NamedCurve element of an ECDSAKeyValue element by + * a child text-node with the same content.
  2. + *
  3. Replace the attribute nodes Value of the X + * and Y elements of an ECDSAKeyValue element by a + * child text-node with the same content.
  4. + *
  5. Insert "\n" at base64LineLength into the Base64 + * content of the Modulus element of an RSAKeyValue + * element. + *
+ * + * @param element + * the CompressedIdentityLink element + * @param base64LineLength + * the line length of Base64 content + */ + public void applyWorkarounds(Element element, int base64LineLength) { + + Document document = element.getOwnerDocument(); + + NodeList nodeList = element.getElementsByTagNameNS( + "http://www.w3.org/2001/04/xmldsig-more#", "NamedCurve"); + for (int i = 0; i < nodeList.getLength(); i++) { + Node ecdsaNameCurve = nodeList.item(i); + Attr attrNode = ((Element) ecdsaNameCurve).getAttributeNodeNS(null, + "URN"); + ecdsaNameCurve + .appendChild(document.createTextNode(attrNode.getValue())); + ((Element) ecdsaNameCurve).removeAttributeNode(attrNode); + } + nodeList = document.getElementsByTagNameNS( + "http://www.w3.org/2001/04/xmldsig-more#", "X"); + for (int i = 0; i < nodeList.getLength(); i++) { + Node x = nodeList.item(i); + Attr attrNode = ((Element) x).getAttributeNodeNS(null, "Value"); + x.appendChild(document.createTextNode(attrNode.getValue())); + ((Element) x).removeAttributeNode(attrNode); + } + nodeList = document.getElementsByTagNameNS( + "http://www.w3.org/2001/04/xmldsig-more#", "Y"); + for (int i = 0; i < nodeList.getLength(); i++) { + Node y = nodeList.item(i); + Attr attrNode = ((Element) y).getAttributeNodeNS(null, "Value"); + y.appendChild(document.createTextNode(attrNode.getValue())); + ((Element) y).removeAttributeNode(attrNode); + } + + if (base64LineLength > 0) { + nodeList = document.getElementsByTagNameNS( + "http://www.w3.org/2000/09/xmldsig#", "Modulus"); + for (int i = 0; i < nodeList.getLength(); i++) { + Node modulus = nodeList.item(i); + String value = ((Element) modulus).getTextContent(); + BufferedReader reader = new BufferedReader(new InputStreamReader( + new ByteArrayInputStream(value.getBytes()))); + char[] buff = new char[base64LineLength]; + StringBuffer newValue = new StringBuffer(); + int found = 0; + try { + while ((found = reader.read(buff)) > 0) { + newValue.append(buff, 0, found); + if (found == base64LineLength) + newValue.append('\n'); + } + } catch (IOException e) { + // this should never happen, as we are reading from a ByteArrayInputStream + throw new RuntimeException(e); + } + ((Element) modulus).setTextContent(newValue.toString()); + } + + } + + + } + +} diff --git a/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkTransformer.java b/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkTransformer.java new file mode 100644 index 00000000..7886b07d --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkTransformer.java @@ -0,0 +1,285 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamSource; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.Text; + +public class IdentityLinkTransformer { + + private class IdLTransformer { + + /** + * Is transformer in use? + */ + private boolean inUse = false; + + /** + * How often has this transformer been used? + */ + private int timesUsed = 0; + + /** + * The time this transformer has been created. + */ + private long created; + + /** + * When has this transformer been used the last time? + */ + private long lastTimeUsed; + + /** + * Average performance in milliseconds. + */ + private long time; + + /** + * Time used for initialization. + */ + private long initTime; + + /** + * The stylesheet transformer. + */ + private Transformer transformer; + + /** + * Stylesheet URL. + */ + private String stylesheetURL; + + /** + * + * @param stylesheetURL + * @throws IOException + * @throws TransformerConfigurationException + */ + public IdLTransformer(String stylesheetURL) throws IOException, TransformerConfigurationException { + + created = System.currentTimeMillis(); + + // TODO: implement stylesheet cache + this.stylesheetURL = stylesheetURL; + URL url = new URL(stylesheetURL); + + if (!"http".equalsIgnoreCase(url.getProtocol()) && !"https".equalsIgnoreCase(url.getProtocol())) { + throw new MalformedURLException("Protocol " + url.getProtocol() + " not supported for IssuerTemplate URL."); + } + StreamSource source = new StreamSource(url.openStream()); + + transformer = factory.newTransformer(source); + + initTime = System.currentTimeMillis() - created; + + } + + public void transform(Source xmlSource, Result outputTarget) throws TransformerException { + long t0 = System.currentTimeMillis(); + try { + transformer.transform(xmlSource, outputTarget); + } catch (TransformerException e) { + throw e; + } finally { + inUse = false; + long t1 = System.currentTimeMillis(); + time += (t1 - t0); + timesUsed++; + lastTimeUsed = System.currentTimeMillis(); + } + } + + /** + * @return true if this transformer is in use, or false otherwise + */ + public boolean isInUse() { + return inUse; + } + + @Override + public String toString() { + StringBuffer str = new StringBuffer(); + str.append("Transformer ").append(stylesheetURL) + .append("\n created ").append(new Date(created)).append(" used ").append( + timesUsed).append(" times, (init ").append(initTime).append("ms / ") + .append(((float) time) / timesUsed).append("ms avg) last time ").append(new Date(lastTimeUsed)); + return str.toString(); + } + + } + + /** + * The transfomer factory. + */ + private static TransformerFactory factory; + + /** + * The instance to be returned by {@link #getInstance()}. + */ + private static IdentityLinkTransformer instance; + + /** + * Returns an instance of this IdentityLinkTransfomer. + * + * @return an instance of this IdentityLinkTransformer + */ + public static IdentityLinkTransformer getInstance() { + if (instance == null) { + instance = new IdentityLinkTransformer(); + factory = TransformerFactory.newInstance(); + } + return instance; + } + + /** + * Sets the given domainIdentifier on the corresponding + * node of the given idLink. + *

This method may be used to cope with a flaw in the IssuerTemplate-Stylesheets + * used to transform a CompressedIdentitiyLink into an + * IdentityLink. Some IssuerTemplate-Stylesheets do not + * consider the pr:Type element value of the + * CompressedIdentityLink and render a pr:Type + * element value of urn:publicid:gv.at:baseid + * into the IdentityLink structure. This method allows to + * set the pr:Type element value on the given idLink + * after the transformation. + *

+ * + * @param idLink the IdentityLink element or one of it's ancestors. + * Must not be null. + * + * @param domainIdentifier the value to be set for the pr:Type element + * + * @throws NullPointerException if idLink is null. + */ + public static void setDomainIdentifier(Node idLink, String domainIdentifier) { + + Element element; + if (idLink instanceof Element) { + element = (Element) idLink; + } else if (idLink instanceof Document) { + element = ((Document) idLink).getDocumentElement(); + } else if (idLink != null) { + Document document = idLink.getOwnerDocument(); + element = document.getDocumentElement(); + } else { + throw new NullPointerException("Parameter 'idLink' must no be null."); + } + + NodeList nodeList = element.getElementsByTagNameNS( + "http://reference.e-government.gv.at/namespace/persondata/20020228#", + "Type"); + + for (int i = 0; i < nodeList.getLength(); i++) { + if (nodeList.item(i) instanceof Element) { + Element typeElement = (Element) nodeList.item(i); + NodeList children = typeElement.getChildNodes(); + for (int j = 0; j < children.getLength(); j++) { + if (children.item(j) instanceof Text) { + ((Text) children.item(j)).setNodeValue(domainIdentifier); + } + } + } + } + + } + + /** + * The pool of Transformer. + */ + private Map> pool; + + /** + * Private constructor. + */ + private IdentityLinkTransformer() { + pool = new HashMap>(); + } + + private synchronized IdLTransformer getFreeTransfomer(String stylesheetURL) throws TransformerConfigurationException, IOException { + + IdLTransformer transformer = null; + + List transfomerList = pool.get(stylesheetURL); + if (transfomerList == null) { + transfomerList = new ArrayList(); + pool.put(stylesheetURL, transfomerList); + } + + for (IdLTransformer candTransformer : transfomerList) { + if (!candTransformer.inUse) { + transformer = candTransformer; + break; + } + } + + if (transformer == null) { + transformer = new IdLTransformer(stylesheetURL); + transfomerList.add(transformer); + } + + transformer.inUse = true; + return transformer; + + } + + public void transformIdLink(String stylesheetURL, Source source, Result result) throws IOException, TransformerException { + IdLTransformer transformer = getFreeTransfomer(stylesheetURL); + transformer.transform(source, result); + } + + public String getStatistics() { + + StringBuffer str = new StringBuffer(); + Iterator keys = pool.keySet().iterator(); + int count = 0; + while (keys.hasNext()) { + String stylesheetURL = (String) keys.next(); + str.append("Stylesheet URL: ").append(stylesheetURL); + Iterator transformer = pool.get(stylesheetURL).iterator(); + while (transformer.hasNext()) { + IdLTransformer idLTransformer = (IdLTransformer) transformer.next(); + str.append("\n ").append(idLTransformer); + count++; + } + } + str.append("\n(").append(count).append(" transformer)"); + return str.toString(); + } + +} diff --git a/utils/src/main/java/at/gv/egiz/idlink/ans1/CitizenPublicKey.java b/utils/src/main/java/at/gv/egiz/idlink/ans1/CitizenPublicKey.java new file mode 100644 index 00000000..c32cf2b9 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/idlink/ans1/CitizenPublicKey.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink.ans1; + +import java.math.BigInteger; + +import iaik.asn1.*; + +/** + * This class implements the ASN.1 representation of the + * CitizenPublicKey of a compressed identity link. + * + *
CitizenPublicKey ::= CHOICE { 
+    onToken [0] INTEGER, 
+    referenceURL [1] UTF8String, 
+    x509Data [2] SubjectPublicKeyInfo 
+}  
+
+ * + * @author mivkovic@egiz.gv.at, mcentner@egiz.gv.at + */ +public class CitizenPublicKey implements ASN1Type { + + /** + * onToken + */ + private int onToken; // INTEGER + + /** + * Creates a new CitizenPublicKey with the given + * onToken value. + * + * @param onToken + */ + public CitizenPublicKey(int onToken) { + this.onToken = onToken; + } + + /** + * Creates a new CitizenPublicKey from the given ASN.1 representation. + * + * @param obj + * @throws CodingException + */ + public CitizenPublicKey(ASN1Object obj) throws CodingException { + decode(obj); + } + + @Override + public void decode(ASN1Object obj) throws CodingException { + try { + BigInteger Value = (BigInteger)(obj.getValue()); + onToken = Value.intValue(); + } catch (Exception ex) { + throw new CodingException(ex.toString()); + } + } + + @Override + public ASN1Object toASN1Object() { + INTEGER ot = new INTEGER(onToken); + return ot; + } + + /** + * Returns the DER encoding of this CitizenPublicKey. + * + * @return the DER encoding of this CitizenPublicKey + */ + public byte[] getEncoded() { + return DerCoder.encode(toASN1Object()); + } + + public int getOnToken() { + return onToken; + } + +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/idlink/ans1/IdentityLink.java b/utils/src/main/java/at/gv/egiz/idlink/ans1/IdentityLink.java new file mode 100644 index 00000000..37e4b240 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/idlink/ans1/IdentityLink.java @@ -0,0 +1,315 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink.ans1; + +import iaik.asn1.ASN1Object; +import iaik.asn1.ASN1Type; +import iaik.asn1.BIT_STRING; +import iaik.asn1.CON_SPEC; +import iaik.asn1.CodingException; +import iaik.asn1.DerCoder; +import iaik.asn1.INTEGER; +import iaik.asn1.SEQUENCE; +import iaik.asn1.UTF8String; + +/** + * This class impelments an ASN.1 representation of the compressed IdentiyLink. + *
+PersonenBindung ::= SEQUENCE { 
+    version INTEGER, 
+    issuerTemplate UTF8String, 
+    assertionID UTF8String, 
+    issueInstant UTF8String, 
+    personData PersonData, 
+    citizenPublicKey SEQUENCE SIZE (1..MAX) OF CitizenPublicKey, 
+    signatureValue BIT STRING, 
+    referenceDigest [0] BIT STRING OPTIONAL, 
+    referenceManifestDigest [1] BIT STRING OPTIONAL, 
+    manifestReferenceDigest [2] BIT STRING OPTIONAL 
+} 
+
+ * + * @author mivkovic@egiz.gv.at, mcentner@egiz.gv.at + */ +public class IdentityLink implements ASN1Type { + + private int version = 1; // INTEGER + private String issuerTemplate; // UTF8String + private String assertionID; // UTF8String + private String issueInstant; // UTF8String + private PersonData personData; // PersonData + private CitizenPublicKey[] citizenPublicKeys; // SEQUENCE SIZE (1..MAX) OF + private byte[] signatureValue; // BIT STRING + private byte[] referenceDigest; // BIT STRING OPTIONAL + private byte[] referenceManifestDigest; // BIT STRING OPTIONAL + private byte[] manifestReferenceDigest; // BIT STRING OPTIONAL + + /** + * Creates a new IdentityLink with the given + * issuerTemplate, assertionID, + * issueInstant, personData, + * citizenPublicKeys and signatureValue. + * + * @param issuerTemplate + * @param assertionID + * @param issueInstant + * @param personData + * @param citizenPublicKeys + * @param signatureValue + */ + public IdentityLink(String issuerTemplate, String assertionID, + String issueInstant, PersonData personData, + CitizenPublicKey[] citizenPublicKeys, byte[] signatureValue) { + this.issuerTemplate = issuerTemplate; + this.assertionID = assertionID; + this.issueInstant = issueInstant; + this.personData = personData; + this.citizenPublicKeys = citizenPublicKeys; + this.signatureValue = signatureValue; + } + + /** + * Create a new IdentityLink from an ASN1Object. + * + * @param identiyLink + * @throws CodingException + */ + public IdentityLink(ASN1Object identiyLink) throws CodingException { + decode(identiyLink); + } + + @Override + public void decode(ASN1Object obj) throws CodingException { + issuerTemplate = (String) ((ASN1Object) obj.getComponentAt(1)).getValue(); + assertionID = (String) ((ASN1Object) obj.getComponentAt(2)).getValue(); + issueInstant = (String) ((ASN1Object) obj.getComponentAt(3)).getValue(); + + if (((CON_SPEC) obj.getComponentAt(4)).getAsnType().getTag() == 0) + personData = new PersonData((ASN1Object) obj.getComponentAt(4).getValue()); + else { + throw new CodingException("CorporateBodyData currently not supported."); + } + + SEQUENCE publicKeySequence = (SEQUENCE) obj.getComponentAt(5); + int anz = publicKeySequence.countComponents(); + citizenPublicKeys = new CitizenPublicKey[anz]; + for (int i = 0; i < citizenPublicKeys.length; i++) { + CON_SPEC tmp = (CON_SPEC) publicKeySequence.getComponentAt(i); + if (tmp.getAsnType().getTag() == 0) { + citizenPublicKeys[i] = new CitizenPublicKey((ASN1Object) tmp.getValue()); + } else { + throw new CodingException( + "Currently only PublicKeys on token are supported."); + } + } + + signatureValue = (byte[]) ((ASN1Object) obj.getComponentAt(6)).getValue(); + + for (int i = 7; i < obj.countComponents(); i++) { + CON_SPEC tmp = (CON_SPEC) obj.getComponentAt(i); + switch (tmp.getAsnType().getTag()) { + case 0: + referenceDigest = (byte[]) ((BIT_STRING) tmp.getValue()).getValue(); + break; + case 1: + referenceManifestDigest = (byte[]) ((BIT_STRING) tmp.getValue()) + .getValue(); + break; + case 2: + manifestReferenceDigest = (byte[]) ((BIT_STRING) tmp.getValue()) + .getValue(); + break; + } + + } + + } + + @Override + public ASN1Object toASN1Object() { + SEQUENCE pb = new SEQUENCE(); + pb.addComponent(new INTEGER(version)); + pb.addComponent(new UTF8String(issuerTemplate)); + pb.addComponent(new UTF8String(assertionID)); + pb.addComponent(new UTF8String(issueInstant)); + + pb.addComponent(new CON_SPEC(0, personData.toASN1Object())); + SEQUENCE seq = new SEQUENCE(); + for (int i = 0; i < citizenPublicKeys.length; i++) { + seq.addComponent(new CON_SPEC(0, citizenPublicKeys[i].toASN1Object())); + } + pb.addComponent(seq); + pb.addComponent(new BIT_STRING(signatureValue)); + if (referenceDigest != null) + pb.addComponent(new CON_SPEC(0, new BIT_STRING(referenceDigest))); + if (referenceManifestDigest != null) + pb.addComponent(new CON_SPEC(1, new BIT_STRING(referenceManifestDigest))); + if (manifestReferenceDigest != null) + pb.addComponent(new CON_SPEC(2, new BIT_STRING(manifestReferenceDigest))); + return pb; + } + + /** + * Returns the DER encoding of this IdentityLink. + * + * @return the DER encoding of this IdentityLink + */ + public byte[] toByteArray() { + return DerCoder.encode(toASN1Object()); + } + + /** + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * @param version the version to set + */ + public void setVersion(int version) { + this.version = version; + } + + /** + * @return the issuerTemplate + */ + public String getIssuerTemplate() { + return issuerTemplate; + } + + /** + * @param issuerTemplate the issuerTemplate to set + */ + public void setIssuerTemplate(String issuerTemplate) { + this.issuerTemplate = issuerTemplate; + } + + /** + * @return the assertionID + */ + public String getAssertionID() { + return assertionID; + } + + /** + * @param assertionID the assertionID to set + */ + public void setAssertionID(String assertionID) { + this.assertionID = assertionID; + } + + /** + * @return the issueInstant + */ + public String getIssueInstant() { + return issueInstant; + } + + /** + * @param issueInstant the issueInstant to set + */ + public void setIssueInstant(String issueInstant) { + this.issueInstant = issueInstant; + } + + /** + * @return the personData + */ + public PersonData getPersonData() { + return personData; + } + + /** + * @param personData the personData to set + */ + public void setPersonData(PersonData personData) { + this.personData = personData; + } + + /** + * @return the citizenPublicKeys + */ + public CitizenPublicKey[] getCitizenPublicKeys() { + return citizenPublicKeys; + } + + /** + * @param citizenPublicKeys the citizenPublicKeys to set + */ + public void setCitizenPublicKeys(CitizenPublicKey[] citizenPublicKeys) { + this.citizenPublicKeys = citizenPublicKeys; + } + + /** + * @return the signatureValue + */ + public byte[] getSignatureValue() { + return signatureValue; + } + + /** + * @param signatureValue the signatureValue to set + */ + public void setSignatureValue(byte[] signatureValue) { + this.signatureValue = signatureValue; + } + + /** + * @return the referenceDigest + */ + public byte[] getReferenceDigest() { + return referenceDigest; + } + + /** + * @param referenceDigest the referenceDigest to set + */ + public void setReferenceDigest(byte[] referenceDigest) { + this.referenceDigest = referenceDigest; + } + + /** + * @return the referenceManifestDigest + */ + public byte[] getReferenceManifestDigest() { + return referenceManifestDigest; + } + + /** + * @param referenceManifestDigest the referenceManifestDigest to set + */ + public void setReferenceManifestDigest(byte[] referenceManifestDigest) { + this.referenceManifestDigest = referenceManifestDigest; + } + + /** + * @return the manifestReferenceDigest + */ + public byte[] getManifestReferenceDigest() { + return manifestReferenceDigest; + } + + /** + * @param manifestReferenceDigest the manifestReferenceDigest to set + */ + public void setManifestReferenceDigest(byte[] manifestReferenceDigest) { + this.manifestReferenceDigest = manifestReferenceDigest; + } + +} diff --git a/utils/src/main/java/at/gv/egiz/idlink/ans1/PersonData.java b/utils/src/main/java/at/gv/egiz/idlink/ans1/PersonData.java new file mode 100644 index 00000000..2a537eb3 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/idlink/ans1/PersonData.java @@ -0,0 +1,91 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink.ans1; + +import iaik.asn1.*; + +/** + * This class represents the ASN.1 version of the PersonData + * of a compressed identity link. + * + *
+PersonData ::= CHOICE { 
+    physcialPerson [0] PhysicalPersonData, 
+    corporateBody [1] CorporateBodyData 
+} 
+ * + * @author mivkovic@egiz.gv.at, mcentner@egiz.gv.at + * + */ +public class PersonData implements ASN1Type { + + /** + * physicalPerson + */ + private PhysicalPersonData physicalPerson; // PhysicalPersonData + + /** + * Creates a new PersonData with the given + * physicalPersonData. + * + * @param physicalPersonData + */ + public PersonData(PhysicalPersonData physicalPersonData) { + physicalPerson = physicalPersonData; + } + + /** + * Creates a new PersonData from its ASN.1 representation. + * + * @param obj + * @throws CodingException + */ + public PersonData(ASN1Object obj) throws CodingException { + decode(obj); + } + + @Override + public void decode(ASN1Object obj) throws CodingException { + try { + physicalPerson = new PhysicalPersonData(obj); + } catch (Exception ex) { + throw new CodingException(ex.toString()); + } + } + + @Override + public ASN1Object toASN1Object() { + return physicalPerson.toASN1Object(); + } + + /** + * Returns the DER encoded representation of this PersonData. + * + * @return the DER encoded representation of this PersonData + */ + public byte[] getEncoded() { + return DerCoder.encode(toASN1Object()); + } + + /** + * @return the physicalPerson + */ + public PhysicalPersonData getPhysicalPerson() { + return physicalPerson; + } + +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/idlink/ans1/PhysicalPersonData.java b/utils/src/main/java/at/gv/egiz/idlink/ans1/PhysicalPersonData.java new file mode 100644 index 00000000..a6aea97e --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/idlink/ans1/PhysicalPersonData.java @@ -0,0 +1,143 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink.ans1; + +import iaik.asn1.*; + +/** + * This class represents the ASN.1 version of the PhysicalPersonData + * of an compressed identity link. + * + *
PhysicalPersonData ::= SEQUENCE { 
+    baseId UTF8String, 
+    givenName UTF8String, 
+    familyName UTF8String, 
+    dateOfBirth UTF8String
+}
+ * + * @author mivkovic@egiz.gv.at, mcentner@eigz.gv.at + */ +public class PhysicalPersonData implements ASN1Type { + + /** + * baseId + */ + private String baseId; // UTF8String + + /** + * givenName + */ + private String givenName; // UTF8String + + /** + * familyName + */ + private String familyName; // UTF8String + + /** + * dataOfBirth + */ + private String dateOfBirth; // UTF8String + + /** + * Creates a new PhysicalPersonData with the + * given baseId, givenName, familyName + * and dataOfBirth. + * + * @param baseId + * @param givenName + * @param familyName + * @param dateOfBirth + */ + public PhysicalPersonData(String baseId, String givenName, String familyName, String dateOfBirth) { + this.baseId = baseId; + this.givenName = givenName; + this.familyName = familyName; + this.dateOfBirth = dateOfBirth; + } + + /** + * Creates a new PhysicalPersonData from its ASN.1 representation. + * + * @param obj + * + * @throws CodingException + */ + public PhysicalPersonData(ASN1Object obj) throws CodingException { + decode(obj); + } + + @Override + public void decode(ASN1Object obj) throws CodingException { + try { + baseId = (String) ((ASN1Object) obj.getComponentAt(0)).getValue(); + givenName = (String) ((ASN1Object) obj.getComponentAt(1)).getValue(); + familyName = (String) ((ASN1Object) obj.getComponentAt(2)).getValue(); + dateOfBirth = (String) ((ASN1Object) obj.getComponentAt(3)).getValue(); + } catch (Exception ex) { + throw new CodingException(ex.toString()); + } + } + + @Override + public ASN1Object toASN1Object() { + SEQUENCE ppd = new SEQUENCE(); + ppd.addComponent(new UTF8String(baseId)); + ppd.addComponent(new UTF8String(givenName)); + ppd.addComponent(new UTF8String(familyName)); + ppd.addComponent(new UTF8String(dateOfBirth)); + return ppd; + } + + /** + * Returns the DER encoding of this PhysicalPersonData. + * + * @return the DER encoding of this PhysicalPersonData + */ + public byte[] toByteArray() { + return DerCoder.encode(toASN1Object()); + } + + /** + * @return the baseId + */ + public String getBaseId() { + return baseId; + } + + /** + * @return the givenName + */ + public String getGivenName() { + return givenName; + } + + /** + * @return the familyName + */ + public String getFamilyName() { + return familyName; + } + + /** + * @return the dateOfBirth + */ + public String getDateOfBirth() { + return dateOfBirth; + } + +} \ No newline at end of file diff --git a/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java b/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java new file mode 100644 index 00000000..231966ac --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java @@ -0,0 +1,151 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package at.gv.egiz.org.apache.tomcat.util.http; + +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Locale; +import java.util.StringTokenizer; +import java.util.Vector; + +/** + * Util to process the "Accept-Language" header. Used by facade to implement + * getLocale() and by StaticInterceptor. + * + * Not optimized - it's very slow. + * + * @author James Duncan Davidson [duncan@eng.sun.com] + * @author James Todd [gonzo@eng.sun.com] + * @author Jason Hunter [jch@eng.sun.com] + * @author Harish Prabandham + * @author costin@eng.sun.com + */ +public class AcceptLanguage { + + public static Locale getLocale(String acceptLanguage) { + if( acceptLanguage == null ) return Locale.getDefault(); + + Hashtable> languages = + new Hashtable>(); + Vector quality = new Vector(); + processAcceptLanguage(acceptLanguage, languages, quality); + + if (languages.size() == 0) return Locale.getDefault(); + + Vector l = new Vector(); + extractLocales( languages,quality, l); + + return (Locale)l.elementAt(0); + } + + public static Enumeration getLocales(String acceptLanguage) { + // Short circuit with an empty enumeration if null header + if (acceptLanguage == null) { + Vector v = new Vector(); + v.addElement(Locale.getDefault()); + return v.elements(); + } + + Hashtable> languages = + new Hashtable>(); + Vector quality=new Vector(); + processAcceptLanguage(acceptLanguage, languages , quality); + + if (languages.size() == 0) { + Vector v = new Vector(); + v.addElement(Locale.getDefault()); + return v.elements(); + } + Vector l = new Vector(); + extractLocales( languages, quality , l); + return l.elements(); + } + + private static void processAcceptLanguage( String acceptLanguage, + Hashtable> languages, Vector q) + { + StringTokenizer languageTokenizer = + new StringTokenizer(acceptLanguage, ","); + + while (languageTokenizer.hasMoreTokens()) { + String language = languageTokenizer.nextToken().trim(); + int qValueIndex = language.indexOf(';'); + int qIndex = language.indexOf('q'); + int equalIndex = language.indexOf('='); + Double qValue = new Double(1); + + if (qValueIndex > -1 && + qValueIndex < qIndex && + qIndex < equalIndex) { + String qValueStr = language.substring(qValueIndex + 1); + language = language.substring(0, qValueIndex); + qValueStr = qValueStr.trim().toLowerCase(); + qValueIndex = qValueStr.indexOf('='); + qValue = new Double(0); + if (qValueStr.startsWith("q") && + qValueIndex > -1) { + qValueStr = qValueStr.substring(qValueIndex + 1); + try { + qValue = new Double(qValueStr.trim()); + } catch (NumberFormatException nfe) { + } + } + } + + // XXX + // may need to handle "*" at some point in time + + if (! language.equals("*")) { + String key = qValue.toString(); + Vector v; + if (languages.containsKey(key)) { + v = languages.get(key) ; + } else { + v= new Vector(); + q.addElement(qValue); + } + v.addElement(language); + languages.put(key, v); + } + } + } + + private static void extractLocales(Hashtable languages, Vector q, + Vector l) + { + // XXX We will need to order by q value Vector in the Future ? + Enumeration e = q.elements(); + while (e.hasMoreElements()) { + Vector v = + (Vector)languages.get(((Double)e.nextElement()).toString()); + Enumeration le = v.elements(); + while (le.hasMoreElements()) { + String language = (String)le.nextElement(); + String country = ""; + int countryIndex = language.indexOf("-"); + if (countryIndex > -1) { + country = language.substring(countryIndex + 1).trim(); + language = language.substring(0, countryIndex).trim(); + } + l.addElement(new Locale(language, country)); + } + } + } + + +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/NamespaceContextCallback.java b/utils/src/main/java/at/gv/egiz/slbinding/NamespaceContextCallback.java new file mode 100644 index 00000000..08c075ac --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/NamespaceContextCallback.java @@ -0,0 +1,41 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding; + +import javax.xml.namespace.NamespaceContext; + +/** + * + * @author clemens + */ +public interface NamespaceContextCallback { + + /** + * preserves the current namespace context from the XMLEventFilter + * @param filter + */ + void preserveNamespaceContext(RedirectEventFilter filter); + + /** + * @return the namespace context if preserveNamespaceContext() was called on this object before, null otherwise + */ + NamespaceContext getNamespaceContext(); +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/RedirectCallback.java b/utils/src/main/java/at/gv/egiz/slbinding/RedirectCallback.java new file mode 100644 index 00000000..80fb56dc --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/RedirectCallback.java @@ -0,0 +1,42 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding; + +import java.io.ByteArrayOutputStream; +import javax.xml.stream.XMLStreamException; + +/** + * + * The beforeUnmarshal(Unmarshaller um, Object parent) methods don't allow to pass the RedirectEventFilter, + * so we implement a callback interface common to all generated classes + * @author clemens + */ +public interface RedirectCallback { + + void enableRedirect(RedirectEventFilter filter) throws XMLStreamException; + + void disableRedirect(RedirectEventFilter filter) throws XMLStreamException; + + /** + * @return the redirected stream or null if enableRedirect() was not called before + */ + ByteArrayOutputStream getRedirectedStream(); +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java b/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java new file mode 100644 index 00000000..d2a7fb30 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java @@ -0,0 +1,259 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding; + +import java.io.OutputStream; +import java.util.Set; +import javax.xml.namespace.NamespaceContext; +import javax.xml.namespace.QName; +import javax.xml.stream.EventFilter; +import javax.xml.stream.XMLEventWriter; +import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.events.XMLEvent; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class RedirectEventFilter implements EventFilter { + + public static final String DEFAULT_ENCODING = "UTF-8"; + private static Log log = LogFactory.getLog(RedirectEventFilter.class); + protected XMLEventWriter redirectWriter = null; + protected Set redirectTriggers = null; + private int depth = -1; + protected NamespaceContext currentNamespaceContext = null; + + /** + * Event redirection is disabled, set a redirect stream to enable. + */ + public RedirectEventFilter() { + redirectWriter = null; + // redirectTriggers = null; + } + + /** + * + * @param redirectStream + * if null, no events are redirected + * @param redirectTriggers + * if null, all events are redirected + */ + public RedirectEventFilter(OutputStream redirectStream, String encoding) + throws XMLStreamException { // , List redirectTriggers + if (redirectStream != null) { + XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); + if (encoding == null) { + encoding = DEFAULT_ENCODING; + } + this.redirectWriter = outputFactory.createXMLEventWriter(redirectStream, + encoding); + } + // this.redirectTriggers = redirectTriggers; + } + + /** + * All startElement events occuring in the redirectTriggers list will trigger + * redirection of the entire (sub-)fragment. + * + * @param event + * @return false if an event is redirected + */ + @Override + public boolean accept(XMLEvent event) { + int eventType = event.getEventType(); + + if (eventType == XMLStreamConstants.START_ELEMENT) { + currentNamespaceContext = event.asStartElement().getNamespaceContext(); + } + if (redirectWriter == null) { + return true; + } + if (eventType == XMLStreamConstants.START_ELEMENT) { + if (depth >= 0 || triggersRedirect(event.asStartElement().getName())) { + depth++; + } + } else if (eventType == XMLStreamConstants.END_ELEMENT) { + if (depth >= 0 && --depth < 0) { + // redirect the end element of the trigger, + // but do not redirect the end element of the calling type + if (redirectTriggers != null) { + redirectEvent(event); + return false; + } + } + } + if (depth >= 0) { //|| (depth == 0 && redirectTriggers == null)) { + redirectEvent(event); + return false; + } + return true; // depth < 0; + +// switch (event.getEventType()) { +// case XMLStreamConstants.START_ELEMENT: +// StartElement startElt = event.asStartElement(); +// if (depth >= 0 || triggersRedirect(startElt.getName())) { +// depth++; +// } +// // namespace context changes only on start elements +// // (first event might not be startElement, but we don't need CDATA's +// // namespace context) +// currentNamespaceContext = startElt.getNamespaceContext(); +// break; +// case XMLStreamConstants.END_ELEMENT: +// // if depth switches from positive to negative, this is the closing tag of +// // the trigger (redirect as well!) +// if (depth >= 0 && --depth < 0) { +// redirectEvent(event); +// return false; +// } +// break; +// } +// if (depth >= 0) { +// redirectEvent(event); +// return false; +// } +// return true; // depth < 0; + } + + /** + * @param startElt + * @return true if the set of triggers contains startElement + * (or no triggers are registered, i.e. everything is redirected) + */ + private boolean triggersRedirect(QName startElement) { + if (redirectTriggers != null) { + return redirectTriggers.contains(startElement); + } + return true; + } + + private void redirectEvent(XMLEvent event) { + try { + if (log.isTraceEnabled()) { + log.trace("redirecting StAX event " + event); + } + redirectWriter.add(event); + } catch (XMLStreamException ex) { + ex.printStackTrace(); + } + } + + /** + * Enable/disable redirection of all events from now on. + * The redirected events will be UTF-8 encoded and written to the stream. + * + * @param redirectstream + * if null, redirection is disabled + */ + public void setRedirectStream(OutputStream redirectStream) throws XMLStreamException { + setRedirectStream(redirectStream, DEFAULT_ENCODING, null); + } + + /** + * Enable/disable redirection of all events from now on. + * + * @param redirectStream if null, redirection is disabled + * @param encoding The encoding for the redirect stream + * @throws javax.xml.stream.XMLStreamException + */ + public void setRedirectStream(OutputStream redirectStream, String encoding) throws XMLStreamException { + setRedirectStream(redirectStream, encoding, null); + } + + /** + * Enable/disable redirection of all (child) elements contained in redirect triggers. + * The redirected events will be UTF-8 encoded and written to the stream. + * + * @param redirectstream + * if null, redirection is disabled + * @param redirectTriggers elements that trigger the redirection + */ + public void setRedirectStream(OutputStream redirectStream, Set redirectTriggers) throws XMLStreamException { + setRedirectStream(redirectStream, DEFAULT_ENCODING, redirectTriggers); + } + + /** + * Enable/disable redirection of all (child) elements contained in redirect triggers. + * + * @param redirectstream + * if null, redirection is disabled + * @param encoding The encoding for the redirect stream + * @param redirectTriggers elements that trigger the redirection + */ + public void setRedirectStream(OutputStream redirectStream, String encoding, Set redirectTriggers) throws XMLStreamException { + if (redirectStream != null) { + XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); + if (encoding == null) { + encoding = DEFAULT_ENCODING; + } + redirectWriter = outputFactory.createXMLEventWriter(redirectStream, + encoding); + if (redirectTriggers == null) { + // start redirecting + depth = 0; + } + this.redirectTriggers = redirectTriggers; + } else { + redirectWriter = null; + this.redirectTriggers = null; + } + } + + /** + * Enable/disable redirection of fragments (defined by elements in + * redirectTriggers) + * + * @param redirectStream + * if null, redirection is disabled + * @param redirectTriggers + * All startElement events occuring in this list will trigger + * redirection of the entire fragment. If null, all events are + * redirected + */ + // public void setRedirectStream(OutputStream redirectStream, List + // redirectTriggers) throws XMLStreamException { + // if (redirectStream != null) { + // XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); + // redirectWriter = outputFactory.createXMLEventWriter(redirectStream); + // } else { + // redirectWriter = null; + // } + // this.redirectTriggers = (redirectStream == null) ? null : redirectTriggers; + // } + /** + * flushes the internal EventWriter + * + * @throws javax.xml.stream.XMLStreamException + */ + public void flushRedirectStream() throws XMLStreamException { + redirectWriter.flush(); + } + + /** + * the namespaceContext of the last startelement event read + * + * @return + */ + public NamespaceContext getCurrentNamespaceContext() { + return currentNamespaceContext; + } +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/RedirectUnmarshallerListener.java b/utils/src/main/java/at/gv/egiz/slbinding/RedirectUnmarshallerListener.java new file mode 100644 index 00000000..08c12146 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/RedirectUnmarshallerListener.java @@ -0,0 +1,68 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding; + +import javax.xml.bind.Unmarshaller; +import javax.xml.stream.XMLStreamException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Enables event redirection before marshalling a target of type RedirectCallback. + * It is up to the target class to implement the redirection (default implementation in RedirectCallback). + * Disables event redirection after marshalling (when the closing tag occurs). + * @author clemens + */ +public class RedirectUnmarshallerListener extends Unmarshaller.Listener { + + private static Log log = LogFactory.getLog(RedirectUnmarshallerListener.class); + protected RedirectEventFilter eventFilter; + + public RedirectUnmarshallerListener(RedirectEventFilter eventFilter) { + this.eventFilter = eventFilter; + } + + @Override + public void beforeUnmarshal(Object target, Object parent) { + if (target instanceof RedirectCallback) { + try { + ((RedirectCallback) target).enableRedirect(eventFilter); + } catch (XMLStreamException ex) { + log.error("failed to enable event redirection for " + target.getClass().getName() + ": " + ex.getMessage(), ex); + } + } + if (target instanceof NamespaceContextCallback) { + ((NamespaceContextCallback) target).preserveNamespaceContext(eventFilter); + } + } + + @Override + public void afterUnmarshal(Object target, Object parent) { + if (target instanceof RedirectCallback) { + try { + ((RedirectCallback) target).disableRedirect(eventFilter); + } catch (XMLStreamException ex) { + log.error("failed to disable event redirection for " + target.getClass().getName() + ": " + ex.getMessage(), ex); + } + } + } +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/impl/SignatureLocationType.java b/utils/src/main/java/at/gv/egiz/slbinding/impl/SignatureLocationType.java new file mode 100644 index 00000000..494e6972 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/impl/SignatureLocationType.java @@ -0,0 +1,50 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding.impl; + +import at.gv.egiz.slbinding.*; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.namespace.NamespaceContext; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * + * @author clemens + */ +public class SignatureLocationType extends at.buergerkarte.namespaces.securitylayer._1.SignatureLocationType implements NamespaceContextCallback { + + @XmlTransient + private static Log log = LogFactory.getLog(SignatureLocationType.class); + @XmlTransient + protected NamespaceContext namespaceContext; + + @Override + public NamespaceContext getNamespaceContext() { + return namespaceContext; + } + + @Override + public void preserveNamespaceContext(RedirectEventFilter filter) { + log.debug("preserving namespace context for SignatureLocationType"); + namespaceContext = filter.getCurrentNamespaceContext(); + } +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java b/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java new file mode 100644 index 00000000..b4e988f0 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java @@ -0,0 +1,70 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding.impl; + +import at.gv.egiz.slbinding.*; +import java.io.ByteArrayOutputStream; +import java.util.HashSet; +import java.util.Set; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * + * @author clemens + */ +public class TransformsInfoType extends at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType implements RedirectCallback { + + @XmlTransient + private static Log log = LogFactory.getLog(TransformsInfoType.class); + @XmlTransient + private static final Set redirectTriggers = initRedirectTriggers(); + @XmlTransient + protected ByteArrayOutputStream redirectOS = null; + + private static Set initRedirectTriggers() { + HashSet dsigTransforms = new HashSet(); + dsigTransforms.add(new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms")); + return dsigTransforms; + } + + @Override + public void enableRedirect(RedirectEventFilter filter) throws XMLStreamException { + log.debug("enabling event redirection for TransformsInfoType"); + redirectOS = new ByteArrayOutputStream(); + filter.setRedirectStream(redirectOS, redirectTriggers); + } + + @Override + public void disableRedirect(RedirectEventFilter filter) throws XMLStreamException { + log.debug("disabling event redirection for TransformsInfoType"); + filter.flushRedirectStream(); + filter.setRedirectStream(null); + } + + @Override + public ByteArrayOutputStream getRedirectedStream() { + return redirectOS; + } +} diff --git a/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java b/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java new file mode 100644 index 00000000..c32542aa --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding.impl; + +import at.gv.egiz.slbinding.RedirectCallback; +import at.gv.egiz.slbinding.RedirectEventFilter; +import java.io.ByteArrayOutputStream; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.stream.XMLStreamException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * + * @author clemens + */ +public class XMLContentType extends at.buergerkarte.namespaces.securitylayer._1.XMLContentType implements RedirectCallback { + + @XmlTransient + private static Log log = LogFactory.getLog(TransformsInfoType.class); + @XmlTransient + protected ByteArrayOutputStream redirectOS = null; + + @Override + public void enableRedirect(RedirectEventFilter filter) throws XMLStreamException { + log.debug("enabling event redirection for XMLContentType"); + redirectOS = new ByteArrayOutputStream(); + filter.setRedirectStream(redirectOS); + } + + @Override + public void disableRedirect(RedirectEventFilter filter) throws XMLStreamException { + log.debug("disabling event redirection for XMLContentType"); + filter.flushRedirectStream(); + filter.setRedirectStream(null); + } + + @Override + public ByteArrayOutputStream getRedirectedStream() { + return redirectOS; + } +} diff --git a/utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesException.java b/utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesException.java new file mode 100644 index 00000000..e892a13b --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesException.java @@ -0,0 +1,40 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.xades; + +public class QualifyingPropertiesException extends Exception { + + public QualifyingPropertiesException() { + // TODO Auto-generated constructor stub + } + + public QualifyingPropertiesException(String message) { + super(message); + // TODO Auto-generated constructor stub + } + + public QualifyingPropertiesException(Throwable cause) { + super(cause); + // TODO Auto-generated constructor stub + } + + public QualifyingPropertiesException(String message, Throwable cause) { + super(message, cause); + // TODO Auto-generated constructor stub + } + +} diff --git a/utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesFactory.java b/utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesFactory.java new file mode 100644 index 00000000..ae159215 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/xades/QualifyingPropertiesFactory.java @@ -0,0 +1,225 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.xades; + +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateEncodingException; +import java.security.cert.X509Certificate; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.TimeZone; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.bind.PropertyException; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + +import org.etsi.uri._01903.v1_1.CertIDListType; +import org.etsi.uri._01903.v1_1.CertIDType; +import org.etsi.uri._01903.v1_1.DataObjectFormatType; +import org.etsi.uri._01903.v1_1.DigestAlgAndValueType; +import org.etsi.uri._01903.v1_1.QualifyingPropertiesType; +import org.etsi.uri._01903.v1_1.SignaturePolicyIdentifierType; +import org.etsi.uri._01903.v1_1.SignedDataObjectPropertiesType; +import org.etsi.uri._01903.v1_1.SignedPropertiesType; +import org.etsi.uri._01903.v1_1.SignedSignaturePropertiesType; +import org.w3._2000._09.xmldsig_.DigestMethodType; +import org.w3._2000._09.xmldsig_.X509IssuerSerialType; +import org.w3c.dom.Node; + +public class QualifyingPropertiesFactory { + + public static String NS_URI_V1_1_1 = "http://uri.etsi.org/01903/v1.1.1#"; + + public static String SIGNED_PROPERTIES_REFERENCE_TYPE_V1_1_1 = NS_URI_V1_1_1 + "SignedProperties"; + + private static QualifyingPropertiesFactory instance; + + /** + * The JAXBContext. + */ + private static JAXBContext jaxbContext; + + public static synchronized QualifyingPropertiesFactory getInstance() { + if (instance == null) { + instance = new QualifyingPropertiesFactory(); + } + return instance; + } + + private DatatypeFactory datatypeFactory; + + private org.etsi.uri._01903.v1_1.ObjectFactory qpFactory; + + private org.w3._2000._09.xmldsig_.ObjectFactory dsFactory; + + public QualifyingPropertiesFactory() { + + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException e) { + throw new RuntimeException(e); + } + + qpFactory = new org.etsi.uri._01903.v1_1.ObjectFactory(); + + dsFactory = new org.w3._2000._09.xmldsig_.ObjectFactory(); + + StringBuffer packageNames = new StringBuffer(); + + packageNames.append(org.etsi.uri._01903.v1_1.ObjectFactory.class.getPackage().getName()); + packageNames.append(":"); + packageNames.append(org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName()); + + try { + jaxbContext = JAXBContext.newInstance(packageNames.toString()); + } catch (JAXBException e) { + // we should not get an JAXBException initializing the JAXBContext + throw new RuntimeException(e); + } + + } + + public DigestAlgAndValueType createDigestAlgAndValueType(X509Certificate certificate) throws QualifyingPropertiesException { + + DigestMethodType digestMethodType = dsFactory.createDigestMethodType(); + digestMethodType.setAlgorithm(DigestMethod.SHA1); + + byte[] digest; + try { + MessageDigest messageDigest = MessageDigest.getInstance("SHA-1"); + digest = messageDigest.digest(certificate.getEncoded()); + } catch (CertificateEncodingException e) { + throw new QualifyingPropertiesException(e); + } catch (NoSuchAlgorithmException e) { + throw new QualifyingPropertiesException(e); + } + + DigestAlgAndValueType digestAlgAndValueType = qpFactory.createDigestAlgAndValueType(); + digestAlgAndValueType.setDigestMethod(digestMethodType); + digestAlgAndValueType.setDigestValue(digest); + + return digestAlgAndValueType; + + } + + public X509IssuerSerialType createX509IssuerSerialType(X509Certificate certificate) { + + String name = certificate.getIssuerX500Principal().getName("RFC2253"); + BigInteger serialNumber = certificate.getSerialNumber(); + + X509IssuerSerialType issuerSerialType = dsFactory.createX509IssuerSerialType(); + issuerSerialType.setX509IssuerName(name); + issuerSerialType.setX509SerialNumber(serialNumber); + + return issuerSerialType; + + } + + public DataObjectFormatType createDataObjectFormatType(String objectReference, String mimeType, String description) { + + DataObjectFormatType dataObjectFormatType = qpFactory.createDataObjectFormatType(); + dataObjectFormatType.setObjectReference(objectReference); + + if (mimeType != null) { + dataObjectFormatType.setMimeType(mimeType); + } + if (description != null) { + dataObjectFormatType.setDescription(description); + } + + return dataObjectFormatType; + } + + public JAXBElement createQualifyingProperties111(Date signingTime, List certificates, String idValue, List dataObjectFormats) throws QualifyingPropertiesException { + + GregorianCalendar gregorianCalendar = new GregorianCalendar(); + gregorianCalendar.setTimeZone(TimeZone.getTimeZone("UTC")); + gregorianCalendar.setTime(signingTime); + + SignedSignaturePropertiesType signedSignaturePropertiesType = qpFactory.createSignedSignaturePropertiesType(); + + // SigningTime + XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(gregorianCalendar); + xmlGregorianCalendar.setFractionalSecond(null); + signedSignaturePropertiesType.setSigningTime(xmlGregorianCalendar); + + // SigningCertificate + CertIDListType certIDListType = qpFactory.createCertIDListType(); + List certIDs = certIDListType.getCert(); + + for (X509Certificate certificate : certificates) { + + CertIDType certIDType = qpFactory.createCertIDType(); + certIDType.setCertDigest(createDigestAlgAndValueType(certificate)); + certIDType.setIssuerSerial(createX509IssuerSerialType(certificate)); + + certIDs.add(certIDType); + + } + signedSignaturePropertiesType.setSigningCertificate(certIDListType); + + // SignaturePolicy + SignaturePolicyIdentifierType signaturePolicyIdentifierType = qpFactory.createSignaturePolicyIdentifierType(); + signaturePolicyIdentifierType.setSignaturePolicyImplied(new SignaturePolicyIdentifierType.SignaturePolicyImplied()); + signedSignaturePropertiesType.setSignaturePolicyIdentifier(signaturePolicyIdentifierType); + + // SignedProperties + SignedPropertiesType signedPropertiesType = qpFactory.createSignedPropertiesType(); + signedPropertiesType.setSignedSignatureProperties(signedSignaturePropertiesType); + + // DataObjectFormat + if (dataObjectFormats != null && !dataObjectFormats.isEmpty()) { + SignedDataObjectPropertiesType signedDataObjectPropertiesType = qpFactory.createSignedDataObjectPropertiesType(); + List dataObjectFormatTypes = signedDataObjectPropertiesType.getDataObjectFormat(); + dataObjectFormatTypes.addAll(dataObjectFormats); + signedPropertiesType.setSignedDataObjectProperties(signedDataObjectPropertiesType); + } + + signedPropertiesType.setId(idValue); + + // QualifyingProperties + QualifyingPropertiesType qualifyingPropertiesType = qpFactory.createQualifyingPropertiesType(); + qualifyingPropertiesType.setSignedProperties(signedPropertiesType); + + return qpFactory.createQualifyingProperties(qualifyingPropertiesType); + + } + + public void marshallQualifyingProperties(JAXBElement qualifyingProperties, Node parent) throws JAXBException { + + try { + Marshaller marshaller = jaxbContext.createMarshaller(); + + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); + + marshaller.marshal(qualifyingProperties, parent); + } catch (PropertyException e) { + throw new RuntimeException(e); + } + + } + +} diff --git a/utils/src/main/java/at/gv/egiz/xmldsig/KeyTypeNotSupportedException.java b/utils/src/main/java/at/gv/egiz/xmldsig/KeyTypeNotSupportedException.java new file mode 100644 index 00000000..3afa6d51 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/xmldsig/KeyTypeNotSupportedException.java @@ -0,0 +1,65 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/** + * + */ +package at.gv.egiz.xmldsig; + +/** + * @author mcentner + * + */ +public class KeyTypeNotSupportedException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * + */ + public KeyTypeNotSupportedException() { + // TODO Auto-generated constructor stub + } + + /** + * @param message + */ + public KeyTypeNotSupportedException(String message) { + super(message); + // TODO Auto-generated constructor stub + } + + /** + * @param cause + */ + public KeyTypeNotSupportedException(Throwable cause) { + super(cause); + // TODO Auto-generated constructor stub + } + + /** + * @param message + * @param cause + */ + public KeyTypeNotSupportedException(String message, Throwable cause) { + super(message, cause); + // TODO Auto-generated constructor stub + } + +} diff --git a/utils/src/main/java/at/gv/egiz/xmldsig/KeyValueFactory.java b/utils/src/main/java/at/gv/egiz/xmldsig/KeyValueFactory.java new file mode 100644 index 00000000..c1772312 --- /dev/null +++ b/utils/src/main/java/at/gv/egiz/xmldsig/KeyValueFactory.java @@ -0,0 +1,279 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.xmldsig; + +import iaik.security.ecc.interfaces.ECDSAParams; +import iaik.security.ecc.interfaces.ECDSAPublicKey; +import iaik.security.ecc.math.ecgroup.Coordinate; +import iaik.security.ecc.math.ecgroup.ECPoint; +import iaik.security.ecc.math.ecgroup.EllipticCurve; +import iaik.security.ecc.math.field.BinaryField; +import iaik.security.ecc.math.field.Field; +import iaik.security.ecc.math.field.FieldElement; +import iaik.security.ecc.math.field.PrimeField; + +import java.math.BigInteger; +import java.security.InvalidKeyException; +import java.security.PublicKey; +import java.security.interfaces.DSAParams; +import java.security.interfaces.DSAPublicKey; +import java.security.interfaces.RSAPublicKey; + +import javax.xml.bind.JAXBElement; + +import org.w3._2000._09.xmldsig_.DSAKeyValueType; +import org.w3._2000._09.xmldsig_.RSAKeyValueType; +import org.w3._2001._04.xmldsig_more_.BasePointParamsType; +import org.w3._2001._04.xmldsig_more_.CharTwoFieldElemType; +import org.w3._2001._04.xmldsig_more_.CurveParamsType; +import org.w3._2001._04.xmldsig_more_.DomainParamsType; +import org.w3._2001._04.xmldsig_more_.ECDSAKeyValueType; +import org.w3._2001._04.xmldsig_more_.ECPointType; +import org.w3._2001._04.xmldsig_more_.ExplicitParamsType; +import org.w3._2001._04.xmldsig_more_.FieldElemType; +import org.w3._2001._04.xmldsig_more_.FieldParamsType; +import org.w3._2001._04.xmldsig_more_.PnBFieldParamsType; +import org.w3._2001._04.xmldsig_more_.PrimeFieldElemType; +import org.w3._2001._04.xmldsig_more_.PrimeFieldParamsType; +import org.w3._2001._04.xmldsig_more_.TnBFieldParamsType; +import org.w3._2001._04.xmldsig_more_.DomainParamsType.NamedCurve; + +public class KeyValueFactory { + + private static byte[] bigInteger2byteArray(BigInteger bigPositiveInt) { + if (bigPositiveInt == null) + throw new NullPointerException("Argument 'bigPositiveInt' must not be null"); + if (bigPositiveInt.signum() != 1) + throw new IllegalArgumentException("Argument 'bigPositiveInt' must not be negative"); + + byte[] byteRepresentation = bigPositiveInt.toByteArray(); + if (byteRepresentation[0] == 0) { + byte[] oldByteRepresentation = byteRepresentation; + byteRepresentation = new byte[oldByteRepresentation.length - 1]; + System.arraycopy(oldByteRepresentation, 1, byteRepresentation, 0, oldByteRepresentation.length - 1); + } + return byteRepresentation; + } + + org.w3._2001._04.xmldsig_more_.ObjectFactory ecFactory = new org.w3._2001._04.xmldsig_more_.ObjectFactory(); + + org.w3._2000._09.xmldsig_.ObjectFactory dsFactory = new org.w3._2000._09.xmldsig_.ObjectFactory(); + + public JAXBElement createKeyValue(PublicKey publicKey) throws KeyTypeNotSupportedException { + + if (publicKey instanceof RSAPublicKey) { + RSAKeyValueType keyValueType = createRSAKeyValueType((RSAPublicKey) publicKey); + return dsFactory.createRSAKeyValue(keyValueType); + } else if (publicKey instanceof DSAPublicKey) { + DSAKeyValueType keyValueType = createKeyValueType((DSAPublicKey) publicKey); + return dsFactory.createDSAKeyValue(keyValueType); + } else if (publicKey instanceof ECDSAPublicKey) { + ECDSAKeyValueType keyValueType = createKeyValueType((ECDSAPublicKey) publicKey); + return ecFactory.createECDSAKeyValue(keyValueType); + } else if ("EC".equals(publicKey.getAlgorithm())) { + byte[] encoded = publicKey.getEncoded(); + try { + iaik.security.ecc.ecdsa.ECPublicKey key = new iaik.security.ecc.ecdsa.ECPublicKey(encoded); + ECDSAKeyValueType keyValueType = createKeyValueType(key); + return ecFactory.createECDSAKeyValue(keyValueType); + } catch (InvalidKeyException e) { + throw new KeyTypeNotSupportedException("Public key of type " + + publicKey.getAlgorithm() + " (" + publicKey.getClass() + + ") not supported."); + } + } else { + throw new KeyTypeNotSupportedException("Public key of type " + + publicKey.getAlgorithm() + " (" + publicKey.getClass() + + ") not supported."); + } + + } + + public RSAKeyValueType createRSAKeyValueType(RSAPublicKey publicKey) { + + RSAKeyValueType keyValueType = dsFactory.createRSAKeyValueType(); + keyValueType.setExponent(bigInteger2byteArray(publicKey.getPublicExponent())); + keyValueType.setModulus(bigInteger2byteArray(publicKey.getModulus())); + + return keyValueType; + } + + public DSAKeyValueType createKeyValueType(DSAPublicKey publicKey) { + + DSAKeyValueType keyValueType = dsFactory.createDSAKeyValueType(); + + if (publicKey.getParams() != null) { + // P, Q, G + DSAParams params = publicKey.getParams(); + if (params.getP() != null && params.getQ() != null) { + keyValueType.setP(bigInteger2byteArray(params.getP())); + keyValueType.setQ(bigInteger2byteArray(params.getQ())); + } + if (params.getG() != null) { + keyValueType.setG(bigInteger2byteArray(params.getG())); + } + } + // + keyValueType.setY(bigInteger2byteArray(publicKey.getY())); + + return keyValueType; + } + + public ECDSAKeyValueType createKeyValueType(ECDSAPublicKey publicKey) throws KeyTypeNotSupportedException { + + ECDSAKeyValueType keyValueType = ecFactory.createECDSAKeyValueType(); + + ECDSAParams params = publicKey.getParameter(); + if (params != null) { + keyValueType.setDomainParameters(createDomainParamsType(params)); + } + + if (!publicKey.getW().isInfinity()) { + keyValueType.setPublicKey(createPointType(publicKey.getW())); + } + + return keyValueType; + } + + public ECPointType createPointType(ECPoint point) throws KeyTypeNotSupportedException { + ECPointType pointType = ecFactory.createECPointType(); + Coordinate affine = point.getCoordinates().toAffine(); + pointType.setX(createFieldElemType(affine.getX())); + pointType.setY(createFieldElemType(affine.getY())); + return pointType; + } + + public FieldElemType createFieldElemType(FieldElement fieldElement) throws KeyTypeNotSupportedException { + int fieldId = fieldElement.getField().getFieldId(); + if (fieldId == PrimeField.PRIME_FIELD_ID) { + PrimeFieldElemType fieldElemType = ecFactory.createPrimeFieldElemType(); + fieldElemType.setValue(fieldElement.toBigInt()); + return fieldElemType; + } else if (fieldId == BinaryField.BINARY_FIELD_ID) { + CharTwoFieldElemType fieldElemType = ecFactory.createCharTwoFieldElemType(); + fieldElemType.setValue(fieldElement.toByteArray()); + return fieldElemType; + } else { + throw new KeyTypeNotSupportedException("Field element of type " + fieldId + " not supported."); + } + } + + public FieldParamsType createFieldParamsType(Field field) throws KeyTypeNotSupportedException { + + if (field.getFieldId() == PrimeField.PRIME_FIELD_ID) { + // PrimeFieldParamsType + PrimeFieldParamsType primeFieldParamsType = ecFactory.createPrimeFieldParamsType(); + primeFieldParamsType.setP(field.getSize()); + return primeFieldParamsType; + } else if (field.getFieldId() == BinaryField.BINARY_FIELD_ID && field instanceof BinaryField) { + // CharTwoFieldParamsType + + BinaryField binaryField = (BinaryField) field; + int[] irreduciblePolynomial = binaryField.getIrreduciblePolynomial(); + + // The irreducible polynomial as a BinaryFieldValue + FieldElement irreducible = binaryField.newElement(irreduciblePolynomial); + + int order = binaryField.getOrder(); + int[] coeffPositions = new int[3]; + + // Get coefficients of irreducible polynomial + int coeffCount = 2; + for (int i = 1; i < order -1; i++) { + if (irreducible.testBit(i)) { + coeffPositions[coeffCount - 2] = i; + coeffCount++; + if (coeffCount == 5) + break; + } + } + // detect if trinomial or pentanomial base is present... + switch (coeffCount) { + case 3: + // trinomial base + TnBFieldParamsType tnBFieldParamsType = ecFactory.createTnBFieldParamsType(); + tnBFieldParamsType.setM(BigInteger.valueOf(binaryField.getOrder())); + tnBFieldParamsType.setK(BigInteger.valueOf(coeffPositions[0])); + return tnBFieldParamsType; + + case 5: + // pentanomial base + PnBFieldParamsType pnBFieldParamsType = ecFactory.createPnBFieldParamsType(); + pnBFieldParamsType.setM(BigInteger.valueOf(binaryField.getOrder())); + pnBFieldParamsType.setK1(BigInteger.valueOf(coeffPositions[0])); + pnBFieldParamsType.setK2(BigInteger.valueOf(coeffPositions[1])); + pnBFieldParamsType.setK3(BigInteger.valueOf(coeffPositions[2])); + return pnBFieldParamsType; + + default: + throw new KeyTypeNotSupportedException("Only trinomial and pentanomial base is supported."); + } + + } else { + throw new KeyTypeNotSupportedException("Field element of type " + field.getFieldId() + " not supported."); + } + + } + + public DomainParamsType createDomainParamsType(ECDSAParams params) throws KeyTypeNotSupportedException { + + DomainParamsType domainParamsType = ecFactory.createDomainParamsType(); + EllipticCurve curve = params.getG().getCurve(); + + String oid = params.getOID(); + if (oid != null) { + // NamedCurve + NamedCurve namedCurve = ecFactory.createDomainParamsTypeNamedCurve(); + namedCurve.setURN("urn:oid:" + oid); + domainParamsType.setNamedCurve(namedCurve); + } else { + // Explicit parameters + ExplicitParamsType explicitParamsType = ecFactory.createExplicitParamsType(); + explicitParamsType.setFieldParams(createFieldParamsType(curve.getField())); + + CurveParamsType curveParamsType = ecFactory.createCurveParamsType(); + + // curve coefficients + curveParamsType.setA(createFieldElemType(curve.getA())); + curveParamsType.setB(createFieldElemType(curve.getB())); + + // seed + if (params.getS() != null) { + curveParamsType.setSeed(bigInteger2byteArray(params.getS())); + } + explicitParamsType.setCurveParams(curveParamsType); + + + // BasePoint parameters + BasePointParamsType basePointParamsType = ecFactory.createBasePointParamsType(); + if (!params.getG().isInfinity()) { + basePointParamsType.setBasePoint(createPointType(params.getG())); + } + basePointParamsType.setOrder(params.getR()); + if(params.getK() != null) { + basePointParamsType.setCofactor(params.getK()); + } + explicitParamsType.setBasePointParams(basePointParamsType); + + domainParamsType.setExplicitParams(explicitParamsType); + } + + return domainParamsType; + + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/AnyType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/AnyType.java new file mode 100644 index 00000000..a091781c --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/AnyType.java @@ -0,0 +1,119 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; + + +/** + *

Java class for AnyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AnyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AnyType", propOrder = { + "content" +}) +public class AnyType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLIdentifierType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLIdentifierType.java new file mode 100644 index 00000000..61c70d62 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLIdentifierType.java @@ -0,0 +1,174 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for CRLIdentifierType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CRLIdentifierType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Issuer" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="IssueTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
+ *         <element name="Number" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CRLIdentifierType", propOrder = { + "issuer", + "issueTime", + "number" +}) +public class CRLIdentifierType { + + @XmlElement(name = "Issuer", required = true) + protected String issuer; + @XmlElement(name = "IssueTime", required = true) + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar issueTime; + @XmlElement(name = "Number") + protected BigInteger number; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + + /** + * Gets the value of the issuer property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssuer() { + return issuer; + } + + /** + * Sets the value of the issuer property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssuer(String value) { + this.issuer = value; + } + + /** + * Gets the value of the issueTime property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getIssueTime() { + return issueTime; + } + + /** + * Sets the value of the issueTime property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setIssueTime(XMLGregorianCalendar value) { + this.issueTime = value; + } + + /** + * Gets the value of the number property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getNumber() { + return number; + } + + /** + * Sets the value of the number property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setNumber(BigInteger value) { + this.number = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefType.java new file mode 100644 index 00000000..fc722edf --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CRLRefType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CRLRefType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DigestAlgAndValue" type="{http://uri.etsi.org/01903/v1.1.1#}DigestAlgAndValueType"/>
+ *         <element name="CRLIdentifier" type="{http://uri.etsi.org/01903/v1.1.1#}CRLIdentifierType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CRLRefType", propOrder = { + "digestAlgAndValue", + "crlIdentifier" +}) +public class CRLRefType { + + @XmlElement(name = "DigestAlgAndValue", required = true) + protected DigestAlgAndValueType digestAlgAndValue; + @XmlElement(name = "CRLIdentifier") + protected CRLIdentifierType crlIdentifier; + + /** + * Gets the value of the digestAlgAndValue property. + * + * @return + * possible object is + * {@link DigestAlgAndValueType } + * + */ + public DigestAlgAndValueType getDigestAlgAndValue() { + return digestAlgAndValue; + } + + /** + * Sets the value of the digestAlgAndValue property. + * + * @param value + * allowed object is + * {@link DigestAlgAndValueType } + * + */ + public void setDigestAlgAndValue(DigestAlgAndValueType value) { + this.digestAlgAndValue = value; + } + + /** + * Gets the value of the crlIdentifier property. + * + * @return + * possible object is + * {@link CRLIdentifierType } + * + */ + public CRLIdentifierType getCRLIdentifier() { + return crlIdentifier; + } + + /** + * Sets the value of the crlIdentifier property. + * + * @param value + * allowed object is + * {@link CRLIdentifierType } + * + */ + public void setCRLIdentifier(CRLIdentifierType value) { + this.crlIdentifier = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefsType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefsType.java new file mode 100644 index 00000000..0db62ed5 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLRefsType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CRLRefsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CRLRefsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CRLRef" type="{http://uri.etsi.org/01903/v1.1.1#}CRLRefType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CRLRefsType", propOrder = { + "crlRef" +}) +public class CRLRefsType { + + @XmlElement(name = "CRLRef", required = true) + protected List crlRef; + + /** + * Gets the value of the crlRef property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the crlRef property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCRLRef().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CRLRefType } + * + * + */ + public List getCRLRef() { + if (crlRef == null) { + crlRef = new ArrayList(); + } + return this.crlRef; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLValuesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLValuesType.java new file mode 100644 index 00000000..ee008edd --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CRLValuesType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CRLValuesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CRLValuesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EncapsulatedCRLValue" type="{http://uri.etsi.org/01903/v1.1.1#}EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CRLValuesType", propOrder = { + "encapsulatedCRLValue" +}) +public class CRLValuesType { + + @XmlElement(name = "EncapsulatedCRLValue", required = true) + protected List encapsulatedCRLValue; + + /** + * Gets the value of the encapsulatedCRLValue property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the encapsulatedCRLValue property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEncapsulatedCRLValue().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EncapsulatedPKIDataType } + * + * + */ + public List getEncapsulatedCRLValue() { + if (encapsulatedCRLValue == null) { + encapsulatedCRLValue = new ArrayList(); + } + return this.encapsulatedCRLValue; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDListType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDListType.java new file mode 100644 index 00000000..adcc9e03 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDListType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CertIDListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CertIDListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Cert" type="{http://uri.etsi.org/01903/v1.1.1#}CertIDType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CertIDListType", propOrder = { + "cert" +}) +public class CertIDListType { + + @XmlElement(name = "Cert", required = true) + protected List cert; + + /** + * Gets the value of the cert property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cert property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCert().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CertIDType } + * + * + */ + public List getCert() { + if (cert == null) { + cert = new ArrayList(); + } + return this.cert; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDType.java new file mode 100644 index 00000000..ab567eac --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertIDType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.X509IssuerSerialType; + + +/** + *

Java class for CertIDType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CertIDType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CertDigest" type="{http://uri.etsi.org/01903/v1.1.1#}DigestAlgAndValueType"/>
+ *         <element name="IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CertIDType", propOrder = { + "certDigest", + "issuerSerial" +}) +public class CertIDType { + + @XmlElement(name = "CertDigest", required = true) + protected DigestAlgAndValueType certDigest; + @XmlElement(name = "IssuerSerial", required = true) + protected X509IssuerSerialType issuerSerial; + + /** + * Gets the value of the certDigest property. + * + * @return + * possible object is + * {@link DigestAlgAndValueType } + * + */ + public DigestAlgAndValueType getCertDigest() { + return certDigest; + } + + /** + * Sets the value of the certDigest property. + * + * @param value + * allowed object is + * {@link DigestAlgAndValueType } + * + */ + public void setCertDigest(DigestAlgAndValueType value) { + this.certDigest = value; + } + + /** + * Gets the value of the issuerSerial property. + * + * @return + * possible object is + * {@link X509IssuerSerialType } + * + */ + public X509IssuerSerialType getIssuerSerial() { + return issuerSerial; + } + + /** + * Sets the value of the issuerSerial property. + * + * @param value + * allowed object is + * {@link X509IssuerSerialType } + * + */ + public void setIssuerSerial(X509IssuerSerialType value) { + this.issuerSerial = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertificateValuesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertificateValuesType.java new file mode 100644 index 00000000..cf0ca915 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertificateValuesType.java @@ -0,0 +1,133 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CertificateValuesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CertificateValuesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="EncapsulatedX509Certificate" type="{http://uri.etsi.org/01903/v1.1.1#}EncapsulatedPKIDataType"/>
+ *         <element name="OtherCertificate" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType"/>
+ *       </choice>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CertificateValuesType", propOrder = { + "encapsulatedX509CertificateOrOtherCertificate" +}) +public class CertificateValuesType { + + @XmlElements({ + @XmlElement(name = "OtherCertificate", type = AnyType.class), + @XmlElement(name = "EncapsulatedX509Certificate", type = EncapsulatedPKIDataType.class) + }) + protected List encapsulatedX509CertificateOrOtherCertificate; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the encapsulatedX509CertificateOrOtherCertificate property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the encapsulatedX509CertificateOrOtherCertificate property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEncapsulatedX509CertificateOrOtherCertificate().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * {@link EncapsulatedPKIDataType } + * + * + */ + public List getEncapsulatedX509CertificateOrOtherCertificate() { + if (encapsulatedX509CertificateOrOtherCertificate == null) { + encapsulatedX509CertificateOrOtherCertificate = new ArrayList(); + } + return this.encapsulatedX509CertificateOrOtherCertificate; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertifiedRolesListType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertifiedRolesListType.java new file mode 100644 index 00000000..184f13c8 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CertifiedRolesListType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CertifiedRolesListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CertifiedRolesListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CertifiedRole" type="{http://uri.etsi.org/01903/v1.1.1#}EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CertifiedRolesListType", propOrder = { + "certifiedRole" +}) +public class CertifiedRolesListType { + + @XmlElement(name = "CertifiedRole", required = true) + protected List certifiedRole; + + /** + * Gets the value of the certifiedRole property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the certifiedRole property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCertifiedRole().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EncapsulatedPKIDataType } + * + * + */ + public List getCertifiedRole() { + if (certifiedRole == null) { + certifiedRole = new ArrayList(); + } + return this.certifiedRole; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/ClaimedRolesListType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/ClaimedRolesListType.java new file mode 100644 index 00000000..87602958 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/ClaimedRolesListType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ClaimedRolesListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ClaimedRolesListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ClaimedRole" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ClaimedRolesListType", propOrder = { + "claimedRole" +}) +public class ClaimedRolesListType { + + @XmlElement(name = "ClaimedRole", required = true) + protected List claimedRole; + + /** + * Gets the value of the claimedRole property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the claimedRole property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getClaimedRole().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * + * + */ + public List getClaimedRole() { + if (claimedRole == null) { + claimedRole = new ArrayList(); + } + return this.claimedRole; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeIndicationType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeIndicationType.java new file mode 100644 index 00000000..b079b847 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeIndicationType.java @@ -0,0 +1,180 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CommitmentTypeIndicationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CommitmentTypeIndicationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CommitmentTypeId" type="{http://uri.etsi.org/01903/v1.1.1#}ObjectIdentifierType"/>
+ *         <choice>
+ *           <element name="ObjectReference" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
+ *           <element name="AllSignedDataObjects" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ *         </choice>
+ *         <element name="CommitmentTypeQualifiers" type="{http://uri.etsi.org/01903/v1.1.1#}CommitmentTypeQualifiersListType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CommitmentTypeIndicationType", propOrder = { + "commitmentTypeId", + "objectReference", + "allSignedDataObjects", + "commitmentTypeQualifiers" +}) +public class CommitmentTypeIndicationType { + + @XmlElement(name = "CommitmentTypeId", required = true) + protected ObjectIdentifierType commitmentTypeId; + @XmlElement(name = "ObjectReference") + @XmlSchemaType(name = "anyURI") + protected List objectReference; + @XmlElement(name = "AllSignedDataObjects") + protected Object allSignedDataObjects; + @XmlElement(name = "CommitmentTypeQualifiers") + protected CommitmentTypeQualifiersListType commitmentTypeQualifiers; + + /** + * Gets the value of the commitmentTypeId property. + * + * @return + * possible object is + * {@link ObjectIdentifierType } + * + */ + public ObjectIdentifierType getCommitmentTypeId() { + return commitmentTypeId; + } + + /** + * Sets the value of the commitmentTypeId property. + * + * @param value + * allowed object is + * {@link ObjectIdentifierType } + * + */ + public void setCommitmentTypeId(ObjectIdentifierType value) { + this.commitmentTypeId = value; + } + + /** + * Gets the value of the objectReference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the objectReference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getObjectReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getObjectReference() { + if (objectReference == null) { + objectReference = new ArrayList(); + } + return this.objectReference; + } + + /** + * Gets the value of the allSignedDataObjects property. + * + * @return + * possible object is + * {@link Object } + * + */ + public Object getAllSignedDataObjects() { + return allSignedDataObjects; + } + + /** + * Sets the value of the allSignedDataObjects property. + * + * @param value + * allowed object is + * {@link Object } + * + */ + public void setAllSignedDataObjects(Object value) { + this.allSignedDataObjects = value; + } + + /** + * Gets the value of the commitmentTypeQualifiers property. + * + * @return + * possible object is + * {@link CommitmentTypeQualifiersListType } + * + */ + public CommitmentTypeQualifiersListType getCommitmentTypeQualifiers() { + return commitmentTypeQualifiers; + } + + /** + * Sets the value of the commitmentTypeQualifiers property. + * + * @param value + * allowed object is + * {@link CommitmentTypeQualifiersListType } + * + */ + public void setCommitmentTypeQualifiers(CommitmentTypeQualifiersListType value) { + this.commitmentTypeQualifiers = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeQualifiersListType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeQualifiersListType.java new file mode 100644 index 00000000..66abdc7c --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CommitmentTypeQualifiersListType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CommitmentTypeQualifiersListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CommitmentTypeQualifiersListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CommitmentTypeQualifier" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CommitmentTypeQualifiersListType", propOrder = { + "commitmentTypeQualifier" +}) +public class CommitmentTypeQualifiersListType { + + @XmlElement(name = "CommitmentTypeQualifier") + protected List commitmentTypeQualifier; + + /** + * Gets the value of the commitmentTypeQualifier property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the commitmentTypeQualifier property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCommitmentTypeQualifier().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * + * + */ + public List getCommitmentTypeQualifier() { + if (commitmentTypeQualifier == null) { + commitmentTypeQualifier = new ArrayList(); + } + return this.commitmentTypeQualifier; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteCertificateRefsType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteCertificateRefsType.java new file mode 100644 index 00000000..c9fa3e53 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteCertificateRefsType.java @@ -0,0 +1,120 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CompleteCertificateRefsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CompleteCertificateRefsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CertRefs" type="{http://uri.etsi.org/01903/v1.1.1#}CertIDListType"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CompleteCertificateRefsType", propOrder = { + "certRefs" +}) +public class CompleteCertificateRefsType { + + @XmlElement(name = "CertRefs", required = true) + protected CertIDListType certRefs; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the certRefs property. + * + * @return + * possible object is + * {@link CertIDListType } + * + */ + public CertIDListType getCertRefs() { + return certRefs; + } + + /** + * Sets the value of the certRefs property. + * + * @param value + * allowed object is + * {@link CertIDListType } + * + */ + public void setCertRefs(CertIDListType value) { + this.certRefs = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteRevocationRefsType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteRevocationRefsType.java new file mode 100644 index 00000000..d74d3a64 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CompleteRevocationRefsType.java @@ -0,0 +1,176 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CompleteRevocationRefsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CompleteRevocationRefsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CRLRefs" type="{http://uri.etsi.org/01903/v1.1.1#}CRLRefsType" minOccurs="0"/>
+ *         <element name="OCSPRefs" type="{http://uri.etsi.org/01903/v1.1.1#}OCSPRefsType" minOccurs="0"/>
+ *         <element name="OtherRefs" type="{http://uri.etsi.org/01903/v1.1.1#}OtherCertStatusRefsType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CompleteRevocationRefsType", propOrder = { + "crlRefs", + "ocspRefs", + "otherRefs" +}) +public class CompleteRevocationRefsType { + + @XmlElement(name = "CRLRefs") + protected CRLRefsType crlRefs; + @XmlElement(name = "OCSPRefs") + protected OCSPRefsType ocspRefs; + @XmlElement(name = "OtherRefs") + protected OtherCertStatusRefsType otherRefs; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the crlRefs property. + * + * @return + * possible object is + * {@link CRLRefsType } + * + */ + public CRLRefsType getCRLRefs() { + return crlRefs; + } + + /** + * Sets the value of the crlRefs property. + * + * @param value + * allowed object is + * {@link CRLRefsType } + * + */ + public void setCRLRefs(CRLRefsType value) { + this.crlRefs = value; + } + + /** + * Gets the value of the ocspRefs property. + * + * @return + * possible object is + * {@link OCSPRefsType } + * + */ + public OCSPRefsType getOCSPRefs() { + return ocspRefs; + } + + /** + * Sets the value of the ocspRefs property. + * + * @param value + * allowed object is + * {@link OCSPRefsType } + * + */ + public void setOCSPRefs(OCSPRefsType value) { + this.ocspRefs = value; + } + + /** + * Gets the value of the otherRefs property. + * + * @return + * possible object is + * {@link OtherCertStatusRefsType } + * + */ + public OtherCertStatusRefsType getOtherRefs() { + return otherRefs; + } + + /** + * Sets the value of the otherRefs property. + * + * @param value + * allowed object is + * {@link OtherCertStatusRefsType } + * + */ + public void setOtherRefs(OtherCertStatusRefsType value) { + this.otherRefs = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/CounterSignatureType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CounterSignatureType.java new file mode 100644 index 00000000..c4fa9649 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/CounterSignatureType.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.SignatureType; + + +/** + *

Java class for CounterSignatureType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CounterSignatureType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CounterSignatureType", propOrder = { + "signature" +}) +public class CounterSignatureType { + + @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) + protected SignatureType signature; + + /** + * Gets the value of the signature property. + * + * @return + * possible object is + * {@link SignatureType } + * + */ + public SignatureType getSignature() { + return signature; + } + + /** + * Sets the value of the signature property. + * + * @param value + * allowed object is + * {@link SignatureType } + * + */ + public void setSignature(SignatureType value) { + this.signature = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/DataObjectFormatType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/DataObjectFormatType.java new file mode 100644 index 00000000..bd446353 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/DataObjectFormatType.java @@ -0,0 +1,200 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DataObjectFormatType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DataObjectFormatType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="ObjectIdentifier" type="{http://uri.etsi.org/01903/v1.1.1#}ObjectIdentifierType" minOccurs="0"/>
+ *         <element name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ObjectReference" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DataObjectFormatType", propOrder = { + "description", + "objectIdentifier", + "mimeType", + "encoding" +}) +public class DataObjectFormatType { + + @XmlElement(name = "Description") + protected String description; + @XmlElement(name = "ObjectIdentifier") + protected ObjectIdentifierType objectIdentifier; + @XmlElement(name = "MimeType") + protected String mimeType; + @XmlElement(name = "Encoding") + @XmlSchemaType(name = "anyURI") + protected String encoding; + @XmlAttribute(name = "ObjectReference", required = true) + @XmlSchemaType(name = "anyURI") + protected String objectReference; + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the objectIdentifier property. + * + * @return + * possible object is + * {@link ObjectIdentifierType } + * + */ + public ObjectIdentifierType getObjectIdentifier() { + return objectIdentifier; + } + + /** + * Sets the value of the objectIdentifier property. + * + * @param value + * allowed object is + * {@link ObjectIdentifierType } + * + */ + public void setObjectIdentifier(ObjectIdentifierType value) { + this.objectIdentifier = value; + } + + /** + * Gets the value of the mimeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * Sets the value of the mimeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMimeType(String value) { + this.mimeType = value; + } + + /** + * Gets the value of the encoding property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncoding() { + return encoding; + } + + /** + * Sets the value of the encoding property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncoding(String value) { + this.encoding = value; + } + + /** + * Gets the value of the objectReference property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getObjectReference() { + return objectReference; + } + + /** + * Sets the value of the objectReference property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObjectReference(String value) { + this.objectReference = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/DigestAlgAndValueType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/DigestAlgAndValueType.java new file mode 100644 index 00000000..a688901d --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/DigestAlgAndValueType.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.DigestMethodType; + + +/** + *

Java class for DigestAlgAndValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DigestAlgAndValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DigestMethod" type="{http://www.w3.org/2000/09/xmldsig#}DigestMethodType"/>
+ *         <element name="DigestValue" type="{http://www.w3.org/2000/09/xmldsig#}DigestValueType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DigestAlgAndValueType", propOrder = { + "digestMethod", + "digestValue" +}) +public class DigestAlgAndValueType { + + @XmlElement(name = "DigestMethod", required = true) + protected DigestMethodType digestMethod; + @XmlElement(name = "DigestValue", required = true) + protected byte[] digestValue; + + /** + * Gets the value of the digestMethod property. + * + * @return + * possible object is + * {@link DigestMethodType } + * + */ + public DigestMethodType getDigestMethod() { + return digestMethod; + } + + /** + * Sets the value of the digestMethod property. + * + * @param value + * allowed object is + * {@link DigestMethodType } + * + */ + public void setDigestMethod(DigestMethodType value) { + this.digestMethod = value; + } + + /** + * Gets the value of the digestValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getDigestValue() { + return digestValue; + } + + /** + * Sets the value of the digestValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setDigestValue(byte[] value) { + this.digestValue = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/DocumentationReferencesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/DocumentationReferencesType.java new file mode 100644 index 00000000..3fae0974 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/DocumentationReferencesType.java @@ -0,0 +1,94 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DocumentationReferencesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DocumentationReferencesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <element name="DocumentationReference" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DocumentationReferencesType", propOrder = { + "documentationReference" +}) +public class DocumentationReferencesType { + + @XmlElement(name = "DocumentationReference", required = true) + @XmlSchemaType(name = "anyURI") + protected List documentationReference; + + /** + * Gets the value of the documentationReference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the documentationReference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDocumentationReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getDocumentationReference() { + if (documentationReference == null) { + documentationReference = new ArrayList(); + } + return this.documentationReference; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/EncapsulatedPKIDataType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/EncapsulatedPKIDataType.java new file mode 100644 index 00000000..4403e9d9 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/EncapsulatedPKIDataType.java @@ -0,0 +1,115 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for EncapsulatedPKIDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncapsulatedPKIDataType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncapsulatedPKIDataType", propOrder = { + "value" +}) +public class EncapsulatedPKIDataType { + + @XmlValue + protected byte[] value; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * byte[] + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/HashDataInfoType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/HashDataInfoType.java new file mode 100644 index 00000000..5f331d8b --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/HashDataInfoType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.TransformsType; + + +/** + *

Java class for HashDataInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="HashDataInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Transforms" type="{http://www.w3.org/2000/09/xmldsig#}TransformsType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "HashDataInfoType", propOrder = { + "transforms" +}) +public class HashDataInfoType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlAttribute(required = true) + @XmlSchemaType(name = "anyURI") + protected String uri; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUri() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUri(String value) { + this.uri = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/IdentifierType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/IdentifierType.java new file mode 100644 index 00000000..2153501d --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/IdentifierType.java @@ -0,0 +1,112 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for IdentifierType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="IdentifierType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
+ *       <attribute name="Qualifier" type="{http://uri.etsi.org/01903/v1.1.1#}QualifierType" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "IdentifierType", propOrder = { + "value" +}) +public class IdentifierType { + + @XmlValue + @XmlSchemaType(name = "anyURI") + protected String value; + @XmlAttribute(name = "Qualifier") + protected QualifierType qualifier; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the qualifier property. + * + * @return + * possible object is + * {@link QualifierType } + * + */ + public QualifierType getQualifier() { + return qualifier; + } + + /** + * Sets the value of the qualifier property. + * + * @param value + * allowed object is + * {@link QualifierType } + * + */ + public void setQualifier(QualifierType value) { + this.qualifier = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/IntegerListType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/IntegerListType.java new file mode 100644 index 00000000..cdb257b2 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/IntegerListType.java @@ -0,0 +1,93 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for IntegerListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="IntegerListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="int" type="{http://www.w3.org/2001/XMLSchema}integer" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "IntegerListType", propOrder = { + "_int" +}) +public class IntegerListType { + + @XmlElement(name = "int") + protected List _int; + + /** + * Gets the value of the int property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the int property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getInt().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BigInteger } + * + * + */ + public List getInt() { + if (_int == null) { + _int = new ArrayList(); + } + return this._int; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/NoticeReferenceType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/NoticeReferenceType.java new file mode 100644 index 00000000..240896b2 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/NoticeReferenceType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for NoticeReferenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="NoticeReferenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Organization" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="NoticeNumbers" type="{http://uri.etsi.org/01903/v1.1.1#}IntegerListType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "NoticeReferenceType", propOrder = { + "organization", + "noticeNumbers" +}) +public class NoticeReferenceType { + + @XmlElement(name = "Organization", required = true) + protected String organization; + @XmlElement(name = "NoticeNumbers", required = true) + protected IntegerListType noticeNumbers; + + /** + * Gets the value of the organization property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOrganization() { + return organization; + } + + /** + * Sets the value of the organization property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOrganization(String value) { + this.organization = value; + } + + /** + * Gets the value of the noticeNumbers property. + * + * @return + * possible object is + * {@link IntegerListType } + * + */ + public IntegerListType getNoticeNumbers() { + return noticeNumbers; + } + + /** + * Sets the value of the noticeNumbers property. + * + * @param value + * allowed object is + * {@link IntegerListType } + * + */ + public void setNoticeNumbers(IntegerListType value) { + this.noticeNumbers = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPIdentifierType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPIdentifierType.java new file mode 100644 index 00000000..e0fc6de4 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPIdentifierType.java @@ -0,0 +1,145 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for OCSPIdentifierType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OCSPIdentifierType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ResponderID" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="ProducedAt" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
+ *       </sequence>
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OCSPIdentifierType", propOrder = { + "responderID", + "producedAt" +}) +public class OCSPIdentifierType { + + @XmlElement(name = "ResponderID", required = true) + protected String responderID; + @XmlElement(name = "ProducedAt", required = true) + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar producedAt; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + + /** + * Gets the value of the responderID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getResponderID() { + return responderID; + } + + /** + * Sets the value of the responderID property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setResponderID(String value) { + this.responderID = value; + } + + /** + * Gets the value of the producedAt property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getProducedAt() { + return producedAt; + } + + /** + * Sets the value of the producedAt property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setProducedAt(XMLGregorianCalendar value) { + this.producedAt = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefType.java new file mode 100644 index 00000000..8ba2676c --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OCSPRefType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OCSPRefType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OCSPIdentifier" type="{http://uri.etsi.org/01903/v1.1.1#}OCSPIdentifierType"/>
+ *         <element name="DigestAlgAndValue" type="{http://uri.etsi.org/01903/v1.1.1#}DigestAlgAndValueType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OCSPRefType", propOrder = { + "ocspIdentifier", + "digestAlgAndValue" +}) +public class OCSPRefType { + + @XmlElement(name = "OCSPIdentifier", required = true) + protected OCSPIdentifierType ocspIdentifier; + @XmlElement(name = "DigestAlgAndValue") + protected DigestAlgAndValueType digestAlgAndValue; + + /** + * Gets the value of the ocspIdentifier property. + * + * @return + * possible object is + * {@link OCSPIdentifierType } + * + */ + public OCSPIdentifierType getOCSPIdentifier() { + return ocspIdentifier; + } + + /** + * Sets the value of the ocspIdentifier property. + * + * @param value + * allowed object is + * {@link OCSPIdentifierType } + * + */ + public void setOCSPIdentifier(OCSPIdentifierType value) { + this.ocspIdentifier = value; + } + + /** + * Gets the value of the digestAlgAndValue property. + * + * @return + * possible object is + * {@link DigestAlgAndValueType } + * + */ + public DigestAlgAndValueType getDigestAlgAndValue() { + return digestAlgAndValue; + } + + /** + * Sets the value of the digestAlgAndValue property. + * + * @param value + * allowed object is + * {@link DigestAlgAndValueType } + * + */ + public void setDigestAlgAndValue(DigestAlgAndValueType value) { + this.digestAlgAndValue = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefsType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefsType.java new file mode 100644 index 00000000..6e1459af --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPRefsType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OCSPRefsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OCSPRefsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OCSPRef" type="{http://uri.etsi.org/01903/v1.1.1#}OCSPRefType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OCSPRefsType", propOrder = { + "ocspRef" +}) +public class OCSPRefsType { + + @XmlElement(name = "OCSPRef", required = true) + protected List ocspRef; + + /** + * Gets the value of the ocspRef property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ocspRef property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOCSPRef().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link OCSPRefType } + * + * + */ + public List getOCSPRef() { + if (ocspRef == null) { + ocspRef = new ArrayList(); + } + return this.ocspRef; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPValuesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPValuesType.java new file mode 100644 index 00000000..0e1d8550 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OCSPValuesType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OCSPValuesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OCSPValuesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EncapsulatedOCSPValue" type="{http://uri.etsi.org/01903/v1.1.1#}EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OCSPValuesType", propOrder = { + "encapsulatedOCSPValue" +}) +public class OCSPValuesType { + + @XmlElement(name = "EncapsulatedOCSPValue", required = true) + protected List encapsulatedOCSPValue; + + /** + * Gets the value of the encapsulatedOCSPValue property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the encapsulatedOCSPValue property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEncapsulatedOCSPValue().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EncapsulatedPKIDataType } + * + * + */ + public List getEncapsulatedOCSPValue() { + if (encapsulatedOCSPValue == null) { + encapsulatedOCSPValue = new ArrayList(); + } + return this.encapsulatedOCSPValue; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectFactory.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectFactory.java new file mode 100644 index 00000000..f54e6aa2 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectFactory.java @@ -0,0 +1,755 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.etsi.uri._01903.v1_1 package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _RevocationValues_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "RevocationValues"); + private final static QName _SignerRole_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignerRole"); + private final static QName _AllDataObjectsTimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "AllDataObjectsTimeStamp"); + private final static QName _TimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "TimeStamp"); + private final static QName _UnsignedSignatureProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "UnsignedSignatureProperties"); + private final static QName _CommitmentTypeIndication_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "CommitmentTypeIndication"); + private final static QName _EncapsulatedPKIData_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "EncapsulatedPKIData"); + private final static QName _SignatureProductionPlace_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignatureProductionPlace"); + private final static QName _SignedProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignedProperties"); + private final static QName _CompleteCertificateRefs_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "CompleteCertificateRefs"); + private final static QName _DataObjectFormat_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "DataObjectFormat"); + private final static QName _SigAndRefsTimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SigAndRefsTimeStamp"); + private final static QName _SigningTime_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SigningTime"); + private final static QName _Any_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "Any"); + private final static QName _SignaturePolicyIdentifier_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignaturePolicyIdentifier"); + private final static QName _CertificateValues_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "CertificateValues"); + private final static QName _QualifyingPropertiesReference_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "QualifyingPropertiesReference"); + private final static QName _SignedSignatureProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignedSignatureProperties"); + private final static QName _ObjectIdentifier_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "ObjectIdentifier"); + private final static QName _CompleteRevocationRefs_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "CompleteRevocationRefs"); + private final static QName _UnsignedProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "UnsignedProperties"); + private final static QName _SPUserNotice_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SPUserNotice"); + private final static QName _ArchiveTimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "ArchiveTimeStamp"); + private final static QName _UnsignedDataObjectProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "UnsignedDataObjectProperties"); + private final static QName _SignatureTimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignatureTimeStamp"); + private final static QName _IndividualDataObjectsTimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "IndividualDataObjectsTimeStamp"); + private final static QName _SigningCertificate_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SigningCertificate"); + private final static QName _CounterSignature_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "CounterSignature"); + private final static QName _QualifyingProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "QualifyingProperties"); + private final static QName _SignedDataObjectProperties_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SignedDataObjectProperties"); + private final static QName _SPURI_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "SPURI"); + private final static QName _RefsOnlyTimeStamp_QNAME = new QName("http://uri.etsi.org/01903/v1.1.1#", "RefsOnlyTimeStamp"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.etsi.uri._01903.v1_1 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CertIDType } + * + */ + public CertIDType createCertIDType() { + return new CertIDType(); + } + + /** + * Create an instance of {@link CRLValuesType } + * + */ + public CRLValuesType createCRLValuesType() { + return new CRLValuesType(); + } + + /** + * Create an instance of {@link OCSPIdentifierType } + * + */ + public OCSPIdentifierType createOCSPIdentifierType() { + return new OCSPIdentifierType(); + } + + /** + * Create an instance of {@link OCSPRefType } + * + */ + public OCSPRefType createOCSPRefType() { + return new OCSPRefType(); + } + + /** + * Create an instance of {@link UnsignedSignaturePropertiesType } + * + */ + public UnsignedSignaturePropertiesType createUnsignedSignaturePropertiesType() { + return new UnsignedSignaturePropertiesType(); + } + + /** + * Create an instance of {@link SignaturePolicyIdentifierType } + * + */ + public SignaturePolicyIdentifierType createSignaturePolicyIdentifierType() { + return new SignaturePolicyIdentifierType(); + } + + /** + * Create an instance of {@link UnsignedDataObjectPropertiesType } + * + */ + public UnsignedDataObjectPropertiesType createUnsignedDataObjectPropertiesType() { + return new UnsignedDataObjectPropertiesType(); + } + + /** + * Create an instance of {@link CompleteCertificateRefsType } + * + */ + public CompleteCertificateRefsType createCompleteCertificateRefsType() { + return new CompleteCertificateRefsType(); + } + + /** + * Create an instance of {@link OtherCertStatusRefsType } + * + */ + public OtherCertStatusRefsType createOtherCertStatusRefsType() { + return new OtherCertStatusRefsType(); + } + + /** + * Create an instance of {@link CommitmentTypeIndicationType } + * + */ + public CommitmentTypeIndicationType createCommitmentTypeIndicationType() { + return new CommitmentTypeIndicationType(); + } + + /** + * Create an instance of {@link DataObjectFormatType } + * + */ + public DataObjectFormatType createDataObjectFormatType() { + return new DataObjectFormatType(); + } + + /** + * Create an instance of {@link CertifiedRolesListType } + * + */ + public CertifiedRolesListType createCertifiedRolesListType() { + return new CertifiedRolesListType(); + } + + /** + * Create an instance of {@link QualifyingPropertiesReferenceType } + * + */ + public QualifyingPropertiesReferenceType createQualifyingPropertiesReferenceType() { + return new QualifyingPropertiesReferenceType(); + } + + /** + * Create an instance of {@link NoticeReferenceType } + * + */ + public NoticeReferenceType createNoticeReferenceType() { + return new NoticeReferenceType(); + } + + /** + * Create an instance of {@link SignaturePolicyIdType } + * + */ + public SignaturePolicyIdType createSignaturePolicyIdType() { + return new SignaturePolicyIdType(); + } + + /** + * Create an instance of {@link CertIDListType } + * + */ + public CertIDListType createCertIDListType() { + return new CertIDListType(); + } + + /** + * Create an instance of {@link HashDataInfoType } + * + */ + public HashDataInfoType createHashDataInfoType() { + return new HashDataInfoType(); + } + + /** + * Create an instance of {@link ClaimedRolesListType } + * + */ + public ClaimedRolesListType createClaimedRolesListType() { + return new ClaimedRolesListType(); + } + + /** + * Create an instance of {@link SPUserNoticeType } + * + */ + public SPUserNoticeType createSPUserNoticeType() { + return new SPUserNoticeType(); + } + + /** + * Create an instance of {@link OCSPValuesType } + * + */ + public OCSPValuesType createOCSPValuesType() { + return new OCSPValuesType(); + } + + /** + * Create an instance of {@link SignatureProductionPlaceType } + * + */ + public SignatureProductionPlaceType createSignatureProductionPlaceType() { + return new SignatureProductionPlaceType(); + } + + /** + * Create an instance of {@link SignaturePolicyIdentifierType.SignaturePolicyImplied } + * + */ + public SignaturePolicyIdentifierType.SignaturePolicyImplied createSignaturePolicyIdentifierTypeSignaturePolicyImplied() { + return new SignaturePolicyIdentifierType.SignaturePolicyImplied(); + } + + /** + * Create an instance of {@link EncapsulatedPKIDataType } + * + */ + public EncapsulatedPKIDataType createEncapsulatedPKIDataType() { + return new EncapsulatedPKIDataType(); + } + + /** + * Create an instance of {@link QualifyingPropertiesType } + * + */ + public QualifyingPropertiesType createQualifyingPropertiesType() { + return new QualifyingPropertiesType(); + } + + /** + * Create an instance of {@link IntegerListType } + * + */ + public IntegerListType createIntegerListType() { + return new IntegerListType(); + } + + /** + * Create an instance of {@link SignedPropertiesType } + * + */ + public SignedPropertiesType createSignedPropertiesType() { + return new SignedPropertiesType(); + } + + /** + * Create an instance of {@link SigPolicyQualifiersListType } + * + */ + public SigPolicyQualifiersListType createSigPolicyQualifiersListType() { + return new SigPolicyQualifiersListType(); + } + + /** + * Create an instance of {@link ObjectIdentifierType } + * + */ + public ObjectIdentifierType createObjectIdentifierType() { + return new ObjectIdentifierType(); + } + + /** + * Create an instance of {@link RevocationValuesType } + * + */ + public RevocationValuesType createRevocationValuesType() { + return new RevocationValuesType(); + } + + /** + * Create an instance of {@link SignedSignaturePropertiesType } + * + */ + public SignedSignaturePropertiesType createSignedSignaturePropertiesType() { + return new SignedSignaturePropertiesType(); + } + + /** + * Create an instance of {@link CompleteRevocationRefsType } + * + */ + public CompleteRevocationRefsType createCompleteRevocationRefsType() { + return new CompleteRevocationRefsType(); + } + + /** + * Create an instance of {@link SignerRoleType } + * + */ + public SignerRoleType createSignerRoleType() { + return new SignerRoleType(); + } + + /** + * Create an instance of {@link CRLRefType } + * + */ + public CRLRefType createCRLRefType() { + return new CRLRefType(); + } + + /** + * Create an instance of {@link SignedDataObjectPropertiesType } + * + */ + public SignedDataObjectPropertiesType createSignedDataObjectPropertiesType() { + return new SignedDataObjectPropertiesType(); + } + + /** + * Create an instance of {@link CRLRefsType } + * + */ + public CRLRefsType createCRLRefsType() { + return new CRLRefsType(); + } + + /** + * Create an instance of {@link TimeStampType } + * + */ + public TimeStampType createTimeStampType() { + return new TimeStampType(); + } + + /** + * Create an instance of {@link CommitmentTypeQualifiersListType } + * + */ + public CommitmentTypeQualifiersListType createCommitmentTypeQualifiersListType() { + return new CommitmentTypeQualifiersListType(); + } + + /** + * Create an instance of {@link OtherCertStatusValuesType } + * + */ + public OtherCertStatusValuesType createOtherCertStatusValuesType() { + return new OtherCertStatusValuesType(); + } + + /** + * Create an instance of {@link DocumentationReferencesType } + * + */ + public DocumentationReferencesType createDocumentationReferencesType() { + return new DocumentationReferencesType(); + } + + /** + * Create an instance of {@link OCSPRefsType } + * + */ + public OCSPRefsType createOCSPRefsType() { + return new OCSPRefsType(); + } + + /** + * Create an instance of {@link AnyType } + * + */ + public AnyType createAnyType() { + return new AnyType(); + } + + /** + * Create an instance of {@link CertificateValuesType } + * + */ + public CertificateValuesType createCertificateValuesType() { + return new CertificateValuesType(); + } + + /** + * Create an instance of {@link CRLIdentifierType } + * + */ + public CRLIdentifierType createCRLIdentifierType() { + return new CRLIdentifierType(); + } + + /** + * Create an instance of {@link CounterSignatureType } + * + */ + public CounterSignatureType createCounterSignatureType() { + return new CounterSignatureType(); + } + + /** + * Create an instance of {@link IdentifierType } + * + */ + public IdentifierType createIdentifierType() { + return new IdentifierType(); + } + + /** + * Create an instance of {@link UnsignedPropertiesType } + * + */ + public UnsignedPropertiesType createUnsignedPropertiesType() { + return new UnsignedPropertiesType(); + } + + /** + * Create an instance of {@link DigestAlgAndValueType } + * + */ + public DigestAlgAndValueType createDigestAlgAndValueType() { + return new DigestAlgAndValueType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RevocationValuesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "RevocationValues") + public JAXBElement createRevocationValues(RevocationValuesType value) { + return new JAXBElement(_RevocationValues_QNAME, RevocationValuesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignerRoleType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignerRole") + public JAXBElement createSignerRole(SignerRoleType value) { + return new JAXBElement(_SignerRole_QNAME, SignerRoleType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "AllDataObjectsTimeStamp") + public JAXBElement createAllDataObjectsTimeStamp(TimeStampType value) { + return new JAXBElement(_AllDataObjectsTimeStamp_QNAME, TimeStampType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "TimeStamp") + public JAXBElement createTimeStamp(TimeStampType value) { + return new JAXBElement(_TimeStamp_QNAME, TimeStampType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link UnsignedSignaturePropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "UnsignedSignatureProperties") + public JAXBElement createUnsignedSignatureProperties(UnsignedSignaturePropertiesType value) { + return new JAXBElement(_UnsignedSignatureProperties_QNAME, UnsignedSignaturePropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CommitmentTypeIndicationType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "CommitmentTypeIndication") + public JAXBElement createCommitmentTypeIndication(CommitmentTypeIndicationType value) { + return new JAXBElement(_CommitmentTypeIndication_QNAME, CommitmentTypeIndicationType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EncapsulatedPKIDataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "EncapsulatedPKIData") + public JAXBElement createEncapsulatedPKIData(EncapsulatedPKIDataType value) { + return new JAXBElement(_EncapsulatedPKIData_QNAME, EncapsulatedPKIDataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureProductionPlaceType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignatureProductionPlace") + public JAXBElement createSignatureProductionPlace(SignatureProductionPlaceType value) { + return new JAXBElement(_SignatureProductionPlace_QNAME, SignatureProductionPlaceType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignedPropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignedProperties") + public JAXBElement createSignedProperties(SignedPropertiesType value) { + return new JAXBElement(_SignedProperties_QNAME, SignedPropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CompleteCertificateRefsType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "CompleteCertificateRefs") + public JAXBElement createCompleteCertificateRefs(CompleteCertificateRefsType value) { + return new JAXBElement(_CompleteCertificateRefs_QNAME, CompleteCertificateRefsType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DataObjectFormatType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "DataObjectFormat") + public JAXBElement createDataObjectFormat(DataObjectFormatType value) { + return new JAXBElement(_DataObjectFormat_QNAME, DataObjectFormatType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SigAndRefsTimeStamp") + public JAXBElement createSigAndRefsTimeStamp(TimeStampType value) { + return new JAXBElement(_SigAndRefsTimeStamp_QNAME, TimeStampType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SigningTime") + public JAXBElement createSigningTime(XMLGregorianCalendar value) { + return new JAXBElement(_SigningTime_QNAME, XMLGregorianCalendar.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AnyType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "Any") + public JAXBElement createAny(AnyType value) { + return new JAXBElement(_Any_QNAME, AnyType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePolicyIdentifierType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignaturePolicyIdentifier") + public JAXBElement createSignaturePolicyIdentifier(SignaturePolicyIdentifierType value) { + return new JAXBElement(_SignaturePolicyIdentifier_QNAME, SignaturePolicyIdentifierType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CertificateValuesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "CertificateValues") + public JAXBElement createCertificateValues(CertificateValuesType value) { + return new JAXBElement(_CertificateValues_QNAME, CertificateValuesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link QualifyingPropertiesReferenceType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "QualifyingPropertiesReference") + public JAXBElement createQualifyingPropertiesReference(QualifyingPropertiesReferenceType value) { + return new JAXBElement(_QualifyingPropertiesReference_QNAME, QualifyingPropertiesReferenceType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignedSignaturePropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignedSignatureProperties") + public JAXBElement createSignedSignatureProperties(SignedSignaturePropertiesType value) { + return new JAXBElement(_SignedSignatureProperties_QNAME, SignedSignaturePropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ObjectIdentifierType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "ObjectIdentifier") + public JAXBElement createObjectIdentifier(ObjectIdentifierType value) { + return new JAXBElement(_ObjectIdentifier_QNAME, ObjectIdentifierType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CompleteRevocationRefsType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "CompleteRevocationRefs") + public JAXBElement createCompleteRevocationRefs(CompleteRevocationRefsType value) { + return new JAXBElement(_CompleteRevocationRefs_QNAME, CompleteRevocationRefsType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link UnsignedPropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "UnsignedProperties") + public JAXBElement createUnsignedProperties(UnsignedPropertiesType value) { + return new JAXBElement(_UnsignedProperties_QNAME, UnsignedPropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SPUserNoticeType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SPUserNotice") + public JAXBElement createSPUserNotice(SPUserNoticeType value) { + return new JAXBElement(_SPUserNotice_QNAME, SPUserNoticeType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "ArchiveTimeStamp") + public JAXBElement createArchiveTimeStamp(TimeStampType value) { + return new JAXBElement(_ArchiveTimeStamp_QNAME, TimeStampType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link UnsignedDataObjectPropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "UnsignedDataObjectProperties") + public JAXBElement createUnsignedDataObjectProperties(UnsignedDataObjectPropertiesType value) { + return new JAXBElement(_UnsignedDataObjectProperties_QNAME, UnsignedDataObjectPropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignatureTimeStamp") + public JAXBElement createSignatureTimeStamp(TimeStampType value) { + return new JAXBElement(_SignatureTimeStamp_QNAME, TimeStampType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "IndividualDataObjectsTimeStamp") + public JAXBElement createIndividualDataObjectsTimeStamp(TimeStampType value) { + return new JAXBElement(_IndividualDataObjectsTimeStamp_QNAME, TimeStampType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CertIDListType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SigningCertificate") + public JAXBElement createSigningCertificate(CertIDListType value) { + return new JAXBElement(_SigningCertificate_QNAME, CertIDListType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CounterSignatureType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "CounterSignature") + public JAXBElement createCounterSignature(CounterSignatureType value) { + return new JAXBElement(_CounterSignature_QNAME, CounterSignatureType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link QualifyingPropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "QualifyingProperties") + public JAXBElement createQualifyingProperties(QualifyingPropertiesType value) { + return new JAXBElement(_QualifyingProperties_QNAME, QualifyingPropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignedDataObjectPropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SignedDataObjectProperties") + public JAXBElement createSignedDataObjectProperties(SignedDataObjectPropertiesType value) { + return new JAXBElement(_SignedDataObjectProperties_QNAME, SignedDataObjectPropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "SPURI") + public JAXBElement createSPURI(String value) { + return new JAXBElement(_SPURI_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TimeStampType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.1.1#", name = "RefsOnlyTimeStamp") + public JAXBElement createRefsOnlyTimeStamp(TimeStampType value) { + return new JAXBElement(_RefsOnlyTimeStamp_QNAME, TimeStampType.class, null, value); + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectIdentifierType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectIdentifierType.java new file mode 100644 index 00000000..1e655033 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/ObjectIdentifierType.java @@ -0,0 +1,141 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ObjectIdentifierType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ObjectIdentifierType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Identifier" type="{http://uri.etsi.org/01903/v1.1.1#}IdentifierType"/>
+ *         <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="DocumentationReferences" type="{http://uri.etsi.org/01903/v1.1.1#}DocumentationReferencesType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ObjectIdentifierType", propOrder = { + "identifier", + "description", + "documentationReferences" +}) +public class ObjectIdentifierType { + + @XmlElement(name = "Identifier", required = true) + protected IdentifierType identifier; + @XmlElement(name = "Description") + protected String description; + @XmlElement(name = "DocumentationReferences") + protected DocumentationReferencesType documentationReferences; + + /** + * Gets the value of the identifier property. + * + * @return + * possible object is + * {@link IdentifierType } + * + */ + public IdentifierType getIdentifier() { + return identifier; + } + + /** + * Sets the value of the identifier property. + * + * @param value + * allowed object is + * {@link IdentifierType } + * + */ + public void setIdentifier(IdentifierType value) { + this.identifier = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the documentationReferences property. + * + * @return + * possible object is + * {@link DocumentationReferencesType } + * + */ + public DocumentationReferencesType getDocumentationReferences() { + return documentationReferences; + } + + /** + * Sets the value of the documentationReferences property. + * + * @param value + * allowed object is + * {@link DocumentationReferencesType } + * + */ + public void setDocumentationReferences(DocumentationReferencesType value) { + this.documentationReferences = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusRefsType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusRefsType.java new file mode 100644 index 00000000..5ebd88a0 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusRefsType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OtherCertStatusRefsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OtherCertStatusRefsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OtherRef" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OtherCertStatusRefsType", propOrder = { + "otherRef" +}) +public class OtherCertStatusRefsType { + + @XmlElement(name = "OtherRef", required = true) + protected List otherRef; + + /** + * Gets the value of the otherRef property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the otherRef property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOtherRef().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * + * + */ + public List getOtherRef() { + if (otherRef == null) { + otherRef = new ArrayList(); + } + return this.otherRef; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusValuesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusValuesType.java new file mode 100644 index 00000000..3b51d27b --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/OtherCertStatusValuesType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OtherCertStatusValuesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OtherCertStatusValuesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OtherValue" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OtherCertStatusValuesType", propOrder = { + "otherValue" +}) +public class OtherCertStatusValuesType { + + @XmlElement(name = "OtherValue", required = true) + protected List otherValue; + + /** + * Gets the value of the otherValue property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the otherValue property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOtherValue().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * + * + */ + public List getOtherValue() { + if (otherValue == null) { + otherValue = new ArrayList(); + } + return this.otherValue; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifierType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifierType.java new file mode 100644 index 00000000..7c659774 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifierType.java @@ -0,0 +1,74 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for QualifierType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="QualifierType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="OIDAsURI"/>
+ *     <enumeration value="OIDAsURN"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "QualifierType") +@XmlEnum +public enum QualifierType { + + @XmlEnumValue("OIDAsURI") + OID_AS_URI("OIDAsURI"), + @XmlEnumValue("OIDAsURN") + OID_AS_URN("OIDAsURN"); + private final String value; + + QualifierType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static QualifierType fromValue(String v) { + for (QualifierType c: QualifierType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesReferenceType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesReferenceType.java new file mode 100644 index 00000000..028b7d12 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesReferenceType.java @@ -0,0 +1,149 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3._2000._09.xmldsig_.TransformsType; + + +/** + *

Java class for QualifyingPropertiesReferenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="QualifyingPropertiesReferenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Transforms" type="{http://www.w3.org/2000/09/xmldsig#}TransformsType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="URI" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "QualifyingPropertiesReferenceType", propOrder = { + "transforms" +}) +public class QualifyingPropertiesReferenceType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlAttribute(name = "URI", required = true) + @XmlSchemaType(name = "anyURI") + protected String uri; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesType.java new file mode 100644 index 00000000..cdd76579 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/QualifyingPropertiesType.java @@ -0,0 +1,176 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for QualifyingPropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="QualifyingPropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignedProperties" type="{http://uri.etsi.org/01903/v1.1.1#}SignedPropertiesType" minOccurs="0"/>
+ *         <element name="UnsignedProperties" type="{http://uri.etsi.org/01903/v1.1.1#}UnsignedPropertiesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "QualifyingPropertiesType", propOrder = { + "signedProperties", + "unsignedProperties" +}) +public class QualifyingPropertiesType { + + @XmlElement(name = "SignedProperties") + protected SignedPropertiesType signedProperties; + @XmlElement(name = "UnsignedProperties") + protected UnsignedPropertiesType unsignedProperties; + @XmlAttribute(name = "Target", required = true) + @XmlSchemaType(name = "anyURI") + protected String target; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the signedProperties property. + * + * @return + * possible object is + * {@link SignedPropertiesType } + * + */ + public SignedPropertiesType getSignedProperties() { + return signedProperties; + } + + /** + * Sets the value of the signedProperties property. + * + * @param value + * allowed object is + * {@link SignedPropertiesType } + * + */ + public void setSignedProperties(SignedPropertiesType value) { + this.signedProperties = value; + } + + /** + * Gets the value of the unsignedProperties property. + * + * @return + * possible object is + * {@link UnsignedPropertiesType } + * + */ + public UnsignedPropertiesType getUnsignedProperties() { + return unsignedProperties; + } + + /** + * Sets the value of the unsignedProperties property. + * + * @param value + * allowed object is + * {@link UnsignedPropertiesType } + * + */ + public void setUnsignedProperties(UnsignedPropertiesType value) { + this.unsignedProperties = value; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/RevocationValuesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/RevocationValuesType.java new file mode 100644 index 00000000..36dfa0f4 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/RevocationValuesType.java @@ -0,0 +1,176 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for RevocationValuesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RevocationValuesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CRLValues" type="{http://uri.etsi.org/01903/v1.1.1#}CRLValuesType" minOccurs="0"/>
+ *         <element name="OCSPValues" type="{http://uri.etsi.org/01903/v1.1.1#}OCSPValuesType" minOccurs="0"/>
+ *         <element name="OtherValues" type="{http://uri.etsi.org/01903/v1.1.1#}OtherCertStatusValuesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RevocationValuesType", propOrder = { + "crlValues", + "ocspValues", + "otherValues" +}) +public class RevocationValuesType { + + @XmlElement(name = "CRLValues") + protected CRLValuesType crlValues; + @XmlElement(name = "OCSPValues") + protected OCSPValuesType ocspValues; + @XmlElement(name = "OtherValues") + protected OtherCertStatusValuesType otherValues; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the crlValues property. + * + * @return + * possible object is + * {@link CRLValuesType } + * + */ + public CRLValuesType getCRLValues() { + return crlValues; + } + + /** + * Sets the value of the crlValues property. + * + * @param value + * allowed object is + * {@link CRLValuesType } + * + */ + public void setCRLValues(CRLValuesType value) { + this.crlValues = value; + } + + /** + * Gets the value of the ocspValues property. + * + * @return + * possible object is + * {@link OCSPValuesType } + * + */ + public OCSPValuesType getOCSPValues() { + return ocspValues; + } + + /** + * Sets the value of the ocspValues property. + * + * @param value + * allowed object is + * {@link OCSPValuesType } + * + */ + public void setOCSPValues(OCSPValuesType value) { + this.ocspValues = value; + } + + /** + * Gets the value of the otherValues property. + * + * @return + * possible object is + * {@link OtherCertStatusValuesType } + * + */ + public OtherCertStatusValuesType getOtherValues() { + return otherValues; + } + + /** + * Sets the value of the otherValues property. + * + * @param value + * allowed object is + * {@link OtherCertStatusValuesType } + * + */ + public void setOtherValues(OtherCertStatusValuesType value) { + this.otherValues = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SPUserNoticeType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SPUserNoticeType.java new file mode 100644 index 00000000..c021667d --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SPUserNoticeType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SPUserNoticeType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SPUserNoticeType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="NoticeRef" type="{http://uri.etsi.org/01903/v1.1.1#}NoticeReferenceType" minOccurs="0"/>
+ *         <element name="ExplicitText" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SPUserNoticeType", propOrder = { + "noticeRef", + "explicitText" +}) +public class SPUserNoticeType { + + @XmlElement(name = "NoticeRef") + protected NoticeReferenceType noticeRef; + @XmlElement(name = "ExplicitText") + protected String explicitText; + + /** + * Gets the value of the noticeRef property. + * + * @return + * possible object is + * {@link NoticeReferenceType } + * + */ + public NoticeReferenceType getNoticeRef() { + return noticeRef; + } + + /** + * Sets the value of the noticeRef property. + * + * @param value + * allowed object is + * {@link NoticeReferenceType } + * + */ + public void setNoticeRef(NoticeReferenceType value) { + this.noticeRef = value; + } + + /** + * Gets the value of the explicitText property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getExplicitText() { + return explicitText; + } + + /** + * Sets the value of the explicitText property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setExplicitText(String value) { + this.explicitText = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SigPolicyQualifiersListType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SigPolicyQualifiersListType.java new file mode 100644 index 00000000..55729857 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SigPolicyQualifiersListType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SigPolicyQualifiersListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SigPolicyQualifiersListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SigPolicyQualifier" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SigPolicyQualifiersListType", propOrder = { + "sigPolicyQualifier" +}) +public class SigPolicyQualifiersListType { + + @XmlElement(name = "SigPolicyQualifier", required = true) + protected List sigPolicyQualifier; + + /** + * Gets the value of the sigPolicyQualifier property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the sigPolicyQualifier property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSigPolicyQualifier().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * + * + */ + public List getSigPolicyQualifier() { + if (sigPolicyQualifier == null) { + sigPolicyQualifier = new ArrayList(); + } + return this.sigPolicyQualifier; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdType.java new file mode 100644 index 00000000..ce951513 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdType.java @@ -0,0 +1,170 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.w3._2000._09.xmldsig_.TransformsType; + + +/** + *

Java class for SignaturePolicyIdType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePolicyIdType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SigPolicyId" type="{http://uri.etsi.org/01903/v1.1.1#}ObjectIdentifierType"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element name="SigPolicyHash" type="{http://uri.etsi.org/01903/v1.1.1#}DigestAlgAndValueType"/>
+ *         <element name="SigPolicyQualifiers" type="{http://uri.etsi.org/01903/v1.1.1#}SigPolicyQualifiersListType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePolicyIdType", propOrder = { + "sigPolicyId", + "transforms", + "sigPolicyHash", + "sigPolicyQualifiers" +}) +public class SignaturePolicyIdType { + + @XmlElement(name = "SigPolicyId", required = true) + protected ObjectIdentifierType sigPolicyId; + @XmlElement(name = "Transforms", namespace = "http://www.w3.org/2000/09/xmldsig#") + protected TransformsType transforms; + @XmlElement(name = "SigPolicyHash", required = true) + protected DigestAlgAndValueType sigPolicyHash; + @XmlElement(name = "SigPolicyQualifiers") + protected SigPolicyQualifiersListType sigPolicyQualifiers; + + /** + * Gets the value of the sigPolicyId property. + * + * @return + * possible object is + * {@link ObjectIdentifierType } + * + */ + public ObjectIdentifierType getSigPolicyId() { + return sigPolicyId; + } + + /** + * Sets the value of the sigPolicyId property. + * + * @param value + * allowed object is + * {@link ObjectIdentifierType } + * + */ + public void setSigPolicyId(ObjectIdentifierType value) { + this.sigPolicyId = value; + } + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the sigPolicyHash property. + * + * @return + * possible object is + * {@link DigestAlgAndValueType } + * + */ + public DigestAlgAndValueType getSigPolicyHash() { + return sigPolicyHash; + } + + /** + * Sets the value of the sigPolicyHash property. + * + * @param value + * allowed object is + * {@link DigestAlgAndValueType } + * + */ + public void setSigPolicyHash(DigestAlgAndValueType value) { + this.sigPolicyHash = value; + } + + /** + * Gets the value of the sigPolicyQualifiers property. + * + * @return + * possible object is + * {@link SigPolicyQualifiersListType } + * + */ + public SigPolicyQualifiersListType getSigPolicyQualifiers() { + return sigPolicyQualifiers; + } + + /** + * Sets the value of the sigPolicyQualifiers property. + * + * @param value + * allowed object is + * {@link SigPolicyQualifiersListType } + * + */ + public void setSigPolicyQualifiers(SigPolicyQualifiersListType value) { + this.sigPolicyQualifiers = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdentifierType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdentifierType.java new file mode 100644 index 00000000..9f90e350 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignaturePolicyIdentifierType.java @@ -0,0 +1,144 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignaturePolicyIdentifierType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePolicyIdentifierType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="SignaturePolicyId" type="{http://uri.etsi.org/01903/v1.1.1#}SignaturePolicyIdType"/>
+ *         <element name="SignaturePolicyImplied">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePolicyIdentifierType", propOrder = { + "signaturePolicyId", + "signaturePolicyImplied" +}) +public class SignaturePolicyIdentifierType { + + @XmlElement(name = "SignaturePolicyId") + protected SignaturePolicyIdType signaturePolicyId; + @XmlElement(name = "SignaturePolicyImplied") + protected SignaturePolicyIdentifierType.SignaturePolicyImplied signaturePolicyImplied; + + /** + * Gets the value of the signaturePolicyId property. + * + * @return + * possible object is + * {@link SignaturePolicyIdType } + * + */ + public SignaturePolicyIdType getSignaturePolicyId() { + return signaturePolicyId; + } + + /** + * Sets the value of the signaturePolicyId property. + * + * @param value + * allowed object is + * {@link SignaturePolicyIdType } + * + */ + public void setSignaturePolicyId(SignaturePolicyIdType value) { + this.signaturePolicyId = value; + } + + /** + * Gets the value of the signaturePolicyImplied property. + * + * @return + * possible object is + * {@link SignaturePolicyIdentifierType.SignaturePolicyImplied } + * + */ + public SignaturePolicyIdentifierType.SignaturePolicyImplied getSignaturePolicyImplied() { + return signaturePolicyImplied; + } + + /** + * Sets the value of the signaturePolicyImplied property. + * + * @param value + * allowed object is + * {@link SignaturePolicyIdentifierType.SignaturePolicyImplied } + * + */ + public void setSignaturePolicyImplied(SignaturePolicyIdentifierType.SignaturePolicyImplied value) { + this.signaturePolicyImplied = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class SignaturePolicyImplied { + + + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignatureProductionPlaceType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignatureProductionPlaceType.java new file mode 100644 index 00000000..e6acd8a7 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignatureProductionPlaceType.java @@ -0,0 +1,169 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignatureProductionPlaceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureProductionPlaceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="City" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="StateOrProvince" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="PostalCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="CountryName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureProductionPlaceType", propOrder = { + "city", + "stateOrProvince", + "postalCode", + "countryName" +}) +public class SignatureProductionPlaceType { + + @XmlElement(name = "City") + protected String city; + @XmlElement(name = "StateOrProvince") + protected String stateOrProvince; + @XmlElement(name = "PostalCode") + protected String postalCode; + @XmlElement(name = "CountryName") + protected String countryName; + + /** + * Gets the value of the city property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCity() { + return city; + } + + /** + * Sets the value of the city property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCity(String value) { + this.city = value; + } + + /** + * Gets the value of the stateOrProvince property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStateOrProvince() { + return stateOrProvince; + } + + /** + * Sets the value of the stateOrProvince property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStateOrProvince(String value) { + this.stateOrProvince = value; + } + + /** + * Gets the value of the postalCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPostalCode() { + return postalCode; + } + + /** + * Sets the value of the postalCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPostalCode(String value) { + this.postalCode = value; + } + + /** + * Gets the value of the countryName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCountryName() { + return countryName; + } + + /** + * Sets the value of the countryName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCountryName(String value) { + this.countryName = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedDataObjectPropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedDataObjectPropertiesType.java new file mode 100644 index 00000000..b6a1aa85 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedDataObjectPropertiesType.java @@ -0,0 +1,191 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignedDataObjectPropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedDataObjectPropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DataObjectFormat" type="{http://uri.etsi.org/01903/v1.1.1#}DataObjectFormatType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CommitmentTypeIndication" type="{http://uri.etsi.org/01903/v1.1.1#}CommitmentTypeIndicationType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AllDataObjectsTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}TimeStampType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="IndividualDataObjectsTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}TimeStampType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedDataObjectPropertiesType", propOrder = { + "dataObjectFormat", + "commitmentTypeIndication", + "allDataObjectsTimeStamp", + "individualDataObjectsTimeStamp" +}) +public class SignedDataObjectPropertiesType { + + @XmlElement(name = "DataObjectFormat") + protected List dataObjectFormat; + @XmlElement(name = "CommitmentTypeIndication") + protected List commitmentTypeIndication; + @XmlElement(name = "AllDataObjectsTimeStamp") + protected List allDataObjectsTimeStamp; + @XmlElement(name = "IndividualDataObjectsTimeStamp") + protected List individualDataObjectsTimeStamp; + + /** + * Gets the value of the dataObjectFormat property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dataObjectFormat property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDataObjectFormat().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DataObjectFormatType } + * + * + */ + public List getDataObjectFormat() { + if (dataObjectFormat == null) { + dataObjectFormat = new ArrayList(); + } + return this.dataObjectFormat; + } + + /** + * Gets the value of the commitmentTypeIndication property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the commitmentTypeIndication property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCommitmentTypeIndication().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CommitmentTypeIndicationType } + * + * + */ + public List getCommitmentTypeIndication() { + if (commitmentTypeIndication == null) { + commitmentTypeIndication = new ArrayList(); + } + return this.commitmentTypeIndication; + } + + /** + * Gets the value of the allDataObjectsTimeStamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allDataObjectsTimeStamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAllDataObjectsTimeStamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TimeStampType } + * + * + */ + public List getAllDataObjectsTimeStamp() { + if (allDataObjectsTimeStamp == null) { + allDataObjectsTimeStamp = new ArrayList(); + } + return this.allDataObjectsTimeStamp; + } + + /** + * Gets the value of the individualDataObjectsTimeStamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the individualDataObjectsTimeStamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getIndividualDataObjectsTimeStamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TimeStampType } + * + * + */ + public List getIndividualDataObjectsTimeStamp() { + if (individualDataObjectsTimeStamp == null) { + individualDataObjectsTimeStamp = new ArrayList(); + } + return this.individualDataObjectsTimeStamp; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedPropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedPropertiesType.java new file mode 100644 index 00000000..f3599699 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedPropertiesType.java @@ -0,0 +1,148 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignedPropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedPropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignedSignatureProperties" type="{http://uri.etsi.org/01903/v1.1.1#}SignedSignaturePropertiesType"/>
+ *         <element name="SignedDataObjectProperties" type="{http://uri.etsi.org/01903/v1.1.1#}SignedDataObjectPropertiesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedPropertiesType", propOrder = { + "signedSignatureProperties", + "signedDataObjectProperties" +}) +public class SignedPropertiesType { + + @XmlElement(name = "SignedSignatureProperties", required = true) + protected SignedSignaturePropertiesType signedSignatureProperties; + @XmlElement(name = "SignedDataObjectProperties") + protected SignedDataObjectPropertiesType signedDataObjectProperties; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the signedSignatureProperties property. + * + * @return + * possible object is + * {@link SignedSignaturePropertiesType } + * + */ + public SignedSignaturePropertiesType getSignedSignatureProperties() { + return signedSignatureProperties; + } + + /** + * Sets the value of the signedSignatureProperties property. + * + * @param value + * allowed object is + * {@link SignedSignaturePropertiesType } + * + */ + public void setSignedSignatureProperties(SignedSignaturePropertiesType value) { + this.signedSignatureProperties = value; + } + + /** + * Gets the value of the signedDataObjectProperties property. + * + * @return + * possible object is + * {@link SignedDataObjectPropertiesType } + * + */ + public SignedDataObjectPropertiesType getSignedDataObjectProperties() { + return signedDataObjectProperties; + } + + /** + * Sets the value of the signedDataObjectProperties property. + * + * @param value + * allowed object is + * {@link SignedDataObjectPropertiesType } + * + */ + public void setSignedDataObjectProperties(SignedDataObjectPropertiesType value) { + this.signedDataObjectProperties = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedSignaturePropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedSignaturePropertiesType.java new file mode 100644 index 00000000..1bfca870 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignedSignaturePropertiesType.java @@ -0,0 +1,200 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for SignedSignaturePropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedSignaturePropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SigningTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
+ *         <element name="SigningCertificate" type="{http://uri.etsi.org/01903/v1.1.1#}CertIDListType"/>
+ *         <element name="SignaturePolicyIdentifier" type="{http://uri.etsi.org/01903/v1.1.1#}SignaturePolicyIdentifierType"/>
+ *         <element name="SignatureProductionPlace" type="{http://uri.etsi.org/01903/v1.1.1#}SignatureProductionPlaceType" minOccurs="0"/>
+ *         <element name="SignerRole" type="{http://uri.etsi.org/01903/v1.1.1#}SignerRoleType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedSignaturePropertiesType", propOrder = { + "signingTime", + "signingCertificate", + "signaturePolicyIdentifier", + "signatureProductionPlace", + "signerRole" +}) +public class SignedSignaturePropertiesType { + + @XmlElement(name = "SigningTime", required = true) + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar signingTime; + @XmlElement(name = "SigningCertificate", required = true) + protected CertIDListType signingCertificate; + @XmlElement(name = "SignaturePolicyIdentifier", required = true) + protected SignaturePolicyIdentifierType signaturePolicyIdentifier; + @XmlElement(name = "SignatureProductionPlace") + protected SignatureProductionPlaceType signatureProductionPlace; + @XmlElement(name = "SignerRole") + protected SignerRoleType signerRole; + + /** + * Gets the value of the signingTime property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getSigningTime() { + return signingTime; + } + + /** + * Sets the value of the signingTime property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setSigningTime(XMLGregorianCalendar value) { + this.signingTime = value; + } + + /** + * Gets the value of the signingCertificate property. + * + * @return + * possible object is + * {@link CertIDListType } + * + */ + public CertIDListType getSigningCertificate() { + return signingCertificate; + } + + /** + * Sets the value of the signingCertificate property. + * + * @param value + * allowed object is + * {@link CertIDListType } + * + */ + public void setSigningCertificate(CertIDListType value) { + this.signingCertificate = value; + } + + /** + * Gets the value of the signaturePolicyIdentifier property. + * + * @return + * possible object is + * {@link SignaturePolicyIdentifierType } + * + */ + public SignaturePolicyIdentifierType getSignaturePolicyIdentifier() { + return signaturePolicyIdentifier; + } + + /** + * Sets the value of the signaturePolicyIdentifier property. + * + * @param value + * allowed object is + * {@link SignaturePolicyIdentifierType } + * + */ + public void setSignaturePolicyIdentifier(SignaturePolicyIdentifierType value) { + this.signaturePolicyIdentifier = value; + } + + /** + * Gets the value of the signatureProductionPlace property. + * + * @return + * possible object is + * {@link SignatureProductionPlaceType } + * + */ + public SignatureProductionPlaceType getSignatureProductionPlace() { + return signatureProductionPlace; + } + + /** + * Sets the value of the signatureProductionPlace property. + * + * @param value + * allowed object is + * {@link SignatureProductionPlaceType } + * + */ + public void setSignatureProductionPlace(SignatureProductionPlaceType value) { + this.signatureProductionPlace = value; + } + + /** + * Gets the value of the signerRole property. + * + * @return + * possible object is + * {@link SignerRoleType } + * + */ + public SignerRoleType getSignerRole() { + return signerRole; + } + + /** + * Sets the value of the signerRole property. + * + * @param value + * allowed object is + * {@link SignerRoleType } + * + */ + public void setSignerRole(SignerRoleType value) { + this.signerRole = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignerRoleType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignerRoleType.java new file mode 100644 index 00000000..c90c5671 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/SignerRoleType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignerRoleType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignerRoleType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ClaimedRoles" type="{http://uri.etsi.org/01903/v1.1.1#}ClaimedRolesListType" minOccurs="0"/>
+ *         <element name="CertifiedRoles" type="{http://uri.etsi.org/01903/v1.1.1#}CertifiedRolesListType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignerRoleType", propOrder = { + "claimedRoles", + "certifiedRoles" +}) +public class SignerRoleType { + + @XmlElement(name = "ClaimedRoles") + protected ClaimedRolesListType claimedRoles; + @XmlElement(name = "CertifiedRoles") + protected CertifiedRolesListType certifiedRoles; + + /** + * Gets the value of the claimedRoles property. + * + * @return + * possible object is + * {@link ClaimedRolesListType } + * + */ + public ClaimedRolesListType getClaimedRoles() { + return claimedRoles; + } + + /** + * Sets the value of the claimedRoles property. + * + * @param value + * allowed object is + * {@link ClaimedRolesListType } + * + */ + public void setClaimedRoles(ClaimedRolesListType value) { + this.claimedRoles = value; + } + + /** + * Gets the value of the certifiedRoles property. + * + * @return + * possible object is + * {@link CertifiedRolesListType } + * + */ + public CertifiedRolesListType getCertifiedRoles() { + return certifiedRoles; + } + + /** + * Sets the value of the certifiedRoles property. + * + * @param value + * allowed object is + * {@link CertifiedRolesListType } + * + */ + public void setCertifiedRoles(CertifiedRolesListType value) { + this.certifiedRoles = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/TimeStampType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/TimeStampType.java new file mode 100644 index 00000000..4256ca78 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/TimeStampType.java @@ -0,0 +1,150 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TimeStampType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TimeStampType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HashDataInfo" type="{http://uri.etsi.org/01903/v1.1.1#}HashDataInfoType" maxOccurs="unbounded"/>
+ *         <choice>
+ *           <element name="EncapsulatedTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}EncapsulatedPKIDataType"/>
+ *           <element name="XMLTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TimeStampType", propOrder = { + "hashDataInfo", + "encapsulatedTimeStamp", + "xmlTimeStamp" +}) +public class TimeStampType { + + @XmlElement(name = "HashDataInfo", required = true) + protected List hashDataInfo; + @XmlElement(name = "EncapsulatedTimeStamp") + protected EncapsulatedPKIDataType encapsulatedTimeStamp; + @XmlElement(name = "XMLTimeStamp") + protected AnyType xmlTimeStamp; + + /** + * Gets the value of the hashDataInfo property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hashDataInfo property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getHashDataInfo().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link HashDataInfoType } + * + * + */ + public List getHashDataInfo() { + if (hashDataInfo == null) { + hashDataInfo = new ArrayList(); + } + return this.hashDataInfo; + } + + /** + * Gets the value of the encapsulatedTimeStamp property. + * + * @return + * possible object is + * {@link EncapsulatedPKIDataType } + * + */ + public EncapsulatedPKIDataType getEncapsulatedTimeStamp() { + return encapsulatedTimeStamp; + } + + /** + * Sets the value of the encapsulatedTimeStamp property. + * + * @param value + * allowed object is + * {@link EncapsulatedPKIDataType } + * + */ + public void setEncapsulatedTimeStamp(EncapsulatedPKIDataType value) { + this.encapsulatedTimeStamp = value; + } + + /** + * Gets the value of the xmlTimeStamp property. + * + * @return + * possible object is + * {@link AnyType } + * + */ + public AnyType getXMLTimeStamp() { + return xmlTimeStamp; + } + + /** + * Sets the value of the xmlTimeStamp property. + * + * @param value + * allowed object is + * {@link AnyType } + * + */ + public void setXMLTimeStamp(AnyType value) { + this.xmlTimeStamp = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedDataObjectPropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedDataObjectPropertiesType.java new file mode 100644 index 00000000..a992e849 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedDataObjectPropertiesType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for UnsignedDataObjectPropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="UnsignedDataObjectPropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="UnsignedDataObjectProperty" type="{http://uri.etsi.org/01903/v1.1.1#}AnyType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "UnsignedDataObjectPropertiesType", propOrder = { + "unsignedDataObjectProperty" +}) +public class UnsignedDataObjectPropertiesType { + + @XmlElement(name = "UnsignedDataObjectProperty") + protected List unsignedDataObjectProperty; + + /** + * Gets the value of the unsignedDataObjectProperty property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the unsignedDataObjectProperty property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getUnsignedDataObjectProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AnyType } + * + * + */ + public List getUnsignedDataObjectProperty() { + if (unsignedDataObjectProperty == null) { + unsignedDataObjectProperty = new ArrayList(); + } + return this.unsignedDataObjectProperty; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedPropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedPropertiesType.java new file mode 100644 index 00000000..ec037e65 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedPropertiesType.java @@ -0,0 +1,148 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for UnsignedPropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="UnsignedPropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="UnsignedSignatureProperties" type="{http://uri.etsi.org/01903/v1.1.1#}UnsignedSignaturePropertiesType" minOccurs="0"/>
+ *         <element name="UnsignedDataObjectProperties" type="{http://uri.etsi.org/01903/v1.1.1#}UnsignedDataObjectPropertiesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "UnsignedPropertiesType", propOrder = { + "unsignedSignatureProperties", + "unsignedDataObjectProperties" +}) +public class UnsignedPropertiesType { + + @XmlElement(name = "UnsignedSignatureProperties") + protected UnsignedSignaturePropertiesType unsignedSignatureProperties; + @XmlElement(name = "UnsignedDataObjectProperties") + protected UnsignedDataObjectPropertiesType unsignedDataObjectProperties; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the unsignedSignatureProperties property. + * + * @return + * possible object is + * {@link UnsignedSignaturePropertiesType } + * + */ + public UnsignedSignaturePropertiesType getUnsignedSignatureProperties() { + return unsignedSignatureProperties; + } + + /** + * Sets the value of the unsignedSignatureProperties property. + * + * @param value + * allowed object is + * {@link UnsignedSignaturePropertiesType } + * + */ + public void setUnsignedSignatureProperties(UnsignedSignaturePropertiesType value) { + this.unsignedSignatureProperties = value; + } + + /** + * Gets the value of the unsignedDataObjectProperties property. + * + * @return + * possible object is + * {@link UnsignedDataObjectPropertiesType } + * + */ + public UnsignedDataObjectPropertiesType getUnsignedDataObjectProperties() { + return unsignedDataObjectProperties; + } + + /** + * Sets the value of the unsignedDataObjectProperties property. + * + * @param value + * allowed object is + * {@link UnsignedDataObjectPropertiesType } + * + */ + public void setUnsignedDataObjectProperties(UnsignedDataObjectPropertiesType value) { + this.unsignedDataObjectProperties = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedSignaturePropertiesType.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedSignaturePropertiesType.java new file mode 100644 index 00000000..ad713c1f --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/UnsignedSignaturePropertiesType.java @@ -0,0 +1,338 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + + +package org.etsi.uri._01903.v1_1; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for UnsignedSignaturePropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="UnsignedSignaturePropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CounterSignature" type="{http://uri.etsi.org/01903/v1.1.1#}CounterSignatureType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="SignatureTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}TimeStampType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CompleteCertificateRefs" type="{http://uri.etsi.org/01903/v1.1.1#}CompleteCertificateRefsType" minOccurs="0"/>
+ *         <element name="CompleteRevocationRefs" type="{http://uri.etsi.org/01903/v1.1.1#}CompleteRevocationRefsType" minOccurs="0"/>
+ *         <choice>
+ *           <element name="SigAndRefsTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}TimeStampType" maxOccurs="unbounded" minOccurs="0"/>
+ *           <element name="RefsOnlyTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}TimeStampType" maxOccurs="unbounded" minOccurs="0"/>
+ *         </choice>
+ *         <element name="CertificateValues" type="{http://uri.etsi.org/01903/v1.1.1#}CertificateValuesType" minOccurs="0"/>
+ *         <element name="RevocationValues" type="{http://uri.etsi.org/01903/v1.1.1#}RevocationValuesType" minOccurs="0"/>
+ *         <element name="ArchiveTimeStamp" type="{http://uri.etsi.org/01903/v1.1.1#}TimeStampType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "UnsignedSignaturePropertiesType", propOrder = { + "counterSignature", + "signatureTimeStamp", + "completeCertificateRefs", + "completeRevocationRefs", + "sigAndRefsTimeStamp", + "refsOnlyTimeStamp", + "certificateValues", + "revocationValues", + "archiveTimeStamp" +}) +public class UnsignedSignaturePropertiesType { + + @XmlElement(name = "CounterSignature") + protected List counterSignature; + @XmlElement(name = "SignatureTimeStamp") + protected List signatureTimeStamp; + @XmlElement(name = "CompleteCertificateRefs") + protected CompleteCertificateRefsType completeCertificateRefs; + @XmlElement(name = "CompleteRevocationRefs") + protected CompleteRevocationRefsType completeRevocationRefs; + @XmlElement(name = "SigAndRefsTimeStamp") + protected List sigAndRefsTimeStamp; + @XmlElement(name = "RefsOnlyTimeStamp") + protected List refsOnlyTimeStamp; + @XmlElement(name = "CertificateValues") + protected CertificateValuesType certificateValues; + @XmlElement(name = "RevocationValues") + protected RevocationValuesType revocationValues; + @XmlElement(name = "ArchiveTimeStamp") + protected List archiveTimeStamp; + + /** + * Gets the value of the counterSignature property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the counterSignature property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCounterSignature().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CounterSignatureType } + * + * + */ + public List getCounterSignature() { + if (counterSignature == null) { + counterSignature = new ArrayList(); + } + return this.counterSignature; + } + + /** + * Gets the value of the signatureTimeStamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signatureTimeStamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignatureTimeStamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TimeStampType } + * + * + */ + public List getSignatureTimeStamp() { + if (signatureTimeStamp == null) { + signatureTimeStamp = new ArrayList(); + } + return this.signatureTimeStamp; + } + + /** + * Gets the value of the completeCertificateRefs property. + * + * @return + * possible object is + * {@link CompleteCertificateRefsType } + * + */ + public CompleteCertificateRefsType getCompleteCertificateRefs() { + return completeCertificateRefs; + } + + /** + * Sets the value of the completeCertificateRefs property. + * + * @param value + * allowed object is + * {@link CompleteCertificateRefsType } + * + */ + public void setCompleteCertificateRefs(CompleteCertificateRefsType value) { + this.completeCertificateRefs = value; + } + + /** + * Gets the value of the completeRevocationRefs property. + * + * @return + * possible object is + * {@link CompleteRevocationRefsType } + * + */ + public CompleteRevocationRefsType getCompleteRevocationRefs() { + return completeRevocationRefs; + } + + /** + * Sets the value of the completeRevocationRefs property. + * + * @param value + * allowed object is + * {@link CompleteRevocationRefsType } + * + */ + public void setCompleteRevocationRefs(CompleteRevocationRefsType value) { + this.completeRevocationRefs = value; + } + + /** + * Gets the value of the sigAndRefsTimeStamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the sigAndRefsTimeStamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSigAndRefsTimeStamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TimeStampType } + * + * + */ + public List getSigAndRefsTimeStamp() { + if (sigAndRefsTimeStamp == null) { + sigAndRefsTimeStamp = new ArrayList(); + } + return this.sigAndRefsTimeStamp; + } + + /** + * Gets the value of the refsOnlyTimeStamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the refsOnlyTimeStamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRefsOnlyTimeStamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TimeStampType } + * + * + */ + public List getRefsOnlyTimeStamp() { + if (refsOnlyTimeStamp == null) { + refsOnlyTimeStamp = new ArrayList(); + } + return this.refsOnlyTimeStamp; + } + + /** + * Gets the value of the certificateValues property. + * + * @return + * possible object is + * {@link CertificateValuesType } + * + */ + public CertificateValuesType getCertificateValues() { + return certificateValues; + } + + /** + * Sets the value of the certificateValues property. + * + * @param value + * allowed object is + * {@link CertificateValuesType } + * + */ + public void setCertificateValues(CertificateValuesType value) { + this.certificateValues = value; + } + + /** + * Gets the value of the revocationValues property. + * + * @return + * possible object is + * {@link RevocationValuesType } + * + */ + public RevocationValuesType getRevocationValues() { + return revocationValues; + } + + /** + * Sets the value of the revocationValues property. + * + * @param value + * allowed object is + * {@link RevocationValuesType } + * + */ + public void setRevocationValues(RevocationValuesType value) { + this.revocationValues = value; + } + + /** + * Gets the value of the archiveTimeStamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the archiveTimeStamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getArchiveTimeStamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TimeStampType } + * + * + */ + public List getArchiveTimeStamp() { + if (archiveTimeStamp == null) { + archiveTimeStamp = new ArrayList(); + } + return this.archiveTimeStamp; + } + +} diff --git a/utils/src/main/java/org/etsi/uri/_01903/v1_1/package-info.java b/utils/src/main/java/org/etsi/uri/_01903/v1_1/package-info.java new file mode 100644 index 00000000..ff4b8905 --- /dev/null +++ b/utils/src/main/java/org/etsi/uri/_01903/v1_1/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.25 at 10:14:41 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://uri.etsi.org/01903/v1.1.1#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package org.etsi.uri._01903.v1_1; diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/CanonicalizationMethodType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/CanonicalizationMethodType.java new file mode 100644 index 00000000..675ded2d --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/CanonicalizationMethodType.java @@ -0,0 +1,125 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CanonicalizationMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CanonicalizationMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CanonicalizationMethodType", propOrder = { + "content" +}) +public class CanonicalizationMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/DSAKeyValueType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/DSAKeyValueType.java new file mode 100644 index 00000000..6a9916f1 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/DSAKeyValueType.java @@ -0,0 +1,243 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DSAKeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DSAKeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <sequence minOccurs="0">
+ *           <element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *           <element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         </sequence>
+ *         <element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *         <element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         <element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ *         <sequence minOccurs="0">
+ *           <element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *           <element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         </sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DSAKeyValueType", propOrder = { + "p", + "q", + "g", + "y", + "j", + "seed", + "pgenCounter" +}) +public class DSAKeyValueType { + + @XmlElement(name = "P") + protected byte[] p; + @XmlElement(name = "Q") + protected byte[] q; + @XmlElement(name = "G") + protected byte[] g; + @XmlElement(name = "Y", required = true) + protected byte[] y; + @XmlElement(name = "J") + protected byte[] j; + @XmlElement(name = "Seed") + protected byte[] seed; + @XmlElement(name = "PgenCounter") + protected byte[] pgenCounter; + + /** + * Gets the value of the p property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getP() { + return p; + } + + /** + * Sets the value of the p property. + * + * @param value + * allowed object is + * byte[] + */ + public void setP(byte[] value) { + this.p = ((byte[]) value); + } + + /** + * Gets the value of the q property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getQ() { + return q; + } + + /** + * Sets the value of the q property. + * + * @param value + * allowed object is + * byte[] + */ + public void setQ(byte[] value) { + this.q = ((byte[]) value); + } + + /** + * Gets the value of the g property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getG() { + return g; + } + + /** + * Sets the value of the g property. + * + * @param value + * allowed object is + * byte[] + */ + public void setG(byte[] value) { + this.g = ((byte[]) value); + } + + /** + * Gets the value of the y property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getY() { + return y; + } + + /** + * Sets the value of the y property. + * + * @param value + * allowed object is + * byte[] + */ + public void setY(byte[] value) { + this.y = ((byte[]) value); + } + + /** + * Gets the value of the j property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getJ() { + return j; + } + + /** + * Sets the value of the j property. + * + * @param value + * allowed object is + * byte[] + */ + public void setJ(byte[] value) { + this.j = ((byte[]) value); + } + + /** + * Gets the value of the seed property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getSeed() { + return seed; + } + + /** + * Sets the value of the seed property. + * + * @param value + * allowed object is + * byte[] + */ + public void setSeed(byte[] value) { + this.seed = ((byte[]) value); + } + + /** + * Gets the value of the pgenCounter property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getPgenCounter() { + return pgenCounter; + } + + /** + * Sets the value of the pgenCounter property. + * + * @param value + * allowed object is + * byte[] + */ + public void setPgenCounter(byte[] value) { + this.pgenCounter = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/DigestMethodType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/DigestMethodType.java new file mode 100644 index 00000000..8a93927c --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/DigestMethodType.java @@ -0,0 +1,127 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for DigestMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DigestMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DigestMethodType", propOrder = { + "content" +}) +public class DigestMethodType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link String } + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyInfoType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyInfoType.java new file mode 100644 index 00000000..982d4dc5 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyInfoType.java @@ -0,0 +1,158 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + *

Java class for KeyInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KeyInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyName"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}X509Data"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}PGPData"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SPKIData"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}MgmtData"/>
+ *         <any/>
+ *       </choice>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KeyInfoType", propOrder = { + "content" +}) +public class KeyInfoType { + + @XmlElementRefs({ + @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} + * {@link Element } + * {@link JAXBElement }{@code <}{@link X509DataType }{@code >} + * {@link String } + * {@link Object } + * {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} + * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyValueType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyValueType.java new file mode 100644 index 00000000..8bfa9f17 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/KeyValueType.java @@ -0,0 +1,108 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for KeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue"/>
+ *         <any/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KeyValueType", propOrder = { + "content" +}) +public class KeyValueType { + + @XmlElementRefs({ + @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} + * {@link String } + * {@link Object } + * {@link Element } + * {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ManifestType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ManifestType.java new file mode 100644 index 00000000..b8e2d049 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ManifestType.java @@ -0,0 +1,127 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for ManifestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ManifestType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ManifestType", propOrder = { + "reference" +}) +public class ManifestType { + + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectFactory.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectFactory.java new file mode 100644 index 00000000..4ab376f1 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectFactory.java @@ -0,0 +1,575 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.math.BigInteger; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.w3._2000._09.xmldsig_ package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _Signature_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Signature"); + private final static QName _PGPData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPData"); + private final static QName _DSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DSAKeyValue"); + private final static QName _SPKIData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKIData"); + private final static QName _SignedInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignedInfo"); + private final static QName _RetrievalMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RetrievalMethod"); + private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod"); + private final static QName _Object_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Object"); + private final static QName _SignatureProperty_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperty"); + private final static QName _SignatureValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureValue"); + private final static QName _Manifest_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Manifest"); + private final static QName _Transforms_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms"); + private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform"); + private final static QName _X509Data_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Data"); + private final static QName _SignatureMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureMethod"); + private final static QName _KeyInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyInfo"); + private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); + private final static QName _DigestMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestMethod"); + private final static QName _SignatureProperties_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperties"); + private final static QName _MgmtData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "MgmtData"); + private final static QName _KeyName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyName"); + private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue"); + private final static QName _Reference_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Reference"); + private final static QName _RSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RSAKeyValue"); + private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); + private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); + private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); + private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial"); + private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate"); + private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI"); + private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName"); + private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL"); + private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); + private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.w3._2000._09.xmldsig_ + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link RetrievalMethodType } + * + */ + public RetrievalMethodType createRetrievalMethodType() { + return new RetrievalMethodType(); + } + + /** + * Create an instance of {@link SignedInfoType } + * + */ + public SignedInfoType createSignedInfoType() { + return new SignedInfoType(); + } + + /** + * Create an instance of {@link DSAKeyValueType } + * + */ + public DSAKeyValueType createDSAKeyValueType() { + return new DSAKeyValueType(); + } + + /** + * Create an instance of {@link DigestMethodType } + * + */ + public DigestMethodType createDigestMethodType() { + return new DigestMethodType(); + } + + /** + * Create an instance of {@link SignaturePropertiesType } + * + */ + public SignaturePropertiesType createSignaturePropertiesType() { + return new SignaturePropertiesType(); + } + + /** + * Create an instance of {@link ObjectType } + * + */ + public ObjectType createObjectType() { + return new ObjectType(); + } + + /** + * Create an instance of {@link X509DataType } + * + */ + public X509DataType createX509DataType() { + return new X509DataType(); + } + + /** + * Create an instance of {@link ReferenceType } + * + */ + public ReferenceType createReferenceType() { + return new ReferenceType(); + } + + /** + * Create an instance of {@link CanonicalizationMethodType } + * + */ + public CanonicalizationMethodType createCanonicalizationMethodType() { + return new CanonicalizationMethodType(); + } + + /** + * Create an instance of {@link TransformType } + * + */ + public TransformType createTransformType() { + return new TransformType(); + } + + /** + * Create an instance of {@link SignatureMethodType } + * + */ + public SignatureMethodType createSignatureMethodType() { + return new SignatureMethodType(); + } + + /** + * Create an instance of {@link PGPDataType } + * + */ + public PGPDataType createPGPDataType() { + return new PGPDataType(); + } + + /** + * Create an instance of {@link KeyInfoType } + * + */ + public KeyInfoType createKeyInfoType() { + return new KeyInfoType(); + } + + /** + * Create an instance of {@link RSAKeyValueType } + * + */ + public RSAKeyValueType createRSAKeyValueType() { + return new RSAKeyValueType(); + } + + /** + * Create an instance of {@link KeyValueType } + * + */ + public KeyValueType createKeyValueType() { + return new KeyValueType(); + } + + /** + * Create an instance of {@link SignaturePropertyType } + * + */ + public SignaturePropertyType createSignaturePropertyType() { + return new SignaturePropertyType(); + } + + /** + * Create an instance of {@link ManifestType } + * + */ + public ManifestType createManifestType() { + return new ManifestType(); + } + + /** + * Create an instance of {@link SignatureType } + * + */ + public SignatureType createSignatureType() { + return new SignatureType(); + } + + /** + * Create an instance of {@link TransformsType } + * + */ + public TransformsType createTransformsType() { + return new TransformsType(); + } + + /** + * Create an instance of {@link SignatureValueType } + * + */ + public SignatureValueType createSignatureValueType() { + return new SignatureValueType(); + } + + /** + * Create an instance of {@link X509IssuerSerialType } + * + */ + public X509IssuerSerialType createX509IssuerSerialType() { + return new X509IssuerSerialType(); + } + + /** + * Create an instance of {@link SPKIDataType } + * + */ + public SPKIDataType createSPKIDataType() { + return new SPKIDataType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Signature") + public JAXBElement createSignature(SignatureType value) { + return new JAXBElement(_Signature_QNAME, SignatureType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link PGPDataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPData") + public JAXBElement createPGPData(PGPDataType value) { + return new JAXBElement(_PGPData_QNAME, PGPDataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DSAKeyValue") + public JAXBElement createDSAKeyValue(DSAKeyValueType value) { + return new JAXBElement(_DSAKeyValue_QNAME, DSAKeyValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKIData") + public JAXBElement createSPKIData(SPKIDataType value) { + return new JAXBElement(_SPKIData_QNAME, SPKIDataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignedInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignedInfo") + public JAXBElement createSignedInfo(SignedInfoType value) { + return new JAXBElement(_SignedInfo_QNAME, SignedInfoType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RetrievalMethod") + public JAXBElement createRetrievalMethod(RetrievalMethodType value) { + return new JAXBElement(_RetrievalMethod_QNAME, RetrievalMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalizationMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "CanonicalizationMethod") + public JAXBElement createCanonicalizationMethod(CanonicalizationMethodType value) { + return new JAXBElement(_CanonicalizationMethod_QNAME, CanonicalizationMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ObjectType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Object") + public JAXBElement createObject(ObjectType value) { + return new JAXBElement(_Object_QNAME, ObjectType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertyType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperty") + public JAXBElement createSignatureProperty(SignaturePropertyType value) { + return new JAXBElement(_SignatureProperty_QNAME, SignaturePropertyType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureValue") + public JAXBElement createSignatureValue(SignatureValueType value) { + return new JAXBElement(_SignatureValue_QNAME, SignatureValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ManifestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Manifest") + public JAXBElement createManifest(ManifestType value) { + return new JAXBElement(_Manifest_QNAME, ManifestType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TransformsType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transforms") + public JAXBElement createTransforms(TransformsType value) { + return new JAXBElement(_Transforms_QNAME, TransformsType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TransformType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transform") + public JAXBElement createTransform(TransformType value) { + return new JAXBElement(_Transform_QNAME, TransformType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link X509DataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Data") + public JAXBElement createX509Data(X509DataType value) { + return new JAXBElement(_X509Data_QNAME, X509DataType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignatureMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureMethod") + public JAXBElement createSignatureMethod(SignatureMethodType value) { + return new JAXBElement(_SignatureMethod_QNAME, SignatureMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyInfo") + public JAXBElement createKeyInfo(KeyInfoType value) { + return new JAXBElement(_KeyInfo_QNAME, KeyInfoType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestValue") + public JAXBElement createDigestValue(byte[] value) { + return new JAXBElement(_DigestValue_QNAME, byte[].class, null, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DigestMethodType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod") + public JAXBElement createDigestMethod(DigestMethodType value) { + return new JAXBElement(_DigestMethod_QNAME, DigestMethodType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertiesType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperties") + public JAXBElement createSignatureProperties(SignaturePropertiesType value) { + return new JAXBElement(_SignatureProperties_QNAME, SignaturePropertiesType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "MgmtData") + public JAXBElement createMgmtData(String value) { + return new JAXBElement(_MgmtData_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyName") + public JAXBElement createKeyName(String value) { + return new JAXBElement(_KeyName_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link KeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyValue") + public JAXBElement createKeyValue(KeyValueType value) { + return new JAXBElement(_KeyValue_QNAME, KeyValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Reference") + public JAXBElement createReference(ReferenceType value) { + return new JAXBElement(_Reference_QNAME, ReferenceType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RSAKeyValue") + public JAXBElement createRSAKeyValue(RSAKeyValueType value) { + return new JAXBElement(_RSAKeyValue_QNAME, RSAKeyValueType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) + public JAXBElement createTransformTypeXPath(String value) { + return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) + public JAXBElement createSPKIDataTypeSPKISexp(byte[] value) { + return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, byte[].class, SPKIDataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) + public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { + return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509IssuerSerial", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509IssuerSerial(X509IssuerSerialType value) { + return new JAXBElement(_X509DataTypeX509IssuerSerial_QNAME, X509IssuerSerialType.class, X509DataType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Certificate", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509Certificate(byte[] value) { + return new JAXBElement(_X509DataTypeX509Certificate_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SKI", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509SKI(byte[] value) { + return new JAXBElement(_X509DataTypeX509SKI_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SubjectName", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509SubjectName(String value) { + return new JAXBElement(_X509DataTypeX509SubjectName_QNAME, String.class, X509DataType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509CRL", scope = X509DataType.class) + public JAXBElement createX509DataTypeX509CRL(byte[] value) { + return new JAXBElement(_X509DataTypeX509CRL_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class) + public JAXBElement createPGPDataTypePGPKeyID(byte[] value) { + return new JAXBElement(_PGPDataTypePGPKeyID_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class) + public JAXBElement createPGPDataTypePGPKeyPacket(byte[] value) { + return new JAXBElement(_PGPDataTypePGPKeyPacket_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectType.java new file mode 100644 index 00000000..f63304c2 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ObjectType.java @@ -0,0 +1,187 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + *

Java class for ObjectType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ObjectType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded" minOccurs="0">
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ObjectType", propOrder = { + "content" +}) +public class ObjectType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAttribute(name = "MimeType") + protected String mimeType; + @XmlAttribute(name = "Encoding") + @XmlSchemaType(name = "anyURI") + protected String encoding; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link String } + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the mimeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * Sets the value of the mimeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMimeType(String value) { + this.mimeType = value; + } + + /** + * Gets the value of the encoding property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEncoding() { + return encoding; + } + + /** + * Sets the value of the encoding property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEncoding(String value) { + this.encoding = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/PGPDataType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/PGPDataType.java new file mode 100644 index 00000000..3f173371 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/PGPDataType.java @@ -0,0 +1,121 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for PGPDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PGPDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <sequence>
+ *           <element name="PGPKeyID" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ *           <any/>
+ *         </sequence>
+ *         <sequence>
+ *           <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <any/>
+ *         </sequence>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PGPDataType", propOrder = { + "content" +}) +public class PGPDataType { + + @XmlElementRefs({ + @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlAnyElement(lax = true) + protected List content; + + /** + * Gets the rest of the content model. + * + *

+ * You are getting this "catch-all" property because of the following reason: + * The field name "PGPKeyPacket" is used by two different parts of a schema. See: + * line 208 of file:/home/clemens/workspace/bku/schema-base/src/main/schema/xmldsig-core-schema.xsd + * line 203 of file:/home/clemens/workspace/bku/schema-base/src/main/schema/xmldsig-core-schema.xsd + *

+ * To get rid of this property, apply a property customization to one + * of both of the following declarations to change their names: + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link Object } + * {@link Element } + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/RSAKeyValueType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/RSAKeyValueType.java new file mode 100644 index 00000000..dd456bb5 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/RSAKeyValueType.java @@ -0,0 +1,109 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RSAKeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RSAKeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *         <element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RSAKeyValueType", propOrder = { + "modulus", + "exponent" +}) +public class RSAKeyValueType { + + @XmlElement(name = "Modulus", required = true) + protected byte[] modulus; + @XmlElement(name = "Exponent", required = true) + protected byte[] exponent; + + /** + * Gets the value of the modulus property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getModulus() { + return modulus; + } + + /** + * Sets the value of the modulus property. + * + * @param value + * allowed object is + * byte[] + */ + public void setModulus(byte[] value) { + this.modulus = ((byte[]) value); + } + + /** + * Gets the value of the exponent property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getExponent() { + return exponent; + } + + /** + * Sets the value of the exponent property. + * + * @param value + * allowed object is + * byte[] + */ + public void setExponent(byte[] value) { + this.exponent = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java new file mode 100644 index 00000000..9c005a02 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java @@ -0,0 +1,230 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for ReferenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReferenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferenceType", propOrder = { + "transforms", + "digestMethod", + "digestValue" +}) +public class ReferenceType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlElement(name = "DigestMethod", required = true) + protected DigestMethodType digestMethod; + @XmlElement(name = "DigestValue", required = true) + protected byte[] digestValue; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + @XmlAttribute(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the digestMethod property. + * + * @return + * possible object is + * {@link DigestMethodType } + * + */ + public DigestMethodType getDigestMethod() { + return digestMethod; + } + + /** + * Sets the value of the digestMethod property. + * + * @param value + * allowed object is + * {@link DigestMethodType } + * + */ + public void setDigestMethod(DigestMethodType value) { + this.digestMethod = value; + } + + /** + * Gets the value of the digestValue property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getDigestValue() { + return digestValue; + } + + /** + * Sets the value of the digestValue property. + * + * @param value + * allowed object is + * byte[] + */ + public void setDigestValue(byte[] value) { + this.digestValue = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java new file mode 100644 index 00000000..179e3e2c --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java @@ -0,0 +1,143 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RetrievalMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RetrievalMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RetrievalMethodType", propOrder = { + "transforms" +}) +public class RetrievalMethodType { + + @XmlElement(name = "Transforms") + protected TransformsType transforms; + @XmlAttribute(name = "URI") + @XmlSchemaType(name = "anyURI") + protected String uri; + @XmlAttribute(name = "Type") + @XmlSchemaType(name = "anyURI") + protected String type; + + /** + * Gets the value of the transforms property. + * + * @return + * possible object is + * {@link TransformsType } + * + */ + public TransformsType getTransforms() { + return transforms; + } + + /** + * Sets the value of the transforms property. + * + * @param value + * allowed object is + * {@link TransformsType } + * + */ + public void setTransforms(TransformsType value) { + this.transforms = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURI() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURI(String value) { + this.uri = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java new file mode 100644 index 00000000..ec0ae5dc --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java @@ -0,0 +1,99 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for SPKIDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SPKIDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SPKIDataType", propOrder = { + "spkiSexpAndAny" +}) +public class SPKIDataType { + + @XmlElementRef(name = "SPKISexp", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + @XmlAnyElement(lax = true) + protected List spkiSexpAndAny; + + /** + * Gets the value of the spkiSexpAndAny property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the spkiSexpAndAny property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSPKISexpAndAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link Element } + * {@link Object } + * + * + */ + public List getSPKISexpAndAny() { + if (spkiSexpAndAny == null) { + spkiSexpAndAny = new ArrayList(); + } + return this.spkiSexpAndAny; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java new file mode 100644 index 00000000..b915a92f --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java @@ -0,0 +1,131 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for SignatureMethodType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureMethodType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureMethodType", propOrder = { + "content" +}) +public class SignatureMethodType { + + @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * {@link String } + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java new file mode 100644 index 00000000..722d3587 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java @@ -0,0 +1,127 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignaturePropertiesType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePropertiesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePropertiesType", propOrder = { + "signatureProperty" +}) +public class SignaturePropertiesType { + + @XmlElement(name = "SignatureProperty", required = true) + protected List signatureProperty; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the signatureProperty property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signatureProperty property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSignatureProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SignaturePropertyType } + * + * + */ + public List getSignatureProperty() { + if (signatureProperty == null) { + signatureProperty = new ArrayList(); + } + return this.signatureProperty; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java new file mode 100644 index 00000000..10f15721 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java @@ -0,0 +1,160 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.w3c.dom.Element; + + +/** + *

Java class for SignaturePropertyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePropertyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <any/>
+ *       </choice>
+ *       <attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePropertyType", propOrder = { + "content" +}) +public class SignaturePropertyType { + + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Target", required = true) + @XmlSchemaType(name = "anyURI") + protected String target; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link String } + * {@link Object } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java new file mode 100644 index 00000000..ce71624b --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java @@ -0,0 +1,211 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignatureType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureType", propOrder = { + "signedInfo", + "signatureValue", + "keyInfo", + "object" +}) +public class SignatureType { + + @XmlElement(name = "SignedInfo", required = true) + protected SignedInfoType signedInfo; + @XmlElement(name = "SignatureValue", required = true) + protected SignatureValueType signatureValue; + @XmlElement(name = "KeyInfo") + protected KeyInfoType keyInfo; + @XmlElement(name = "Object") + protected List object; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the signedInfo property. + * + * @return + * possible object is + * {@link SignedInfoType } + * + */ + public SignedInfoType getSignedInfo() { + return signedInfo; + } + + /** + * Sets the value of the signedInfo property. + * + * @param value + * allowed object is + * {@link SignedInfoType } + * + */ + public void setSignedInfo(SignedInfoType value) { + this.signedInfo = value; + } + + /** + * Gets the value of the signatureValue property. + * + * @return + * possible object is + * {@link SignatureValueType } + * + */ + public SignatureValueType getSignatureValue() { + return signatureValue; + } + + /** + * Sets the value of the signatureValue property. + * + * @param value + * allowed object is + * {@link SignatureValueType } + * + */ + public void setSignatureValue(SignatureValueType value) { + this.signatureValue = value; + } + + /** + * Gets the value of the keyInfo property. + * + * @return + * possible object is + * {@link KeyInfoType } + * + */ + public KeyInfoType getKeyInfo() { + return keyInfo; + } + + /** + * Sets the value of the keyInfo property. + * + * @param value + * allowed object is + * {@link KeyInfoType } + * + */ + public void setKeyInfo(KeyInfoType value) { + this.keyInfo = value; + } + + /** + * Gets the value of the object property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the object property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getObject().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ObjectType } + * + * + */ + public List getObject() { + if (object == null) { + object = new ArrayList(); + } + return this.object; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java new file mode 100644 index 00000000..764a2092 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java @@ -0,0 +1,115 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignatureValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignatureValueType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignatureValueType", propOrder = { + "value" +}) +public class SignatureValueType { + + @XmlValue + protected byte[] value; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * byte[] + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * byte[] + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java new file mode 100644 index 00000000..b045e668 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java @@ -0,0 +1,183 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlID; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SignedInfoType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedInfoType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedInfoType", propOrder = { + "canonicalizationMethod", + "signatureMethod", + "reference" +}) +public class SignedInfoType { + + @XmlElement(name = "CanonicalizationMethod", required = true) + protected CanonicalizationMethodType canonicalizationMethod; + @XmlElement(name = "SignatureMethod", required = true) + protected SignatureMethodType signatureMethod; + @XmlElement(name = "Reference", required = true) + protected List reference; + @XmlAttribute(name = "Id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + /** + * Gets the value of the canonicalizationMethod property. + * + * @return + * possible object is + * {@link CanonicalizationMethodType } + * + */ + public CanonicalizationMethodType getCanonicalizationMethod() { + return canonicalizationMethod; + } + + /** + * Sets the value of the canonicalizationMethod property. + * + * @param value + * allowed object is + * {@link CanonicalizationMethodType } + * + */ + public void setCanonicalizationMethod(CanonicalizationMethodType value) { + this.canonicalizationMethod = value; + } + + /** + * Gets the value of the signatureMethod property. + * + * @return + * possible object is + * {@link SignatureMethodType } + * + */ + public SignatureMethodType getSignatureMethod() { + return signatureMethod; + } + + /** + * Sets the value of the signatureMethod property. + * + * @param value + * allowed object is + * {@link SignatureMethodType } + * + */ + public void setSignatureMethod(SignatureMethodType value) { + this.signatureMethod = value; + } + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java new file mode 100644 index 00000000..5cfb679a --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java @@ -0,0 +1,132 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for TransformType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <any/>
+ *         <element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </choice>
+ *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformType", propOrder = { + "content" +}) +public class TransformType { + + @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + @XmlMixed + @XmlAnyElement(lax = true) + protected List content; + @XmlAttribute(name = "Algorithm", required = true) + @XmlSchemaType(name = "anyURI") + protected String algorithm; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Object } + * {@link String } + * {@link Element } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the algorithm property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlgorithm(String value) { + this.algorithm = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java new file mode 100644 index 00000000..584baf80 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java @@ -0,0 +1,92 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TransformsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransformsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransformsType", propOrder = { + "transform" +}) +public class TransformsType { + + @XmlElement(name = "Transform", required = true) + protected List transform; + + /** + * Gets the value of the transform property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transform property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTransform().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TransformType } + * + * + */ + public List getTransform() { + if (transform == null) { + transform = new ArrayList(); + } + return this.transform; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java new file mode 100644 index 00000000..4c60f131 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java @@ -0,0 +1,116 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; +import org.w3c.dom.Element; + + +/** + *

Java class for X509DataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="X509DataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence maxOccurs="unbounded">
+ *         <choice>
+ *           <element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/>
+ *           <element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           <any/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "X509DataType", propOrder = { + "x509IssuerSerialOrX509SKIOrX509SubjectName" +}) +public class X509DataType { + + @XmlElementRefs({ + @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) + }) + @XmlAnyElement(lax = true) + protected List x509IssuerSerialOrX509SKIOrX509SubjectName; + + /** + * Gets the value of the x509IssuerSerialOrX509SKIOrX509SubjectName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the x509IssuerSerialOrX509SKIOrX509SubjectName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getX509IssuerSerialOrX509SKIOrX509SubjectName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Element } + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link Object } + * {@link JAXBElement }{@code <}{@link byte[]}{@code >} + * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} + * + * + */ + public List getX509IssuerSerialOrX509SKIOrX509SubjectName() { + if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) { + x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList(); + } + return this.x509IssuerSerialOrX509SKIOrX509SubjectName; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509IssuerSerialType.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509IssuerSerialType.java new file mode 100644 index 00000000..dfb0c353 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/X509IssuerSerialType.java @@ -0,0 +1,114 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2000._09.xmldsig_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for X509IssuerSerialType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="X509IssuerSerialType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="X509IssuerName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="X509SerialNumber" type="{http://www.w3.org/2001/XMLSchema}integer"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "X509IssuerSerialType", propOrder = { + "x509IssuerName", + "x509SerialNumber" +}) +public class X509IssuerSerialType { + + @XmlElement(name = "X509IssuerName", required = true) + protected String x509IssuerName; + @XmlElement(name = "X509SerialNumber", required = true) + protected BigInteger x509SerialNumber; + + /** + * Gets the value of the x509IssuerName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getX509IssuerName() { + return x509IssuerName; + } + + /** + * Sets the value of the x509IssuerName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setX509IssuerName(String value) { + this.x509IssuerName = value; + } + + /** + * Gets the value of the x509SerialNumber property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getX509SerialNumber() { + return x509SerialNumber; + } + + /** + * Sets the value of the x509SerialNumber property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setX509SerialNumber(BigInteger value) { + this.x509SerialNumber = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2000/_09/xmldsig_/package-info.java b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/package-info.java new file mode 100644 index 00000000..f7f42cb4 --- /dev/null +++ b/utils/src/main/java/org/w3/_2000/_09/xmldsig_/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2000/09/xmldsig#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package org.w3._2000._09.xmldsig_; diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/BasePointParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/BasePointParamsType.java new file mode 100644 index 00000000..4746ba0b --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/BasePointParamsType.java @@ -0,0 +1,145 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for BasePointParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="BasePointParamsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BasePoint" type="{http://www.w3.org/2001/04/xmldsig-more#}ECPointType"/>
+ *         <element name="Order" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *         <element name="Cofactor" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BasePointParamsType", propOrder = { + "basePoint", + "order", + "cofactor" +}) +public class BasePointParamsType { + + @XmlElement(name = "BasePoint", required = true) + protected ECPointType basePoint; + @XmlElement(name = "Order", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger order; + @XmlElement(name = "Cofactor") + @XmlSchemaType(name = "positiveInteger") + protected BigInteger cofactor; + + /** + * Gets the value of the basePoint property. + * + * @return + * possible object is + * {@link ECPointType } + * + */ + public ECPointType getBasePoint() { + return basePoint; + } + + /** + * Sets the value of the basePoint property. + * + * @param value + * allowed object is + * {@link ECPointType } + * + */ + public void setBasePoint(ECPointType value) { + this.basePoint = value; + } + + /** + * Gets the value of the order property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getOrder() { + return order; + } + + /** + * Sets the value of the order property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setOrder(BigInteger value) { + this.order = value; + } + + /** + * Gets the value of the cofactor property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getCofactor() { + return cofactor; + } + + /** + * Sets the value of the cofactor property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setCofactor(BigInteger value) { + this.cofactor = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldElemType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldElemType.java new file mode 100644 index 00000000..84281793 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldElemType.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.HexBinaryAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CharTwoFieldElemType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CharTwoFieldElemType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType">
+ *       <attribute name="Value" use="required" type="{http://www.w3.org/2001/XMLSchema}hexBinary" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CharTwoFieldElemType") +public class CharTwoFieldElemType + extends FieldElemType +{ + + @XmlAttribute(name = "Value", required = true) + @XmlJavaTypeAdapter(HexBinaryAdapter.class) + @XmlSchemaType(name = "hexBinary") + protected byte[] value; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public byte[] getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(byte[] value) { + this.value = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldParamsType.java new file mode 100644 index 00000000..6bc6bf8d --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CharTwoFieldParamsType.java @@ -0,0 +1,95 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for CharTwoFieldParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CharTwoFieldParamsType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}FieldParamsType">
+ *       <sequence>
+ *         <element name="M" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CharTwoFieldParamsType", propOrder = { + "m" +}) +@XmlSeeAlso({ + TnBFieldParamsType.class, + PnBFieldParamsType.class +}) +public abstract class CharTwoFieldParamsType + extends FieldParamsType +{ + + @XmlElement(name = "M", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger m; + + /** + * Gets the value of the m property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getM() { + return m; + } + + /** + * Sets the value of the m property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setM(BigInteger value) { + this.m = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CurveParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CurveParamsType.java new file mode 100644 index 00000000..13857c39 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/CurveParamsType.java @@ -0,0 +1,146 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.HexBinaryAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for CurveParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CurveParamsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="A" type="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType"/>
+ *         <element name="B" type="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType"/>
+ *         <element name="Seed" type="{http://www.w3.org/2001/XMLSchema}hexBinary" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CurveParamsType", propOrder = { + "a", + "b", + "seed" +}) +public class CurveParamsType { + + @XmlElement(name = "A", required = true) + protected FieldElemType a; + @XmlElement(name = "B", required = true) + protected FieldElemType b; + @XmlElement(name = "Seed", type = String.class) + @XmlJavaTypeAdapter(HexBinaryAdapter.class) + @XmlSchemaType(name = "hexBinary") + protected byte[] seed; + + /** + * Gets the value of the a property. + * + * @return + * possible object is + * {@link FieldElemType } + * + */ + public FieldElemType getA() { + return a; + } + + /** + * Sets the value of the a property. + * + * @param value + * allowed object is + * {@link FieldElemType } + * + */ + public void setA(FieldElemType value) { + this.a = value; + } + + /** + * Gets the value of the b property. + * + * @return + * possible object is + * {@link FieldElemType } + * + */ + public FieldElemType getB() { + return b; + } + + /** + * Sets the value of the b property. + * + * @param value + * allowed object is + * {@link FieldElemType } + * + */ + public void setB(FieldElemType value) { + this.b = value; + } + + /** + * Gets the value of the seed property. + * + * @return + * possible object is + * {@link String } + * + */ + public byte[] getSeed() { + return seed; + } + + /** + * Sets the value of the seed property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeed(byte[] value) { + this.seed = ((byte[]) value); + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/DomainParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/DomainParamsType.java new file mode 100644 index 00000000..32df54ed --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/DomainParamsType.java @@ -0,0 +1,175 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DomainParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DomainParamsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="ExplicitParams" type="{http://www.w3.org/2001/04/xmldsig-more#}ExplicitParamsType"/>
+ *         <element name="NamedCurve">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="URN" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DomainParamsType", propOrder = { + "explicitParams", + "namedCurve" +}) +public class DomainParamsType { + + @XmlElement(name = "ExplicitParams") + protected ExplicitParamsType explicitParams; + @XmlElement(name = "NamedCurve") + protected DomainParamsType.NamedCurve namedCurve; + + /** + * Gets the value of the explicitParams property. + * + * @return + * possible object is + * {@link ExplicitParamsType } + * + */ + public ExplicitParamsType getExplicitParams() { + return explicitParams; + } + + /** + * Sets the value of the explicitParams property. + * + * @param value + * allowed object is + * {@link ExplicitParamsType } + * + */ + public void setExplicitParams(ExplicitParamsType value) { + this.explicitParams = value; + } + + /** + * Gets the value of the namedCurve property. + * + * @return + * possible object is + * {@link DomainParamsType.NamedCurve } + * + */ + public DomainParamsType.NamedCurve getNamedCurve() { + return namedCurve; + } + + /** + * Sets the value of the namedCurve property. + * + * @param value + * allowed object is + * {@link DomainParamsType.NamedCurve } + * + */ + public void setNamedCurve(DomainParamsType.NamedCurve value) { + this.namedCurve = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="URN" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class NamedCurve { + + @XmlAttribute(name = "URN", required = true) + @XmlSchemaType(name = "anyURI") + protected String urn; + + /** + * Gets the value of the urn property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getURN() { + return urn; + } + + /** + * Sets the value of the urn property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setURN(String value) { + this.urn = value; + } + + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECDSAKeyValueType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECDSAKeyValueType.java new file mode 100644 index 00000000..3a5707f5 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECDSAKeyValueType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ECDSAKeyValueType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ECDSAKeyValueType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DomainParameters" type="{http://www.w3.org/2001/04/xmldsig-more#}DomainParamsType" minOccurs="0"/>
+ *         <element name="PublicKey" type="{http://www.w3.org/2001/04/xmldsig-more#}ECPointType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ECDSAKeyValueType", propOrder = { + "domainParameters", + "publicKey" +}) +public class ECDSAKeyValueType { + + @XmlElement(name = "DomainParameters") + protected DomainParamsType domainParameters; + @XmlElement(name = "PublicKey", required = true) + protected ECPointType publicKey; + + /** + * Gets the value of the domainParameters property. + * + * @return + * possible object is + * {@link DomainParamsType } + * + */ + public DomainParamsType getDomainParameters() { + return domainParameters; + } + + /** + * Sets the value of the domainParameters property. + * + * @param value + * allowed object is + * {@link DomainParamsType } + * + */ + public void setDomainParameters(DomainParamsType value) { + this.domainParameters = value; + } + + /** + * Gets the value of the publicKey property. + * + * @return + * possible object is + * {@link ECPointType } + * + */ + public ECPointType getPublicKey() { + return publicKey; + } + + /** + * Sets the value of the publicKey property. + * + * @param value + * allowed object is + * {@link ECPointType } + * + */ + public void setPublicKey(ECPointType value) { + this.publicKey = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECPointType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECPointType.java new file mode 100644 index 00000000..b0f89260 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ECPointType.java @@ -0,0 +1,113 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ECPointType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ECPointType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="X" type="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType"/>
+ *         <element name="Y" type="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ECPointType", propOrder = { + "x", + "y" +}) +public class ECPointType { + + @XmlElement(name = "X") + protected FieldElemType x; + @XmlElement(name = "Y") + protected FieldElemType y; + + /** + * Gets the value of the x property. + * + * @return + * possible object is + * {@link FieldElemType } + * + */ + public FieldElemType getX() { + return x; + } + + /** + * Sets the value of the x property. + * + * @param value + * allowed object is + * {@link FieldElemType } + * + */ + public void setX(FieldElemType value) { + this.x = value; + } + + /** + * Gets the value of the y property. + * + * @return + * possible object is + * {@link FieldElemType } + * + */ + public FieldElemType getY() { + return y; + } + + /** + * Sets the value of the y property. + * + * @param value + * allowed object is + * {@link FieldElemType } + * + */ + public void setY(FieldElemType value) { + this.y = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ExplicitParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ExplicitParamsType.java new file mode 100644 index 00000000..9cee9105 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ExplicitParamsType.java @@ -0,0 +1,141 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ExplicitParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ExplicitParamsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FieldParams" type="{http://www.w3.org/2001/04/xmldsig-more#}FieldParamsType"/>
+ *         <element name="CurveParams" type="{http://www.w3.org/2001/04/xmldsig-more#}CurveParamsType"/>
+ *         <element name="BasePointParams" type="{http://www.w3.org/2001/04/xmldsig-more#}BasePointParamsType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ExplicitParamsType", propOrder = { + "fieldParams", + "curveParams", + "basePointParams" +}) +public class ExplicitParamsType { + + @XmlElement(name = "FieldParams", required = true) + protected FieldParamsType fieldParams; + @XmlElement(name = "CurveParams", required = true) + protected CurveParamsType curveParams; + @XmlElement(name = "BasePointParams", required = true) + protected BasePointParamsType basePointParams; + + /** + * Gets the value of the fieldParams property. + * + * @return + * possible object is + * {@link FieldParamsType } + * + */ + public FieldParamsType getFieldParams() { + return fieldParams; + } + + /** + * Sets the value of the fieldParams property. + * + * @param value + * allowed object is + * {@link FieldParamsType } + * + */ + public void setFieldParams(FieldParamsType value) { + this.fieldParams = value; + } + + /** + * Gets the value of the curveParams property. + * + * @return + * possible object is + * {@link CurveParamsType } + * + */ + public CurveParamsType getCurveParams() { + return curveParams; + } + + /** + * Sets the value of the curveParams property. + * + * @param value + * allowed object is + * {@link CurveParamsType } + * + */ + public void setCurveParams(CurveParamsType value) { + this.curveParams = value; + } + + /** + * Gets the value of the basePointParams property. + * + * @return + * possible object is + * {@link BasePointParamsType } + * + */ + public BasePointParamsType getBasePointParams() { + return basePointParams; + } + + /** + * Sets the value of the basePointParams property. + * + * @param value + * allowed object is + * {@link BasePointParamsType } + * + */ + public void setBasePointParams(BasePointParamsType value) { + this.basePointParams = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldElemType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldElemType.java new file mode 100644 index 00000000..ab93839a --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldElemType.java @@ -0,0 +1,59 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for FieldElemType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="FieldElemType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FieldElemType") +@XmlSeeAlso({ + OddCharExtensionFieldElemType.class, + PrimeFieldElemType.class, + CharTwoFieldElemType.class +}) +public abstract class FieldElemType { + + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldParamsType.java new file mode 100644 index 00000000..23532f0a --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/FieldParamsType.java @@ -0,0 +1,59 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for FieldParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="FieldParamsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FieldParamsType") +@XmlSeeAlso({ + OddCharExtensionFieldParamsType.class, + PrimeFieldParamsType.class, + CharTwoFieldParamsType.class +}) +public abstract class FieldParamsType { + + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ObjectFactory.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ObjectFactory.java new file mode 100644 index 00000000..9654e331 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/ObjectFactory.java @@ -0,0 +1,180 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.w3._2001._04.xmldsig_more_ package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _ECDSAKeyValue_QNAME = new QName("http://www.w3.org/2001/04/xmldsig-more#", "ECDSAKeyValue"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.w3._2001._04.xmldsig_more_ + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link OddCharExtensionFieldParamsType } + * + */ + public OddCharExtensionFieldParamsType createOddCharExtensionFieldParamsType() { + return new OddCharExtensionFieldParamsType(); + } + + /** + * Create an instance of {@link DomainParamsType } + * + */ + public DomainParamsType createDomainParamsType() { + return new DomainParamsType(); + } + + /** + * Create an instance of {@link ExplicitParamsType } + * + */ + public ExplicitParamsType createExplicitParamsType() { + return new ExplicitParamsType(); + } + + /** + * Create an instance of {@link PrimeFieldElemType } + * + */ + public PrimeFieldElemType createPrimeFieldElemType() { + return new PrimeFieldElemType(); + } + + /** + * Create an instance of {@link CharTwoFieldElemType } + * + */ + public CharTwoFieldElemType createCharTwoFieldElemType() { + return new CharTwoFieldElemType(); + } + + /** + * Create an instance of {@link CurveParamsType } + * + */ + public CurveParamsType createCurveParamsType() { + return new CurveParamsType(); + } + + /** + * Create an instance of {@link DomainParamsType.NamedCurve } + * + */ + public DomainParamsType.NamedCurve createDomainParamsTypeNamedCurve() { + return new DomainParamsType.NamedCurve(); + } + + /** + * Create an instance of {@link ECPointType } + * + */ + public ECPointType createECPointType() { + return new ECPointType(); + } + + /** + * Create an instance of {@link PrimeFieldParamsType } + * + */ + public PrimeFieldParamsType createPrimeFieldParamsType() { + return new PrimeFieldParamsType(); + } + + /** + * Create an instance of {@link TnBFieldParamsType } + * + */ + public TnBFieldParamsType createTnBFieldParamsType() { + return new TnBFieldParamsType(); + } + + /** + * Create an instance of {@link ECDSAKeyValueType } + * + */ + public ECDSAKeyValueType createECDSAKeyValueType() { + return new ECDSAKeyValueType(); + } + + /** + * Create an instance of {@link OddCharExtensionFieldElemType } + * + */ + public OddCharExtensionFieldElemType createOddCharExtensionFieldElemType() { + return new OddCharExtensionFieldElemType(); + } + + /** + * Create an instance of {@link PnBFieldParamsType } + * + */ + public PnBFieldParamsType createPnBFieldParamsType() { + return new PnBFieldParamsType(); + } + + /** + * Create an instance of {@link BasePointParamsType } + * + */ + public BasePointParamsType createBasePointParamsType() { + return new BasePointParamsType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ECDSAKeyValueType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2001/04/xmldsig-more#", name = "ECDSAKeyValue") + public JAXBElement createECDSAKeyValue(ECDSAKeyValueType value) { + return new JAXBElement(_ECDSAKeyValue_QNAME, ECDSAKeyValueType.class, null, value); + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldElemType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldElemType.java new file mode 100644 index 00000000..5108c86d --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldElemType.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OddCharExtensionFieldElemType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OddCharExtensionFieldElemType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType">
+ *       <attribute name="Value" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OddCharExtensionFieldElemType") +public class OddCharExtensionFieldElemType + extends FieldElemType +{ + + @XmlAttribute(name = "Value", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger value; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setValue(BigInteger value) { + this.value = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldParamsType.java new file mode 100644 index 00000000..b788d731 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/OddCharExtensionFieldParamsType.java @@ -0,0 +1,119 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for OddCharExtensionFieldParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OddCharExtensionFieldParamsType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}FieldParamsType">
+ *       <sequence>
+ *         <element name="M" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *         <element name="W" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OddCharExtensionFieldParamsType", propOrder = { + "m", + "w" +}) +public class OddCharExtensionFieldParamsType + extends FieldParamsType +{ + + @XmlElement(name = "M", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger m; + @XmlElement(name = "W", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger w; + + /** + * Gets the value of the m property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getM() { + return m; + } + + /** + * Sets the value of the m property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setM(BigInteger value) { + this.m = value; + } + + /** + * Gets the value of the w property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getW() { + return w; + } + + /** + * Sets the value of the w property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setW(BigInteger value) { + this.w = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PnBFieldParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PnBFieldParamsType.java new file mode 100644 index 00000000..fd829b60 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PnBFieldParamsType.java @@ -0,0 +1,148 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for PnBFieldParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PnBFieldParamsType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}CharTwoFieldParamsType">
+ *       <sequence>
+ *         <element name="K1" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *         <element name="K2" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *         <element name="K3" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PnBFieldParamsType", propOrder = { + "k1", + "k2", + "k3" +}) +public class PnBFieldParamsType + extends CharTwoFieldParamsType +{ + + @XmlElement(name = "K1", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger k1; + @XmlElement(name = "K2", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger k2; + @XmlElement(name = "K3", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger k3; + + /** + * Gets the value of the k1 property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getK1() { + return k1; + } + + /** + * Sets the value of the k1 property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setK1(BigInteger value) { + this.k1 = value; + } + + /** + * Gets the value of the k2 property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getK2() { + return k2; + } + + /** + * Sets the value of the k2 property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setK2(BigInteger value) { + this.k2 = value; + } + + /** + * Gets the value of the k3 property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getK3() { + return k3; + } + + /** + * Sets the value of the k3 property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setK3(BigInteger value) { + this.k3 = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldElemType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldElemType.java new file mode 100644 index 00000000..10da8f46 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldElemType.java @@ -0,0 +1,86 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for PrimeFieldElemType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PrimeFieldElemType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}FieldElemType">
+ *       <attribute name="Value" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PrimeFieldElemType") +public class PrimeFieldElemType + extends FieldElemType +{ + + @XmlAttribute(name = "Value", required = true) + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger value; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setValue(BigInteger value) { + this.value = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldParamsType.java new file mode 100644 index 00000000..c1c18de9 --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/PrimeFieldParamsType.java @@ -0,0 +1,90 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for PrimeFieldParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PrimeFieldParamsType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}FieldParamsType">
+ *       <sequence>
+ *         <element name="P" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PrimeFieldParamsType", propOrder = { + "p" +}) +public class PrimeFieldParamsType + extends FieldParamsType +{ + + @XmlElement(name = "P", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger p; + + /** + * Gets the value of the p property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getP() { + return p; + } + + /** + * Sets the value of the p property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setP(BigInteger value) { + this.p = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/TnBFieldParamsType.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/TnBFieldParamsType.java new file mode 100644 index 00000000..30e245fd --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/TnBFieldParamsType.java @@ -0,0 +1,90 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + + +package org.w3._2001._04.xmldsig_more_; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for TnBFieldParamsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TnBFieldParamsType">
+ *   <complexContent>
+ *     <extension base="{http://www.w3.org/2001/04/xmldsig-more#}CharTwoFieldParamsType">
+ *       <sequence>
+ *         <element name="K" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TnBFieldParamsType", propOrder = { + "k" +}) +public class TnBFieldParamsType + extends CharTwoFieldParamsType +{ + + @XmlElement(name = "K", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger k; + + /** + * Gets the value of the k property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getK() { + return k; + } + + /** + * Sets the value of the k property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setK(BigInteger value) { + this.k = value; + } + +} diff --git a/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/package-info.java b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/package-info.java new file mode 100644 index 00000000..75a3fd6f --- /dev/null +++ b/utils/src/main/java/org/w3/_2001/_04/xmldsig_more_/package-info.java @@ -0,0 +1,25 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.07.21 at 09:30:44 AM GMT +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2001/04/xmldsig-more#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package org.w3._2001._04.xmldsig_more_; diff --git a/utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java b/utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java new file mode 100644 index 00000000..5d1a0fcf --- /dev/null +++ b/utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java @@ -0,0 +1,49 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.utils; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Random; + +import org.junit.Test; + +public class HexDumpTest { + + @Test + public void testHexDump() throws IOException { + + byte[] bytes = new byte[734]; + int i = 0; + for (; i < 256; i++) { + bytes[i] = (byte) i; + } + + Random random = new Random(); + for (; i < bytes.length; i++) { + bytes[i] = (byte) random.nextInt(); + } + + PrintWriter writer = new PrintWriter(System.out); + HexDump.hexDump(new ByteArrayInputStream(bytes), writer, 32); + writer.flush(); + + } + + +} diff --git a/utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java b/utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java new file mode 100644 index 00000000..e89f6137 --- /dev/null +++ b/utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.idlink; + +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.xml.bind.JAXBException; +import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; + +import at.buergerkarte.namespaces.personenbindung._20020506_.CompressedIdentityLinkType; +import at.gv.egiz.bku.utils.HexDump; +import at.gv.egiz.idlink.ans1.IdentityLink; + +public class CompressIdentityLink { + + /** + * @param args + * @throws JAXBException + * @throws IOException + */ + public static void main(String[] args) throws JAXBException, IOException { + + FileInputStream fis = new FileInputStream(args[0]); + Source source = new StreamSource(fis); + + CompressedIdentityLinkFactory factory = CompressedIdentityLinkFactory.getInstance(); + + CompressedIdentityLinkType compressedIdentity = factory.unmarshallCompressedIdentityLink(source); + + IdentityLink idLink = factory.createIdLink(compressedIdentity); + + FileOutputStream outputStream = new FileOutputStream("idlink.bin"); + outputStream.write(idLink.toByteArray()); + outputStream.close(); + + } + +} diff --git a/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java b/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java new file mode 100644 index 00000000..99d353ac --- /dev/null +++ b/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java @@ -0,0 +1,194 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package at.gv.egiz.slbinding; + +import at.buergerkarte.namespaces.securitylayer._1.Base64XMLLocRefOptRefContentType; +import javax.xml.bind.JAXBException; + +import org.junit.Before; +import org.junit.Test; + +import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectAssociationType; +import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; +import at.buergerkarte.namespaces.securitylayer._1.MetaInfoType; +import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType; +import at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType; +import at.gv.egiz.slbinding.impl.SignatureLocationType; +import at.gv.egiz.slbinding.impl.XMLContentType; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Iterator; +import java.util.List; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.Marshaller; +import javax.xml.bind.Unmarshaller; +import javax.xml.namespace.NamespaceContext; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; + +import static org.junit.Assert.*; + +/** + * + * @author clemens + */ +public class RedirectTest { + + public static final String FILENAME_REQ = "src/test/requests/CreateXMLSignatureRequest02.xml"; + public static final String FILENAME_REQ_SCHEMA = "src/main/schema/Core-1.2.xsd"; + + /** + * Context path for unmarshaller (colon separated list of generated packages) + */ + @Before + public void setUp() throws JAXBException { + } + + @Test + public void testRedirect() { + try { + String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName(); + String dsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); + + JAXBContext jaxbContext = JAXBContext.newInstance(slPkg + ":" + dsigPkg); + Unmarshaller um = jaxbContext.createUnmarshaller(); + +// SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); +// File schemaFile = new File(FILENAME_REQ_SCHEMA); +// Schema TestRequestLaxSchema = schemaFactory.newSchema(schemaFile); +// // validate request +// um.setSchema(TestRequestLaxSchema); + + + FileInputStream fis = new FileInputStream(FILENAME_REQ); + InputStream is = new BufferedInputStream(fis); + + XMLInputFactory inputFactory = XMLInputFactory.newInstance(); + XMLEventReader reader = inputFactory.createXMLEventReader(is); + final RedirectEventFilter contentFilter = new RedirectEventFilter(); + XMLEventReader filteredReader = inputFactory.createFilteredReader(reader, contentFilter); + + um.setListener(new RedirectUnmarshallerListener(contentFilter)); + +// List redirectTriggers = Arrays.asList(new Class[]{XMLContentType.class, TransformsType.class}); +// Set> redirectTriggers = new HashSet>(); //{XMLContentType.class, TransformsType.class +// redirectTriggers.add(XMLContentType.class); +// redirectTriggers.add(TransformsType.class); +// ByteArrayRedirectCallback.registerRedirectTriggers(redirectTriggers); +// +// Set> preserveNSContextTriggers = new HashSet>(); +//// preserveNSContextTriggers.add(TransformsType.class); +// preserveNSContextTriggers.add(SignatureInfoCreationType.SignatureLocation.class); +// ByteArrayRedirectCallback.registerPreserveContextTriggers(preserveNSContextTriggers); + + JAXBElement req = (JAXBElement) um.unmarshal(filteredReader); + is.close(); + + FileOutputStream fos = new FileOutputStream(FILENAME_REQ + "_redirect.txt"); + OutputStream os = new BufferedOutputStream(fos); + + CreateXMLSignatureRequestType request = req.getValue(); + List dataObjectInfos = request.getDataObjectInfo(); + Iterator doiIt = dataObjectInfos.iterator(); + while (doiIt.hasNext()) { + DataObjectInfoType doi = doiIt.next(); + Base64XMLLocRefOptRefContentType dataObj = doi.getDataObject(); + XMLContentType dataObjXML = (XMLContentType) dataObj.getXMLContent(); + if (dataObjXML != null) { + System.out.println("found at.gv.egiz.slbinding.impl.XMLContentType DataObject"); + ByteArrayOutputStream xmlContent = dataObjXML.getRedirectedStream(); + assertNotNull(xmlContent); + os.write(xmlContent.toByteArray()); + os.write("\n\n\n".getBytes()); + } + + List transformsInfos = doi.getTransformsInfo(); + Iterator tiIt = transformsInfos.iterator(); + while (tiIt.hasNext()) { + at.gv.egiz.slbinding.impl.TransformsInfoType ti = (at.gv.egiz.slbinding.impl.TransformsInfoType) tiIt.next(); + assertNotNull(ti); + System.out.println("found at.gv.egiz.slbinding.impl.TransformsInfoType TransformsInfo"); + ByteArrayOutputStream dsigTransforms = ti.getRedirectedStream(); + os.write(dsigTransforms.toByteArray()); + os.write("\n".getBytes()); + + MetaInfoType mi = ti.getFinalDataMetaInfo(); + assertNotNull(mi); + assertNull(ti.getTransforms()); + + } + List supplements = doi.getSupplement(); + if (supplements != null) { + Iterator doaIt = supplements.iterator(); + while (doaIt.hasNext()) { + System.out.println("found Supplement"); + } + } + } + SignatureInfoCreationType si = request.getSignatureInfo(); + if (si != null) { +// Base64XMLOptRefContentType sigEnv = si.getSignatureEnvironment(); +// XMLContentType sigEnvXML = sigEnv.getXMLContent(); +// if (sigEnvXML != null) { +// System.out.println("found SignatureEnvironment XMLContent"); +// ByteArrayOutputStream xmlContent = sigEnvXML.getRedirectedStream(); +// os.write(xmlContent.toByteArray()); +// os.write("\n".getBytes()); +// } +// +// SignatureInfoCreationType.SignatureLocation sigLocation = si.getSignatureLocation(); + SignatureLocationType sigLocation = (SignatureLocationType) si.getSignatureLocation(); + assertNotNull(sigLocation); + System.out.println("found at.gv.egiz.slbinding.impl.SignatureLocationType SignatureLocation"); + + NamespaceContext ctx = sigLocation.getNamespaceContext(); + assertNotNull(ctx); + String samlNS = ctx.getNamespaceURI("saml"); + assertEquals(samlNS, "urn:oasis:names:tc:SAML:2.0:assertion"); + System.out.println("found preserved namespace xmlns:saml " + samlNS); + + } + os.flush(); + os.close(); + + fos = new FileOutputStream(FILENAME_REQ + "_bound.xml"); + os = new BufferedOutputStream(fos); + + Marshaller m = jaxbContext.createMarshaller(); + m.marshal(req, os); + + os.flush(); + os.close(); + + } catch (Exception ex) { + ex.printStackTrace(); + } + + + } +} diff --git a/utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java b/utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java new file mode 100644 index 00000000..1e0ce916 --- /dev/null +++ b/utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java @@ -0,0 +1,88 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.urldereferencer; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; + +import org.junit.Before; +import org.junit.Test; +import static org.junit.Assert.*; + +import at.gv.egiz.bku.utils.StreamUtil; +import at.gv.egiz.bku.utils.urldereferencer.FormDataURLSupplier; +import at.gv.egiz.bku.utils.urldereferencer.SimpleFormDataContextImpl; +import at.gv.egiz.bku.utils.urldereferencer.StreamData; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; +import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; + +public class FormDataTest implements FormDataURLSupplier { + + protected URLDereferencerContext urlCtx; + protected InputStream testStream = null; + protected String contentType = null; + protected String paramName = ""; + + @Override + public InputStream getFormData(String parameterName) { + if (paramName.equals(parameterName)) { + return testStream; + } else { + return null; + } + } + + @Override + public String getFormDataContentType(String parameterName) { + if (paramName.equals(parameterName)) { + return contentType; + } else { + return null; + } + } + + @Before + public void setUp() { + urlCtx = new SimpleFormDataContextImpl(this); + } + + @Test(expected = MalformedURLException.class) + public void testInvalidFormdataUrl() throws IOException { + String url = "abs://whatknowi"; + StreamData sd = URLDereferencer.getInstance().dereference(url, urlCtx); + assertNull(sd); + url = ":://whatknowi"; + sd = URLDereferencer.getInstance().dereference(url, urlCtx); + assertNull(sd); + url = ""; + sd = URLDereferencer.getInstance().dereference(url, urlCtx); + } + + @Test + public void testFormData() throws IOException { + paramName = "Müllcontainer"; + String url = "formdata:"+paramName; + StreamData sd = URLDereferencer.getInstance().dereference(url, urlCtx); + assertNull(sd); + testStream = new ByteArrayInputStream("HelloWorld".getBytes("UTF-8")); + sd = URLDereferencer.getInstance().dereference(url, urlCtx); + String result = StreamUtil.asString(sd.getStream(), "UTF-8"); + assertEquals("HelloWorld", result); + } +} diff --git a/utils/src/test/requests/CreateCMSSignatureRequest01.xml b/utils/src/test/requests/CreateCMSSignatureRequest01.xml new file mode 100644 index 00000000..1406c1dd --- /dev/null +++ b/utils/src/test/requests/CreateCMSSignatureRequest01.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/utils/src/test/requests/CreateXMLSignatureRequest01.xml b/utils/src/test/requests/CreateXMLSignatureRequest01.xml new file mode 100644 index 00000000..72633ff7 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest01.xml @@ -0,0 +1,27 @@ + + + + + + + + + line + feed + + + + + + + + + + + + + + diff --git a/utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml b/utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml new file mode 100644 index 00000000..7cd28d68 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml b/utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml new file mode 100644 index 00000000..b6b1cdb8 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml @@ -0,0 +1,5 @@ + + + line + feed + \ No newline at end of file diff --git a/utils/src/test/requests/CreateXMLSignatureRequest02.xml b/utils/src/test/requests/CreateXMLSignatureRequest02.xml new file mode 100644 index 00000000..943722b1 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest02.xml @@ -0,0 +1,304 @@ + + + SecureSignatureKeypair + + + + + + + + + + + Signatur der Anmeldedaten + + + +

Signatur der Anmeldedaten

+

+

Mit meiner elektronischen Signatur beantrage ich, + + , geboren am . . , in der Rolle als (OID***= ), den Zugang zur gesicherten Anwendung.

+

+

Datum und Uhrzeit: . . , : + : +

+ +

HPI(**):

+
+ +

wbPK(*):

+
+ +
+

Ich bin weiters ermächtigt als von + , geboren am . . + + , + , in deren Auftrag zu handeln. +

wbPK(*) des Vollmachtgebers:

+
+

+

+ + + +

+


+ + +

+


+
+ +

+


+
+ + +
(*) wbPK: Das wirtschaftsbereichsspezifische + Personenkennzeichen wird aus den jeweiligen + Stammzahlen des Bürgers und des Wirtschaftsunternehmens + berechnet und ermöglicht eine eindeutige Zuordnung des + Bürgers zum Wirtschaftsunternehmen.
+
+ +
(**) HPI: Der eHealth Professional + Identifier wird aus den jeweiligen Stammzahlen + der Gesundheitsdiensteanbieterinnen / + Gesundheitsdiensteanbieter berechnet und ermöglicht eine + eindeutige Zuordnung der Gesundheitsdiensteanbieterin / + des Gesundheitsdiensteanbieters im + Gesundheitsbereich.
+
+ +
(***) OID: Object Identifier sind + standardisierte Objekt-Bezeichner und beschreiben + eindeutig die Rollen des GDA-Token Inhabers.
+
+ + +
+
+
+ +
+ + application/xhtml+xml + +
+ + + + + + + + + + Signatur der Anmeldedaten + + +

Signatur der Anmeldedaten

+

+

Mit meiner elektronischen Signatur beantrage ich, + + , geboren am . . , in der Rolle als (OID***= ), den Zugang zur gesicherten Anwendung.

+

+

Datum und Uhrzeit: . . , : + : +

+ +

HPI(**):

+
+ +

wbPK(*):

+
+ +
+

Ich bin weiters ermächtigt als von + , geboren am . . + + , + , in deren Auftrag zu handeln. +

wbPK(*) des Vollmachtgebers:

+
+

+

+ + + +

+


+ + +

+


+
+ +

+


+
+ + +
(*) wbPK: Das wirtschaftsbereichsspezifische + Personenkennzeichen wird aus den jeweiligen + Stammzahlen des Bürgers und des Wirtschaftsunternehmens + berechnet und ermöglicht eine eindeutige Zuordnung des + Bürgers zum Wirtschaftsunternehmen.
+
+ +
(**) HPI: Der eHealth Professional Identifier + wird aus den jeweiligen Stammzahlen der + Gesundheitsdiensteanbieterinnen / + Gesundheitsdiensteanbieter berechnet und ermöglicht eine + eindeutige Zuordnung der Gesundheitsdiensteanbieterin / + des Gesundheitsdiensteanbieters im + Gesundheitsbereich.
+
+ +
(***) OID: Object Identifier sind standardisierte + Objekt-Bezeichner und beschreiben eindeutig die Rollen + des GDA-Token Inhabers.
+
+ + +
+
+
+ +
+ + text/html + +
+
+ + + + + + + https://demo.egiz.gv.at/exchange-moa-id-auth/ + + + + + LTpz8VYzns2jrx0J8Gm/R/nAhxA= + urn:publicid:gv.at:wbpk+FN+TODO + + + + + https://apps.egiz.gv.at/urlaubsschein-frontend/moaid-login + + + 1971-11-10 + + + + + + /saml:Assertion + +
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml new file mode 100644 index 00000000..de881c31 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml @@ -0,0 +1 @@ +SecureSignatureKeypairapplication/xhtml+xmltext/html/saml:Assertion \ No newline at end of file diff --git a/utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt new file mode 100644 index 00000000..31be50b7 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt @@ -0,0 +1,164 @@ + + + + + + + + Signatur der Anmeldedaten + + + +

Signatur der Anmeldedaten

+

+

Mit meiner elektronischen Signatur beantrage ich, + + , geboren am . . , in der Rolle als (OID***= ), den Zugang zur gesicherten Anwendung.

+

+

Datum und Uhrzeit: . . , : + : +

+ +

HPI(**):

+
+ +

wbPK(*):

+
+ +
+

Ich bin weiters ermächtigt als von + , geboren am . . + + , + , in deren Auftrag zu handeln. +

wbPK(*) des Vollmachtgebers:

+
+

+

+
+ + +

+
+
+ +

+
+
+ +

+
+
+
+ +
(*) wbPK: Das wirtschaftsbereichsspezifische + Personenkennzeichen wird aus den jeweiligen + Stammzahlen des Bürgers und des Wirtschaftsunternehmens + berechnet und ermöglicht eine eindeutige Zuordnung des + Bürgers zum Wirtschaftsunternehmen.
+
+ +
(**) HPI: Der eHealth Professional + Identifier wird aus den jeweiligen Stammzahlen + der Gesundheitsdiensteanbieterinnen / + Gesundheitsdiensteanbieter berechnet und ermöglicht eine + eindeutige Zuordnung der Gesundheitsdiensteanbieterin / + des Gesundheitsdiensteanbieters im + Gesundheitsbereich.
+
+ +
(***) OID: Object Identifier sind + standardisierte Objekt-Bezeichner und beschreiben + eindeutig die Rollen des GDA-Token Inhabers.
+
+ + +
+
+
+ +
+ + + + + + + + + Signatur der Anmeldedaten + + +

Signatur der Anmeldedaten

+

+

Mit meiner elektronischen Signatur beantrage ich, + + , geboren am . . , in der Rolle als (OID***= ), den Zugang zur gesicherten Anwendung.

+

+

Datum und Uhrzeit: . . , : + : +

+ +

HPI(**):

+
+ +

wbPK(*):

+
+ +
+

Ich bin weiters ermächtigt als von + , geboren am . . + + , + , in deren Auftrag zu handeln. +

wbPK(*) des Vollmachtgebers:

+
+

+

+
+ + +

+
+
+ +

+
+
+ +

+
+
+
+ +
(*) wbPK: Das wirtschaftsbereichsspezifische + Personenkennzeichen wird aus den jeweiligen + Stammzahlen des Bürgers und des Wirtschaftsunternehmens + berechnet und ermöglicht eine eindeutige Zuordnung des + Bürgers zum Wirtschaftsunternehmen.
+
+ +
(**) HPI: Der eHealth Professional Identifier + wird aus den jeweiligen Stammzahlen der + Gesundheitsdiensteanbieterinnen / + Gesundheitsdiensteanbieter berechnet und ermöglicht eine + eindeutige Zuordnung der Gesundheitsdiensteanbieterin / + des Gesundheitsdiensteanbieters im + Gesundheitsbereich.
+
+ +
(***) OID: Object Identifier sind standardisierte + Objekt-Bezeichner und beschreiben eindeutig die Rollen + des GDA-Token Inhabers.
+
+ + +
+
+
+ +
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest03.xml b/utils/src/test/requests/CreateXMLSignatureRequest03.xml new file mode 100644 index 00000000..c21fa6b1 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest03.xml @@ -0,0 +1,10 @@ + + +    +      +       I am a simple funny text. +      +    + \ No newline at end of file diff --git a/utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml new file mode 100644 index 00000000..31cc86df --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt new file mode 100644 index 00000000..80a4dce3 --- /dev/null +++ b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt @@ -0,0 +1,3 @@ +I am a simple funny text. + + diff --git a/utils/src/test/resources/commons-logging.properties b/utils/src/test/resources/commons-logging.properties new file mode 100644 index 00000000..29292562 --- /dev/null +++ b/utils/src/test/resources/commons-logging.properties @@ -0,0 +1 @@ +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/utils/src/test/resources/log4j.properties b/utils/src/test/resources/log4j.properties new file mode 100644 index 00000000..d9065c14 --- /dev/null +++ b/utils/src/test/resources/log4j.properties @@ -0,0 +1,19 @@ +# loglever DEBUG, appender STDOUT +log4j.rootLogger=DEBUG, STDOUT +#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p %c %x- %m%n + +### FILE appender +#log4j.appender.file=org.apache.log4j.RollingFileAppender +#log4j.appender.file.maxFileSize=100KB +#log4j.appender.file.maxBackupIndex=9 +#log4j.appender.file.File=egovbus_ca.log +#log4j.appender.file.threshold=info +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file -- cgit v1.2.3