Package com.sun.xml.ws.security.secext10

Examples of com.sun.xml.ws.security.secext10.ReferenceType


               
                // References
                List<Reference> modelReferenceList = modelSignedInfo.getReference();
                List<ReferenceType> apiReferenceList = apiSignedInfoType.getReference();
                for (Reference modelRef : modelReferenceList) {
                    ReferenceType apiRef = new ReferenceType();
                    String refUri = modelRef.getUri();
                    if (refUri == null) {
                        refUri = "";
                    }
                    apiRef.setURI(refUri);
                   
                    List<SignatureTransform> modelSigTransformList = modelRef.getTransforms();
                    TransformsType apiTransformsType = apiRef.getTransforms();
                    if (apiTransformsType == null) {
                        apiTransformsType = new TransformsType();
                        apiRef.setTransforms(apiTransformsType);
                    }
                    List<TransformType> apiTransformList = apiTransformsType.getTransform();
                    for (SignatureTransform modelSigTransform : modelSigTransformList) {
                        String modelTransformAlgStr = modelSigTransform.getTransform();
                        TransformType apiTransform = new TransformType();
                        apiTransform.setAlgorithm(modelTransformAlgStr);
                       
                        List<SignatureTransformDataValue> sigTransformSDVList = modelSigTransform.getSignatureTransformDataValue();
                        for (SignatureTransformDataValue sigTransformSDV : sigTransformSDVList) {
                            String type = sigTransformSDV.getContentType();
                            byte[] xformBytes = sigTransformSDV.getContentBytes();
                            Object transformObject = convertDataToTransformContent(type, xformBytes);
                            apiTransform.getContent().add(transformObject);
                        }
                       
                        apiTransformList.add(apiTransform);
                    }
                   
                    String digestMethodStr = modelRef.getDigestMethod();
                    byte[] digestValBytes = modelRef.getDigestValue();
                   
                    DigestMethodType apiDigestMethod = new DigestMethodType();
                    apiDigestMethod.setAlgorithm(digestMethodStr);
                    apiRef.setDigestMethod(apiDigestMethod);
                    apiRef.setDigestValue(digestValBytes);
                   
                    apiReferenceList.add(apiRef);
                }
               
                // Signature Value
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.security.secext10.ReferenceType

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.