Package com.sun.xml.ws.security.opt.impl.outgoing

Examples of com.sun.xml.ws.security.opt.impl.outgoing.SecurityHeader


        this.soapVersion = soapVersion;
    }
   
   
    public SecurityHeader createSecurityHeader(){
        return new SecurityHeader();
    }
View Full Code Here


    public SecurityHeader createSecurityHeader(){
        return new SecurityHeader();
    }
   
    public SecurityHeader createSecurityHeader(int headerLayout, String soapVersion, boolean mustUnderstandValue){
        return new SecurityHeader(headerLayout, soapVersion, mustUnderstandValue);
    }
View Full Code Here

                            secMessage.replaceHeader(header, smh);
                            targets.add(smh);
                        }
                    }
                   
                    SecurityHeader sh = fpContext.getSecurityHeader();
                    headers = sh.getHeaders(name.getLocalPart(), name.getNamespaceURI());
                    while(headers.hasNext()){
                        SecurityHeaderElement she = (SecurityHeaderElement) headers.next();
                        if(she instanceof SignedMessageHeader){
                            targets.add((SignedMessageHeader)she);
                        } else{
View Full Code Here

        SecuredMessage secMessage = fpContext.getSecuredMessage();
        Object reqdHeader = secMessage.getHeader(id);
        if(reqdHeader != null){
            return reqdHeader;
        }
        SecurityHeader secHeader = fpContext.getSecurityHeader();
        SecurityHeaderElement she = secHeader.getChildElement(id);
        if(she != null)
            return she;
        Object body = secMessage.getBody();
        if(body instanceof SOAPBody){
            SOAPBody soapBody = (SOAPBody)body;
View Full Code Here

            }
        }

        // check inside the Securityheader
        if (reqdHeader == null) {
            SecurityHeader secHeader = context.getSecurityHeader();
            SecurityHeaderElement she = secHeader.getChildElement(uri);
            if (she != null && !(MessageConstants.WSSE_SECURITY_TOKEN_REFERENCE_LNAME.equals(she.getLocalPart()) &&
                    MessageConstants.WSSE_NS.equals(she.getNamespaceURI()))) {
                reqdHeader = she;
            }
        }
View Full Code Here

            Key signingKey = null;

            SignatureElementFactory signFactory = new SignatureElementFactory();
           
            KeyInfo keyInfo = null;
            SecurityHeader securityHeader = context.getSecurityHeader();
           
            //Get the Signing key and KeyInfo from TokenProcessor
            TokenProcessor tokenProcessor = new TokenProcessor(signaturePolicy, context);
            BuilderResult builderResult = tokenProcessor.process();
            signingKey = builderResult.getDataProtectionKey();
            keyInfo = builderResult.getKeyInfo();
           
            if (keyInfo != null || !keyBinding.isOptional()){
                SignedInfo signedInfo = signFactory.constructSignedInfo(context);
                JAXBSignContext signContext = new JAXBSignContext(signingKey);
                signContext.setURIDereferencer(DSigResolver.getInstance());
                XMLSignature signature = signFactory.constructSignature(signedInfo, keyInfo, signaturePolicy.getUUID());           
                signContext.put(MessageConstants.WSS_PROCESSING_CONTEXT, context);           
                NamespaceAndPrefixMapper npMapper = new NamespaceAndPrefixMapper(context.getNamespaceContext(), context.getDisableIncPrefix());
                signContext.put(NamespaceAndPrefixMapper.NS_PREFIX_MAPPER, npMapper);           
                signContext.putNamespacePrefix(MessageConstants.DSIG_NS, MessageConstants.DSIG_PREFIX);
                signature.sign(signContext);
           
                JAXBSignatureHeaderElement jaxBSign = new JAXBSignatureHeaderElement((com.sun.xml.ws.security.opt.crypto.dsig.Signature)signature,context.getSOAPVersion());
                securityHeader.add(jaxBSign);
           
                //For SignatureConfirmation
                List scList = (ArrayList)context.getExtraneousProperty("SignatureConfirmation");
                if(scList != null){
                    scList.add(Base64.encode(signature.getSignatureValue().getValue()));
View Full Code Here

            }
           
            if(!edList.isEmpty()){
                return edList;
            }
            SecurityHeader sh = context.getSecurityHeader();
           
            Iterator itr = sh.getHeaders(name.getLocalPart(),name.getNamespaceURI());
            while(itr.hasNext()){
                SecurityHeaderElement hdr = (SecurityHeaderElement)itr.next();
                if(hdr != null){
                    SecurityHeaderElement ed = toMessageHeader(policy,target,context,key,hdr,ki, false);
                    edList.add(ed);
View Full Code Here

        this.soapVersion = soapVersion;
    }
   
   
    public SecurityHeader createSecurityHeader(){
        return new SecurityHeader();
    }
View Full Code Here

    public SecurityHeader createSecurityHeader(){
        return new SecurityHeader();
    }
   
    public SecurityHeader createSecurityHeader(int headerLayout, String soapVersion, boolean mustUnderstandValue){
        return new SecurityHeader(headerLayout, soapVersion, mustUnderstandValue);
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.security.opt.impl.outgoing.SecurityHeader

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.