Class AS4Signer
java.lang.Object
com.helger.phase4.messaging.crypto.AS4Signer
Message singing helper.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentcreateSignedMessage(IAS4CryptoFactory aCryptoFactorySign, Document aPreSigningMessage, ESoapVersion eSoapVersion, String sMessagingID, com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, AS4ResourceHelper aResHelper, boolean bMustUnderstand, AS4SigningParams aSigningParams) This method must be used if the message does not contain attachments, that should be in a additional mime message part.
-
Method Details
-
createSignedMessage
@Nonnull public static Document createSignedMessage(@Nonnull IAS4CryptoFactory aCryptoFactorySign, @Nonnull Document aPreSigningMessage, @Nonnull ESoapVersion eSoapVersion, @Nonnull @Nonempty String sMessagingID, @Nullable com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, @Nonnull @WillNotClose AS4ResourceHelper aResHelper, boolean bMustUnderstand, @Nonnull AS4SigningParams aSigningParams) throws org.apache.wss4j.common.ext.WSSecurityException This method must be used if the message does not contain attachments, that should be in a additional mime message part.- Parameters:
aCryptoFactorySign- CryptoFactory to use. May not benull.aPreSigningMessage- SOAP Document before signingeSoapVersion- SOAP version to usesMessagingID- The ID of the "Messaging" element to sign.aAttachments- Optional list of attachmentsaResHelper- Resource helper to be used.bMustUnderstand- Must understand?aSigningParams- Signing parameters. May not benull.- Returns:
- The created signed SOAP document
- Throws:
org.apache.wss4j.common.ext.WSSecurityException- If an error occurs during signing
-