Examples of prepare()


Examples of org.apache.wss4j.dom.message.WSSecEncrypt.prepare()

                    } else if (!isRequestor() && encrTok.getSHA1() != null) {
                        encr.setCustomReferenceValue(encrTok.getSHA1());
                        encr.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);
                    }

                    encr.prepare(saaj.getSOAPPart(), crypto);
                  
                    if (encr.getBSTTokenId() != null) {
                        encr.prependBSTElementToHeader(secHeader);
                    }
                  
View Full Code Here

Examples of org.apache.wss4j.dom.message.WSSecEncryptedKey.prepare()

        encrKey.setKeyIdentifierType(encryptionProperties.getKeyIdentifierType());
        encrKey.setEphemeralKey(secret);
        encrKey.setSymmetricEncAlgorithm(encryptionProperties.getEncryptionAlgorithm());
        encrKey.setUseThisCert(certificate);
        encrKey.setKeyEncAlgo(encryptionProperties.getKeyWrapAlgorithm());
        encrKey.prepare(doc, encryptionCrypto);
        Element encryptedKeyElement = encrKey.getEncryptedKeyElement();

        // Append the EncryptedKey to a KeyInfo element
        Element keyInfoElement =
            doc.createElementNS(
View Full Code Here

Examples of org.apache.wss4j.dom.message.WSSecSAMLToken.prepare()

            Document doc = SOAPUtil.toSOAPPart(sourceDocument);
            WSSecHeader secHeader = new WSSecHeader();
            secHeader.insertSecurityHeader(doc);
           
            wsSign.prepare(doc, samlAssertion);
           
            // Get the Element + add it to the security header as an EncryptedAssertion
            Element assertionElement = wsSign.getElement();
            Element encryptedAssertionElement =
                doc.createElementNS(WSConstants.SAML2_NS, WSConstants.ENCRYPED_ASSERTION_LN);
View Full Code Here

Examples of org.apache.wss4j.dom.message.WSSecSignature.prepare()

        AlgorithmSuiteType algType = binding.getAlgorithmSuite().getAlgorithmSuiteType();
        sig.setDigestAlgo(algType.getDigest());
        sig.setSigCanonicalization(binding.getAlgorithmSuite().getC14n().getValue());
        sig.setWsConfig(wssConfig);
        try {
            sig.prepare(saaj.getSOAPPart(), crypto, secHeader);
        } catch (WSSecurityException e) {
            LOG.log(Level.FINE, e.getMessage(), e);
            policyNotAsserted(token, e);
        }
       
View Full Code Here

Examples of org.apache.wss4j.dom.message.WSSecSignatureConfirmation.prepare()

        WSSecSignatureConfirmation wsc = new WSSecSignatureConfirmation(wssConfig);
        if (signatureActions.size() > 0) {
            for (WSSecurityEngineResult wsr : signatureActions) {
                byte[] sigVal = (byte[]) wsr.get(WSSecurityEngineResult.TAG_SIGNATURE_VALUE);
                wsc.setSignatureValue(sigVal);
                wsc.prepare(saaj.getSOAPPart());
                addSupportingElement(wsc.getSignatureConfirmationElement());
                if (sigParts != null) {
                    WSEncryptionPart part = new WSEncryptionPart(wsc.getId(), "Element");
                    part.setElement(wsc.getSignatureConfirmationElement());
                    sigParts.add(part);
View Full Code Here

Examples of org.apache.wss4j.dom.message.WSSecTimestamp.prepare()

        dbf.setNamespaceAware(true);
        Document timestampDoc = dbf.newDocumentBuilder().newDocument();
       
        WSSecTimestamp timestamp = new WSSecTimestamp();
        timestamp.setTimeToLive(300);
        timestamp.prepare(timestampDoc);
        Element timestampElement = timestamp.getElement();
       
        final WSSConfig cfg = WSSConfig.getNewInstance();
        final RequestData reqData = new RequestData();
        reqData.setWssConfig(cfg);
View Full Code Here

Examples of org.apache.wss4j.dom.message.WSSecUsernameToken.prepare()

        UsernameToken token, boolean endorse, boolean encryptedToken, List<SupportingToken> ret
    ) throws WSSecurityException {
        if (endorse) {
            WSSecUsernameToken utBuilder = addDKUsernameToken(token, true);
            if (utBuilder != null) {
                utBuilder.prepare(saaj.getSOAPPart());
                addSupportingElement(utBuilder.getUsernameTokenElement());
                ret.add(new SupportingToken(token, utBuilder));
                if (encryptedToken) {
                    WSEncryptionPart part = new WSEncryptionPart(utBuilder.getId(), "Element");
                    part.setElement(utBuilder.getUsernameTokenElement());
View Full Code Here

Examples of org.arabidopsis.ahocorasick.AhoCorasick.prepare()

                addDictionaryEntriesToTree(tree, conceptName, dictionaryInputStream);
            } finally {
                dictionaryInputStream.close();
            }
        }
        tree.prepare();
        return tree;
    }

    private static void addDictionaryEntriesToTree(AhoCorasick tree, String type, InputStream dictionaryInputStream) throws IOException {
        CsvPreference csvPrefs = CsvPreference.EXCEL_PREFERENCE;
View Full Code Here

Examples of org.castor.persist.TransactionContext.prepare()

        case Status.STATUS_PREPARED:
        case Status.STATUS_ACTIVE:
            // Can only prepare an active transaction. And error
            // is reported as vote to rollback the transaction.
            try {
              return tx.prepare() ? XA_OK : XA_RDONLY;
               
            } catch (TransactionAbortedException except) {
                throw new XAException(XAException.XA_RBROLLBACK);
            } catch (IllegalStateException except) {
                throw new XAException(XAException.XAER_PROTO);
View Full Code Here

Examples of org.codehaus.activemq.service.Transaction.prepare()

     *
     * @see org.codehaus.activemq.broker.Broker#prepareTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid)
     */
    public int prepareTransaction(BrokerClient client, ActiveMQXid xid) throws XAException {
        Transaction transaction = transactionManager.getXATransaction(xid);
        return transaction.prepare();
    }

    /**
     * Rollback an XA Transaction.
     *
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.