/** * Adds a new <code>SignatureConfirmation</code> to a soap envelope. * * A complete <code>SignatureConfirmation</code> is constructed and added * to the <code>wsse:Security</code> header. * * @param doc The SOAP envelope as W3C document * @param sigVal the Signature value. This will be the content of the "Value" attribute. * @param secHeader The security header that holds the Signature element. * @return Document with SignatureConfirmation added */ public Document build(Document doc, byte[] sigVal, WSSecHeader secHeader) { log.debug("Begin add signature confirmation..."); signatureValue = sigVal; prepare(doc); prependToHeader(secHeader); return doc; }
WSSecSignatureConfirmation wsc = new WSSecSignatureConfirmation(); if (signatureActions.size() > 0) { if (log.isDebugEnabled()) { wsc.setSignatureValue(sigVal); wsc.prepare(doc); RampartUtil.appendChildToSecHeader(rmd, wsc.getSignatureConfirmationElement()); if (sigParts != null) { sigParts.add(new WSEncryptionPart(wsc.getId())); wsc.prepare(doc); RampartUtil.appendChildToSecHeader(rmd, wsc.getSignatureConfirmationElement()); if(sigParts != null) { sigParts.add(new WSEncryptionPart(wsc.getId()));
WSSecSignatureConfirmation wsc = new WSSecSignatureConfirmation(reqData.getWssConfig()); List<WSEncryptionPart> signatureParts = reqData.getSignatureParts(); if (signatureActions.size() > 0) { WSSecurityEngineResult wsr = (WSSecurityEngineResult) signatureActions.get(i); byte[] sigVal = (byte[]) wsr.get(WSSecurityEngineResult.TAG_SIGNATURE_VALUE); wsc.build(doc, sigVal, reqData.getSecHeader()); signatureParts.add(new WSEncryptionPart(wsc.getId())); wsc.build(doc, null, reqData.getSecHeader()); signatureParts.add(new WSEncryptionPart(wsc.getId()));
/** * Creates a SignatureConfimation element. * * The method prepares and initializes a WSSec SignatureConfirmation structure after * the relevant information was set. Before calling <code>prepare()</code> the * filed <code>signatureValue</code> must be set * * @param doc The SOAP envelope as W3C document */ public void prepare(Document doc) { sc = new SignatureConfirmation(doc, signatureValue); sc.setID(getWsConfig().getIdAllocator().createId("SC-", sc)); }
WSSecSignatureConfirmation wsc = new WSSecSignatureConfirmation(reqData.getWssConfig()); List<WSEncryptionPart> signatureParts = reqData.getSignatureParts(); if (signatureActions.size() > 0) { WSSecurityEngineResult wsr = (WSSecurityEngineResult) signatureActions.get(i); byte[] sigVal = (byte[]) wsr.get(WSSecurityEngineResult.TAG_SIGNATURE_VALUE); wsc.build(doc, sigVal, reqData.getSecHeader()); signatureParts.add(new WSEncryptionPart(wsc.getId())); wsc.build(doc, null, reqData.getSecHeader()); signatureParts.add(new WSEncryptionPart(wsc.getId()));
/** * Creates a SignatureConfimation element. * * The method prepares and initializes a WSSec SignatureConfirmation structure after * the relevant information was set. Before calling <code>prepare()</code> the * filed <code>signatureValue</code> must be set * * @param doc The SOAP envelope as W3C document */ public void prepare(Document doc) { sc = new SignatureConfirmation(doc, signatureValue); sc.setID(getWsConfig().getIdAllocator().createId("SC-", sc)); }
/** * Adds a new <code>SignatureConfirmation</code> to a soap envelope. * * A complete <code>SignatureConfirmation</code> is constructed and added * to the <code>wsse:Security</code> header. * * @param doc The SOAP envelope as W3C document * @param sigVal the Signature value. This will be the content of the "Value" attribute. * @param secHeader The security header that holds the Signature element. * @return Document with SignatureConfirmation added */ public Document build(Document doc, byte[] sigVal, WSSecHeader secHeader) { log.debug("Begin add signature confirmation..."); signatureValue = sigVal; prepare(doc); prependToHeader(secHeader); return doc; }