Package org.apache.juddi.model

Examples of org.apache.juddi.model.Signature


        private static List<Signature> mapApiSignaturesToModelSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures)
           throws DispositionReportFaultMessage {
            List<Signature> modelSignatures = new ArrayList<Signature>();
            modelSignatures.clear();
            for (org.w3._2000._09.xmldsig_.SignatureType signatureType : apiSignatures) {
                Signature modelSignature = new Signature();
               
                org.w3._2000._09.xmldsig_.SignedInfoType apiSignedInfo = signatureType.getSignedInfo();
                SignedInfo modelSignedInfo = new SignedInfo();
                modelSignature.setSignedInfo(modelSignedInfo);
               
                String canonicalizationAlgMethod = apiSignedInfo.getCanonicalizationMethod().getAlgorithm();
                CanonicalizationMethod modelCanonMethod = new CanonicalizationMethod();
                modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);
                modelCanonMethod.setAlgorithm(canonicalizationAlgMethod);
               
                SignatureMethod modelSigMethod = new SignatureMethod();
                modelSignedInfo.setSignatureMethod(modelSigMethod);
                String sigMethod = apiSignedInfo.getSignatureMethod().getAlgorithm();
                modelSigMethod.setAlgorithm(sigMethod);
               
                List<org.w3._2000._09.xmldsig_.ReferenceType> apiReferenceList = apiSignedInfo.getReference();
                for (org.w3._2000._09.xmldsig_.ReferenceType apiReference : apiReferenceList) {
                    Reference ref = mapReference(modelSignedInfo, apiReference);
                    modelSignedInfo.getReference().add(ref);
                }
               
                modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);
               
                org.w3._2000._09.xmldsig_.SignatureValueType apiSignatureValue = signatureType.getSignatureValue();
                SignatureValue modelSignatureValue = new SignatureValue();
                byte[] signatureValueBytes = apiSignatureValue.getValue();
                String signatureValueXmlID = apiSignatureValue.getId();
                modelSignatureValue.setValue(signatureValueBytes);
                modelSignatureValue.setXmlID(signatureValueXmlID);
                modelSignature.setSignatureValue(modelSignatureValue);
               
                org.w3._2000._09.xmldsig_.KeyInfoType apiKeyInfo = signatureType.getKeyInfo();
                String apiKeyInfoXmlID = apiKeyInfo.getId();
                KeyInfo modelKeyInfo = new KeyInfo();
                modelSignature.setKeyInfo(modelKeyInfo);
                modelKeyInfo.setXmlID(apiKeyInfoXmlID);
               
                List<Object> apiKeyInfoContentList = apiKeyInfo.getContent();
                List<KeyDataValue> keyInfoDataValues = modelKeyInfo.getKeyDataValue();
                for (Object apiKeyInfoContentObj : apiKeyInfoContentList) {
View Full Code Here


        private static List<Signature> mapApiSignaturesToModelSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures)
                throws DispositionReportFaultMessage {
                List<Signature> modelSignatures = new ArrayList<Signature>();
                modelSignatures.clear();
                for (org.w3._2000._09.xmldsig_.SignatureType signatureType : apiSignatures) {
                        Signature modelSignature = new Signature();

                        org.w3._2000._09.xmldsig_.SignedInfoType apiSignedInfo = signatureType.getSignedInfo();
                        SignedInfo modelSignedInfo = new SignedInfo();
                        modelSignature.setSignedInfo(modelSignedInfo);

                        String canonicalizationAlgMethod = apiSignedInfo.getCanonicalizationMethod().getAlgorithm();
                        CanonicalizationMethod modelCanonMethod = new CanonicalizationMethod();
                        modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);
                        modelCanonMethod.setAlgorithm(canonicalizationAlgMethod);

                        SignatureMethod modelSigMethod = new SignatureMethod();
                        modelSignedInfo.setSignatureMethod(modelSigMethod);
                        String sigMethod = apiSignedInfo.getSignatureMethod().getAlgorithm();
                        modelSigMethod.setAlgorithm(sigMethod);

                        List<org.w3._2000._09.xmldsig_.ReferenceType> apiReferenceList = apiSignedInfo.getReference();
                        for (org.w3._2000._09.xmldsig_.ReferenceType apiReference : apiReferenceList) {
                                Reference ref = mapReference(modelSignedInfo, apiReference);
                                modelSignedInfo.getReference().add(ref);
                        }

                        modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);

                        org.w3._2000._09.xmldsig_.SignatureValueType apiSignatureValue = signatureType.getSignatureValue();
                        SignatureValue modelSignatureValue = new SignatureValue();
                        byte[] signatureValueBytes = apiSignatureValue.getValue();
                        String signatureValueXmlID = apiSignatureValue.getId();
                        modelSignatureValue.setValue(signatureValueBytes);
                        modelSignatureValue.setXmlID(signatureValueXmlID);
                        modelSignature.setSignatureValue(modelSignatureValue);

                        org.w3._2000._09.xmldsig_.KeyInfoType apiKeyInfo = signatureType.getKeyInfo();
                        String apiKeyInfoXmlID = apiKeyInfo.getId();
                        KeyInfo modelKeyInfo = new KeyInfo();
                        modelSignature.setKeyInfo(modelKeyInfo);
                        modelKeyInfo.setXmlID(apiKeyInfoXmlID);

                        List<Object> apiKeyInfoContentList = apiKeyInfo.getContent();
                        List<KeyDataValue> keyInfoDataValues = modelKeyInfo.getKeyDataValue();
                        for (Object apiKeyInfoContentObj : apiKeyInfoContentList) {
View Full Code Here

        private static List<Signature> mapApiSignaturesToModelSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures)
           throws DispositionReportFaultMessage {
            List<Signature> modelSignatures = new ArrayList<Signature>();
            modelSignatures.clear();
            for (org.w3._2000._09.xmldsig_.SignatureType signatureType : apiSignatures) {
                Signature modelSignature = new Signature();
               
                org.w3._2000._09.xmldsig_.SignedInfoType apiSignedInfo = signatureType.getSignedInfo();
                SignedInfo modelSignedInfo = new SignedInfo();
                modelSignature.setSignedInfo(modelSignedInfo);
               
                String canonicalizationAlgMethod = apiSignedInfo.getCanonicalizationMethod().getAlgorithm();
                CanonicalizationMethod modelCanonMethod = new CanonicalizationMethod();
                modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);
                modelCanonMethod.setAlgorithm(canonicalizationAlgMethod);
               
                SignatureMethod modelSigMethod = new SignatureMethod();
                modelSignedInfo.setSignatureMethod(modelSigMethod);
                String sigMethod = apiSignedInfo.getSignatureMethod().getAlgorithm();
                modelSigMethod.setAlgorithm(sigMethod);
               
                List<org.w3._2000._09.xmldsig_.ReferenceType> apiReferenceList = apiSignedInfo.getReference();
                for (org.w3._2000._09.xmldsig_.ReferenceType apiReference : apiReferenceList) {
                    Reference ref = mapReference(modelSignedInfo, apiReference);
                    modelSignedInfo.getReference().add(ref);
                }
               
                modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);
               
                org.w3._2000._09.xmldsig_.SignatureValueType apiSignatureValue = signatureType.getSignatureValue();
                SignatureValue modelSignatureValue = new SignatureValue();
                byte[] signatureValueBytes = apiSignatureValue.getValue();
                String signatureValueXmlID = apiSignatureValue.getId();
                modelSignatureValue.setValue(signatureValueBytes);
                modelSignatureValue.setXmlID(signatureValueXmlID);
                modelSignature.setSignatureValue(modelSignatureValue);
               
                org.w3._2000._09.xmldsig_.KeyInfoType apiKeyInfo = signatureType.getKeyInfo();
                String apiKeyInfoXmlID = apiKeyInfo.getId();
                KeyInfo modelKeyInfo = new KeyInfo();
                modelSignature.setKeyInfo(modelKeyInfo);
                modelKeyInfo.setXmlID(apiKeyInfoXmlID);
               
                List<Object> apiKeyInfoContentList = apiKeyInfo.getContent();
                List<KeyDataValue> keyInfoDataValues = modelKeyInfo.getKeyDataValue();
                for (Object apiKeyInfoContentObj : apiKeyInfoContentList) {
View Full Code Here

TOP

Related Classes of org.apache.juddi.model.Signature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.