Class AS4Signer
java.lang.Object
com.helger.phase4.messaging.crypto.AS4Signer
Message signing helper.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull DocumentcreateSignedMessage(@NonNull IAS4CryptoFactory aCryptoFactorySign, @NonNull Document aPreSigningMessage, @NonNull ESoapVersion eSoapVersion, @NonNull @Nonempty String sMessagingID, @Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> aAttachments, @NonNull AS4ResourceHelper aResHelper, boolean bMustUnderstand, @NonNull 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
public static @NonNull Document createSignedMessage(@NonNull IAS4CryptoFactory aCryptoFactorySign, @NonNull Document aPreSigningMessage, @NonNull ESoapVersion eSoapVersion, @Nonempty @NonNull @Nonempty String sMessagingID, @Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> aAttachments, @WillNotClose @NonNull 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
-