Class AS4Signer

java.lang.Object
com.helger.phase4.messaging.crypto.AS4Signer

@Immutable public final class AS4Signer extends Object
Message signing helper.
Author:
Philip Helger
  • 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 be null.
      aPreSigningMessage - SOAP Document before signing
      eSoapVersion - SOAP version to use
      sMessagingID - The ID of the "Messaging" element to sign.
      aAttachments - Optional list of attachments
      aResHelper - Resource helper to be used.
      bMustUnderstand - Must understand?
      aSigningParams - Signing parameters. May not be null.
      Returns:
      The created signed SOAP document
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException - If an error occurs during signing