Package org.apache.ws.security

Examples of org.apache.ws.security.WSEncryptionPart


    Transforms transforms = null;

    Element envelope = document.getDocumentElement();

    for (int part = 0; part < references.size(); part++) {
      WSEncryptionPart encPart = (WSEncryptionPart) references.get(part);

      String idToSign = encPart.getId();

      String elemName = encPart.getName();
      String nmSpace = encPart.getNamespace();

      /*
       * Set up the elements to sign. There are two resevered element
       * names: "Token" and "STRTransform" "Token": Setup the Signature to
       * either sign the information that points to the security token or
View Full Code Here


    SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(doc
        .getDocumentElement());

    if (parts == null) {
      parts = new Vector();
      WSEncryptionPart encP = new WSEncryptionPart(soapConstants
          .getBodyQName().getLocalPart(), soapConstants
          .getEnvelopeURI(), "Content");
      parts.add(encP);
    }
View Full Code Here

     */
    public void setEncryptedParts(String namespace, String element) {
        if (encryptedParts == null) {
            encryptedParts = new ArrayList();
        }
        WSEncryptionPart wep = new WSEncryptionPart(element, namespace,
                "Content");
        encryptedParts.add(wep);
    }
View Full Code Here

     */
    public void setSignedParts(String namespace, String element) {
        if (signedParts == null) {
            signedParts = new ArrayList();
        }
        WSEncryptionPart wep = new WSEncryptionPart(element, namespace,
                "Content");
        signedParts.add(wep);
    }
View Full Code Here

            if (wst.sigParts == null) {
                wst.sigParts = new ArrayList();
            }
            while (it.hasNext()) {
                Header header = (Header) it.next();
                wst.sigParts.add(new WSEncryptionPart(header.getName(), header
                        .getNamespace(), "Content"));
            }
        }
        /*
         * Get and store the parts to encrypt of the supporting token
         */
        sep = suppToken.getEncryptedParts();
        if (sep != null) {
            it = sep.getHeaders().iterator();
            if (wst.encParts == null) {
                wst.encParts = new ArrayList();
            }
            while (it.hasNext()) {
                Header header = (Header) it.next();
                wst.encParts.add(new WSEncryptionPart(header.getName(), header
                        .getNamespace(), "Content"));
            }
        }

        /*
 
View Full Code Here

        prependDKElementToHeader(secHeader);
               
        SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(envelope);
        if (parts == null) {
            parts = new Vector();
            WSEncryptionPart encP = new WSEncryptionPart(soapConstants
                    .getBodyQName().getLocalPart(), soapConstants
                    .getEnvelopeURI(), "Content");
            parts.add(encP);
        }
        Element externRefList = encryptForExternalRef(null, parts);
View Full Code Here

        }

        Vector encDataRefs = new Vector();

        for (int part = 0; part < references.size(); part++) {
            WSEncryptionPart encPart = (WSEncryptionPart) references.get(part);

            String idToEnc = encPart.getId();
           
            String elemName = encPart.getName();
            String nmSpace = encPart.getNamespace();
            String modifier = encPart.getEncModifier();
            /*
             * Third step: get the data to encrypt.
             */
            Element body = null;
            if (idToEnc != null) {
View Full Code Here

            for (int i = 0; i < signatureActions.size(); i++) {
                WSSecurityEngineResult wsr = (WSSecurityEngineResult) signatureActions
                        .get(i);
                byte[] sigVal = wsr.getSignatureValue();
                wsc.build(doc, sigVal, reqData.getSecHeader());
                signatureParts.add(new WSEncryptionPart(wsc.getId()));
            }
        } else {
            wsc.build(doc, null, reqData.getSecHeader());
            signatureParts.add(new WSEncryptionPart(wsc.getId()));
        }
        handler.setProperty(reqData.getMsgContext(), WSHandlerConstants.SIG_CONF_DONE,
                WSHandler.DONE);
    }
View Full Code Here

        prepare(doc, crypto);

        SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(envelope);
        if (parts == null) {
            parts = new Vector();
            WSEncryptionPart encP = new WSEncryptionPart(soapConstants
                    .getBodyQName().getLocalPart(), soapConstants
                    .getEnvelopeURI(), "Content");
            parts.add(encP);
        }
View Full Code Here

        }

        Vector encDataRef = new Vector();

        for (int part = 0; part < references.size(); part++) {
            WSEncryptionPart encPart = (WSEncryptionPart) references.get(part);

            String idToEnc = encPart.getId();

            String elemName = encPart.getName();
            String nmSpace = encPart.getNamespace();
            String modifier = encPart.getEncModifier();
            /*
             * Third step: get the data to encrypt.
             *
             */
            Element body = null;
View Full Code Here

TOP

Related Classes of org.apache.ws.security.WSEncryptionPart

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.