Search in sources :

Example 1 with IAS4CryptoFactory

use of com.helger.phase4.crypto.IAS4CryptoFactory in project phase4 by phax.

the class DropFolderUserMessage method init.

public static void init(@Nonnull final IAS4CryptoFactory aCryptoFactory) {
    if (s_aWatch != null)
        throw new IllegalStateException("Already inited!");
    final IConfig aConfig = AS4Configuration.getConfig();
    final Path aOutgoingDir = Paths.get(aConfig.getAsString("server.directory.outgoing", "out"));
    final Path aIncomingDir = Paths.get(aConfig.getAsString("server.directory.incoming", "in"));
    try {
        // Ensure directories are present
        Files.createDirectories(aOutgoingDir.resolve(PATH_DONE));
        Files.createDirectories(aOutgoingDir.resolve(PATH_ERROR));
        Files.createDirectories(aIncomingDir);
        // Start watching directory for changes
        final IWatchDirCallback aCB = (eAction, aCurFile) -> {
            if (LOGGER.isDebugEnabled())
                LOGGER.debug("WatchEvent " + eAction + " - " + aCurFile);
            if (!eAction.equals(EWatchDirAction.DELETE) && aCurFile.toFile().isFile() && aCurFile.getFileName() != null && aCurFile.getFileName().toString().endsWith(".xml")) {
                _send(aCryptoFactory, aCurFile, aIncomingDir);
            }
        };
        s_aWatch = WatchDir.createAsyncRunningWatchDir(aOutgoingDir, false, aCB);
        // Send initially for all existing files
        try (final DirectoryStream<Path> aStream = Files.newDirectoryStream(aOutgoingDir, x -> x.toFile().isFile() && x.getFileName() != null && x.getFileName().toString().endsWith(".xml"))) {
            for (final Path aCur : aStream) _send(aCryptoFactory, aCur, aIncomingDir);
        }
    } catch (final IOException ex) {
        // Checked to unchecked conversion
        throw new UncheckedIOException(ex);
    }
}
Also used : IConfig(com.helger.config.IConfig) Path(java.nio.file.Path) X509Certificate(java.security.cert.X509Certificate) PeppolCertificateHelper(com.helger.peppol.utils.PeppolCertificateHelper) StreamHelper(com.helger.commons.io.stream.StreamHelper) EWatchDirAction(com.helger.commons.io.watchdir.EWatchDirAction) ESoapVersion(com.helger.phase4.soap.ESoapVersion) LoggerFactory(org.slf4j.LoggerFactory) WatchDir(com.helger.commons.io.watchdir.WatchDir) ECryptoAlgorithmSign(com.helger.phase4.crypto.ECryptoAlgorithmSign) DirectoryStream(java.nio.file.DirectoryStream) PeppolSBDHDocument(com.helger.peppol.sbdh.PeppolSBDHDocument) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) ResponseHandlerByteArray(com.helger.httpclient.response.ResponseHandlerByteArray) FilenameHelper(com.helger.commons.io.file.FilenameHelper) IWatchDirCallback(com.helger.commons.io.watchdir.IWatchDirCallback) IAS4RetryCallback(com.helger.phase4.client.IAS4RetryCallback) ISMPServiceMetadataProvider(com.helger.smpclient.peppol.ISMPServiceMetadataProvider) Path(java.nio.file.Path) ESML(com.helger.peppol.sml.ESML) IAS4OutgoingDumper(com.helger.phase4.dump.IAS4OutgoingDumper) ECryptoAlgorithmSignDigest(com.helger.phase4.crypto.ECryptoAlgorithmSignDigest) KeyStore(java.security.KeyStore) SMPClient(com.helger.smpclient.peppol.SMPClient) UncheckedIOException(java.io.UncheckedIOException) CertificateHelper(com.helger.security.certificate.CertificateHelper) EndpointType(com.helger.xsds.peppol.smp1.EndpointType) ESMPTransportProfile(com.helger.peppol.smp.ESMPTransportProfile) MessageHelperMethods(com.helger.phase4.messaging.domain.MessageHelperMethods) PeppolSBDHDocumentReader(com.helger.peppol.sbdh.read.PeppolSBDHDocumentReader) PeppolURLProvider(com.helger.smpclient.url.PeppolURLProvider) IAS4CryptoFactory(com.helger.phase4.crypto.IAS4CryptoFactory) AS4Configuration(com.helger.phase4.config.AS4Configuration) IConfig(com.helger.config.IConfig) IPeppolURLProvider(com.helger.smpclient.url.IPeppolURLProvider) AS4ResourceHelper(com.helger.phase4.util.AS4ResourceHelper) Nonnull(javax.annotation.Nonnull) Logger(org.slf4j.Logger) PeppolIdentifierFactory(com.helger.peppolid.factory.PeppolIdentifierFactory) Files(java.nio.file.Files) AS4ClientSentMessage(com.helger.phase4.client.AS4ClientSentMessage) W3CEndpointReferenceHelper(com.helger.smpclient.peppol.utils.W3CEndpointReferenceHelper) IOException(java.io.IOException) File(java.io.File) SimpleFileIO(com.helger.commons.io.file.SimpleFileIO) IAS4ClientBuildMessageCallback(com.helger.phase4.client.IAS4ClientBuildMessageCallback) Paths(java.nio.file.Paths) StopWatch(com.helger.commons.timing.StopWatch) SBDHReader(com.helger.sbdh.builder.SBDHReader) AS4ClientUserMessage(com.helger.phase4.client.AS4ClientUserMessage) CAS4(com.helger.phase4.CAS4) StandardBusinessDocument(org.unece.cefact.namespaces.sbdh.StandardBusinessDocument) SBDHWriter(com.helger.sbdh.builder.SBDHWriter) IWatchDirCallback(com.helger.commons.io.watchdir.IWatchDirCallback) UncheckedIOException(java.io.UncheckedIOException) UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException)

Example 2 with IAS4CryptoFactory

use of com.helger.phase4.crypto.IAS4CryptoFactory in project phase4 by phax.

the class MainPhase4PeppolSenderQvaliaLargeFile method main.

public static void main(final String[] args) {
    WebScopeManager.onGlobalBegin(MockServletContext.create());
    // Dump (for debugging purpose only)
    AS4DumpManager.setIncomingDumper(new AS4IncomingDumperFileBased());
    AS4DumpManager.setOutgoingDumper(new AS4OutgoingDumperFileBased());
    try {
        final Element aPayloadElement = DOMReader.readXMLDOM(new File("src/test/resources/examples/large-files/base-example-large-16m.xml")).getDocumentElement();
        if (aPayloadElement == null)
            throw new IllegalStateException("Failed to read XML file to be send");
        // Start configuring here
        final IParticipantIdentifier aReceiverID = Phase4PeppolSender.IF.createParticipantIdentifierWithDefaultScheme("0007:5567321707");
        final IAS4ClientBuildMessageCallback aBuildMessageCallback = new IAS4ClientBuildMessageCallback() {

            public void onAS4Message(final AbstractAS4Message<?> aMsg) {
                final AS4UserMessage aUserMsg = (AS4UserMessage) aMsg;
                LOGGER.info("Sending out AS4 message with message ID '" + aUserMsg.getEbms3UserMessage().getMessageInfo().getMessageId() + "'");
            }
        };
        // Invalid certificate is valid until 2029
        final IAS4CryptoFactory cf = AS4CryptoFactoryProperties.getDefaultInstance();
        final ESimpleUserMessageSendResult eResult;
        eResult = Phase4PeppolSender.builder().httpRetrySettings(new HttpRetrySettings().setMaxRetries(0)).cryptoFactory(cf).documentTypeID(Phase4PeppolSender.IF.createDocumentTypeIdentifierWithDefaultScheme("urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1")).processID(Phase4PeppolSender.IF.createProcessIdentifierWithDefaultScheme("urn:fdc:peppol.eu:2017:poacc:billing:01:1.0")).senderParticipantID(Phase4PeppolSender.IF.createParticipantIdentifierWithDefaultScheme("9915:phase4-test-sender")).receiverParticipantID(aReceiverID).senderPartyID("POP000306").payload(aPayloadElement).smpClient(new SMPClientReadOnly(Phase4PeppolSender.URL_PROVIDER, aReceiverID, ESML.DIGIT_TEST)).validationConfiguration(PeppolValidation3_13_0.VID_OPENPEPPOL_INVOICE_V3, new Phase4PeppolValidatonResultHandler()).compressPayload(false).buildMessageCallback(aBuildMessageCallback).sendMessageAndCheckForReceipt();
        LOGGER.info("Peppol send result: " + eResult);
    } catch (final Exception ex) {
        LOGGER.error("Error sending Peppol message via AS4", ex);
    } finally {
        WebScopeManager.onGlobalEnd();
    }
}
Also used : IAS4ClientBuildMessageCallback(com.helger.phase4.client.IAS4ClientBuildMessageCallback) IAS4CryptoFactory(com.helger.phase4.crypto.IAS4CryptoFactory) SMPClientReadOnly(com.helger.smpclient.peppol.SMPClientReadOnly) Element(org.w3c.dom.Element) AS4UserMessage(com.helger.phase4.messaging.domain.AS4UserMessage) HttpRetrySettings(com.helger.phase4.http.HttpRetrySettings) AbstractAS4Message(com.helger.phase4.messaging.domain.AbstractAS4Message) ESimpleUserMessageSendResult(com.helger.phase4.sender.AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult) AS4IncomingDumperFileBased(com.helger.phase4.dump.AS4IncomingDumperFileBased) File(java.io.File) AS4OutgoingDumperFileBased(com.helger.phase4.dump.AS4OutgoingDumperFileBased) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 3 with IAS4CryptoFactory

use of com.helger.phase4.crypto.IAS4CryptoFactory in project phase4 by phax.

the class MainPhase4PeppolSenderQvaliaUBL method main.

public static void main(final String[] args) {
    WebScopeManager.onGlobalBegin(MockServletContext.create());
    // Dump (for debugging purpose only)
    AS4DumpManager.setIncomingDumper(new AS4IncomingDumperFileBased());
    AS4DumpManager.setOutgoingDumper(new AS4OutgoingDumperFileBased());
    try {
        final Element aPayloadElement = DOMReader.readXMLDOM(new File("src/test/resources/examples/example-ubl-en-qvalia.xml")).getDocumentElement();
        if (aPayloadElement == null)
            throw new IllegalStateException("Failed to read XML file to be send");
        // Start configuring here
        final IParticipantIdentifier aReceiverID = Phase4PeppolSender.IF.createParticipantIdentifierWithDefaultScheme("0007:5567321707");
        final IAS4ClientBuildMessageCallback aBuildMessageCallback = new IAS4ClientBuildMessageCallback() {

            public void onAS4Message(final AbstractAS4Message<?> aMsg) {
                final AS4UserMessage aUserMsg = (AS4UserMessage) aMsg;
                LOGGER.info("Sending out AS4 message with message ID '" + aUserMsg.getEbms3UserMessage().getMessageInfo().getMessageId() + "'");
                LOGGER.info("Sending out AS4 message with conversation ID '" + aUserMsg.getEbms3UserMessage().getCollaborationInfo().getConversationId() + "'");
            }
        };
        // Add EN16931 rulesets
        final IValidationExecutorSetRegistry<IValidationSourceXML> aVESRegistry = Phase4PeppolValidation.createDefaultRegistry();
        EN16931Validation.initEN16931(aVESRegistry);
        // Invalid certificate is valid until 2029
        final IAS4CryptoFactory cf = AS4CryptoFactoryProperties.getDefaultInstance();
        final ESimpleUserMessageSendResult eResult;
        eResult = Phase4PeppolSender.builder().httpRetrySettings(new HttpRetrySettings().setMaxRetries(0)).cryptoFactory(cf).documentTypeID(Phase4PeppolSender.IF.createDocumentTypeIdentifierWithDefaultScheme("urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1")).processID(Phase4PeppolSender.IF.createProcessIdentifierWithDefaultScheme("urn:fdc:peppol.eu:2017:poacc:billing:01:1.0")).senderParticipantID(Phase4PeppolSender.IF.createParticipantIdentifierWithDefaultScheme("9915:phase4-test-sender")).receiverParticipantID(aReceiverID).senderPartyID("POP000306").payload(aPayloadElement).smpClient(new SMPClientReadOnly(Phase4PeppolSender.URL_PROVIDER, aReceiverID, ESML.DIGIT_TEST)).rawResponseConsumer(new AS4RawResponseConsumerWriteToFile()).validationRegistry(aVESRegistry).validationConfiguration(EN16931Validation.VID_UBL_INVOICE_137, new Phase4PeppolValidatonResultHandler()).buildMessageCallback(aBuildMessageCallback).sendMessageAndCheckForReceipt();
        LOGGER.info("Peppol send result: " + eResult);
    } catch (final Exception ex) {
        LOGGER.error("Error sending Peppol message via AS4", ex);
    } finally {
        WebScopeManager.onGlobalEnd();
    }
}
Also used : IAS4ClientBuildMessageCallback(com.helger.phase4.client.IAS4ClientBuildMessageCallback) IAS4CryptoFactory(com.helger.phase4.crypto.IAS4CryptoFactory) SMPClientReadOnly(com.helger.smpclient.peppol.SMPClientReadOnly) Element(org.w3c.dom.Element) IValidationSourceXML(com.helger.phive.engine.source.IValidationSourceXML) AS4UserMessage(com.helger.phase4.messaging.domain.AS4UserMessage) HttpRetrySettings(com.helger.phase4.http.HttpRetrySettings) AbstractAS4Message(com.helger.phase4.messaging.domain.AbstractAS4Message) ESimpleUserMessageSendResult(com.helger.phase4.sender.AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult) AS4IncomingDumperFileBased(com.helger.phase4.dump.AS4IncomingDumperFileBased) AS4RawResponseConsumerWriteToFile(com.helger.phase4.dump.AS4RawResponseConsumerWriteToFile) AS4RawResponseConsumerWriteToFile(com.helger.phase4.dump.AS4RawResponseConsumerWriteToFile) File(java.io.File) AS4OutgoingDumperFileBased(com.helger.phase4.dump.AS4OutgoingDumperFileBased) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 4 with IAS4CryptoFactory

use of com.helger.phase4.crypto.IAS4CryptoFactory in project phase4 by phax.

the class MainOldAS4Client method main.

/**
 * Starting point for the SAAJ - SOAP Client Testing
 *
 * @param args
 *        ignored
 */
public static void main(final String[] args) {
    try (final AS4ResourceHelper aResHelper = new AS4ResourceHelper()) {
        String sURL = "http://127.0.0.1:8080/as4";
        if (false)
            sURL = "http://msh.holodeck-b2b.org:8080/msh";
        // Deactivate if not sending to local holodeck
        if (false)
            sURL = "http://localhost:8080/msh/";
        final HttpClientSettings aHCS = new HttpClientSettings();
        if (sURL.startsWith("https"))
            aHCS.setSSLContextTrustAll();
        if (false) {
            aHCS.setProxyHost(new HttpHost("172.30.9.6", 8080));
            aHCS.addNonProxyHostsFromPipeString("localhost|127.0.0.1");
        }
        final CloseableHttpClient aClient = new HttpClientFactory(aHCS).createHttpClient();
        LOGGER.info("Sending to " + sURL);
        final HttpPost aPost = new HttpPost(sURL);
        final ICommonsList<WSS4JAttachment> aAttachments = new CommonsArrayList<>();
        final Node aPayload = DOMReader.readXMLDOM(new ClassPathResource("SOAPBodyPayload.xml"));
        final ESoapVersion eSoapVersion = ESoapVersion.SOAP_12;
        final IAS4CryptoFactory aCryptoFactory = AS4CryptoFactoryProperties.getDefaultInstance();
        if (true) {
            // No Mime Message Not signed or encrypted, just SOAP + Payload in SOAP
            // -
            // Body
            // final Document aDoc = TestMessages.testSignedUserMessage
            // (ESOAPVersion.SOAP_11, aPayload, aAttachments);
            final AS4UserMessage aMsg = MockClientMessages.createUserMessageNotSigned(eSoapVersion, aPayload, aAttachments);
            final Document aDoc = aMsg.getAsSoapDocument(aPayload);
            aPost.setEntity(new HttpXMLEntity(aDoc, eSoapVersion.getMimeType()));
        } else if (false) {
            // BodyPayload SIGNED
            final Document aDoc = MockClientMessages.createUserMessageSigned(eSoapVersion, aPayload, aAttachments, aResHelper);
            aPost.setEntity(new HttpXMLEntity(aDoc, eSoapVersion.getMimeType()));
        } else if (false) {
            // BodyPayload ENCRYPTED
            final AS4UserMessage aMsg = MockClientMessages.createUserMessageNotSigned(eSoapVersion, aPayload, aAttachments);
            Document aDoc = aMsg.getAsSoapDocument(aPayload);
            aDoc = AS4Encryptor.encryptSoapBodyPayload(aCryptoFactory, eSoapVersion, aDoc, false, AS4CryptParams.createDefault().setAlias("dummy"));
            aPost.setEntity(new HttpXMLEntity(aDoc, eSoapVersion.getMimeType()));
        } else if (true) {
            aAttachments.add(WSS4JAttachment.createOutgoingFileAttachment(Phase4OutgoingAttachment.builder().data(ClassPathResource.getAsFile("attachment/test.xml.gz")).mimeType(CMimeType.APPLICATION_GZIP).build(), aResHelper));
            final AS4UserMessage aMsg = MockClientMessages.createUserMessageNotSigned(eSoapVersion, null, aAttachments);
            final AS4MimeMessage aMimeMsg = MimeMessageCreator.generateMimeMessage(eSoapVersion, AS4Signer.createSignedMessage(aCryptoFactory, aMsg.getAsSoapDocument(null), eSoapVersion, aMsg.getMessagingID(), aAttachments, aResHelper, false, AS4SigningParams.createDefault()), aAttachments);
            // Move all global mime headers to the POST request
            MessageHelperMethods.forEachHeaderAndRemoveAfterwards(aMimeMsg, aPost::addHeader, true);
            aPost.setEntity(new HttpMimeMessageEntity(aMimeMsg));
        } else if (false) {
            Document aDoc = MockClientMessages.createUserMessageSigned(eSoapVersion, aPayload, aAttachments, aResHelper);
            aDoc = AS4Encryptor.encryptSoapBodyPayload(aCryptoFactory, eSoapVersion, aDoc, false, AS4CryptParams.createDefault().setAlias("dummy"));
            aPost.setEntity(new HttpXMLEntity(aDoc, eSoapVersion.getMimeType()));
        } else
            throw new IllegalStateException("Some test message should be selected :)");
        // re-instantiate if you want to see the request that is getting sent
        LOGGER.info(EntityUtils.toString(aPost.getEntity()));
        final CloseableHttpResponse aHttpResponse = aClient.execute(aPost);
        LOGGER.info("GET Response Status:: " + aHttpResponse.getStatusLine().getStatusCode());
        // print result
        LOGGER.info(EntityUtils.toString(aHttpResponse.getEntity()));
    } catch (final Exception e) {
        LOGGER.error("Error occurred while sending SOAP Request to Server", e);
    }
}
Also used : CloseableHttpClient(org.apache.http.impl.client.CloseableHttpClient) HttpPost(org.apache.http.client.methods.HttpPost) IAS4CryptoFactory(com.helger.phase4.crypto.IAS4CryptoFactory) Node(org.w3c.dom.Node) HttpXMLEntity(com.helger.phase4.http.HttpXMLEntity) Document(org.w3c.dom.Document) AS4UserMessage(com.helger.phase4.messaging.domain.AS4UserMessage) ClassPathResource(com.helger.commons.io.resource.ClassPathResource) IOException(java.io.IOException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) SAXException(org.xml.sax.SAXException) HttpHost(org.apache.http.HttpHost) ESoapVersion(com.helger.phase4.soap.ESoapVersion) AS4MimeMessage(com.helger.phase4.messaging.mime.AS4MimeMessage) CloseableHttpResponse(org.apache.http.client.methods.CloseableHttpResponse) HttpClientSettings(com.helger.httpclient.HttpClientSettings) HttpMimeMessageEntity(com.helger.phase4.http.HttpMimeMessageEntity) AS4ResourceHelper(com.helger.phase4.util.AS4ResourceHelper) HttpClientFactory(com.helger.httpclient.HttpClientFactory) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) WSS4JAttachment(com.helger.phase4.attachment.WSS4JAttachment)

Example 5 with IAS4CryptoFactory

use of com.helger.phase4.crypto.IAS4CryptoFactory in project phase4 by phax.

the class AS4Encryptor method _encryptMimeMessage.

@Nonnull
private static AS4MimeMessage _encryptMimeMessage(@Nonnull final ESoapVersion eSoapVersion, @Nonnull final Document aDoc, @Nullable final ICommonsList<WSS4JAttachment> aAttachments, @Nonnull final IAS4CryptoFactory aCryptoFactory, final boolean bMustUnderstand, @Nonnull @WillNotClose final AS4ResourceHelper aResHelper, @Nonnull final AS4CryptParams aCryptParams) throws WSSecurityException {
    if (LOGGER.isInfoEnabled())
        LOGGER.info("Now encrypting AS4 MIME message");
    final WSSecHeader aSecHeader = new WSSecHeader(aDoc);
    aSecHeader.insertSecurityHeader();
    final WSSecEncrypt aBuilder = _createEncrypt(aSecHeader, aCryptParams);
    // "cid:Attachments" is a predefined ID
    aBuilder.getParts().add(new WSEncryptionPart(MessageHelperMethods.PREFIX_CID + "Attachments", "Content"));
    WSS4JAttachmentCallbackHandler aAttachmentCallbackHandler = null;
    if (CollectionHelper.isNotEmpty(aAttachments)) {
        aAttachmentCallbackHandler = new WSS4JAttachmentCallbackHandler(aAttachments, aResHelper);
        aBuilder.setAttachmentCallbackHandler(aAttachmentCallbackHandler);
    }
    // Ensure mustUnderstand value
    final Attr aMustUnderstand = aSecHeader.getSecurityHeaderElement().getAttributeNodeNS(eSoapVersion.getNamespaceURI(), "mustUnderstand");
    if (aMustUnderstand != null)
        aMustUnderstand.setValue(eSoapVersion.getMustUnderstandValue(bMustUnderstand));
    // Generate a session key
    final KeyGenerator aKeyGen = KeyUtils.getKeyGenerator(WSS4JConstants.AES_128);
    final SecretKey aSymmetricKey = aKeyGen.generateKey();
    // Main sign and/or encrypt
    final Document aEncryptedDoc = aBuilder.build(aCryptoFactory.getCrypto(), aSymmetricKey);
    // The attachment callback handler contains the encrypted attachments
    // Important: read the attachment stream only once!
    ICommonsList<WSS4JAttachment> aEncryptedAttachments = null;
    if (aAttachmentCallbackHandler != null) {
        aEncryptedAttachments = aAttachmentCallbackHandler.getAllResponseAttachments();
        // MIME Type and CTE must be set for encrypted attachments!
        for (final WSS4JAttachment aAttachment : aEncryptedAttachments) {
            aAttachment.overwriteMimeType(CMimeType.APPLICATION_OCTET_STREAM.getAsString());
            aAttachment.setContentTransferEncoding(EContentTransferEncoding.BINARY);
        }
    }
    // Use the encrypted attachments!
    try {
        return MimeMessageCreator.generateMimeMessage(eSoapVersion, aEncryptedDoc, aEncryptedAttachments);
    } catch (final MessagingException ex) {
        throw new WSSecurityException(ErrorCode.FAILURE, ex, "Failed to generate MIME message");
    }
}
Also used : WSEncryptionPart(org.apache.wss4j.common.WSEncryptionPart) SecretKey(javax.crypto.SecretKey) WSSecHeader(org.apache.wss4j.dom.message.WSSecHeader) WSSecEncrypt(org.apache.wss4j.dom.message.WSSecEncrypt) MessagingException(javax.mail.MessagingException) WSS4JAttachmentCallbackHandler(com.helger.phase4.attachment.WSS4JAttachmentCallbackHandler) WSSecurityException(org.apache.wss4j.common.ext.WSSecurityException) Document(org.w3c.dom.Document) KeyGenerator(javax.crypto.KeyGenerator) Attr(org.w3c.dom.Attr) WSS4JAttachment(com.helger.phase4.attachment.WSS4JAttachment) Nonnull(javax.annotation.Nonnull)

Aggregations

IAS4CryptoFactory (com.helger.phase4.crypto.IAS4CryptoFactory)17 IAS4ClientBuildMessageCallback (com.helger.phase4.client.IAS4ClientBuildMessageCallback)8 File (java.io.File)8 IOException (java.io.IOException)8 Nonnull (javax.annotation.Nonnull)8 Document (org.w3c.dom.Document)7 WSS4JAttachment (com.helger.phase4.attachment.WSS4JAttachment)6 Element (org.w3c.dom.Element)6 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)5 Ebms3SignalMessage (com.helger.phase4.ebms3header.Ebms3SignalMessage)5 Ebms3UserMessage (com.helger.phase4.ebms3header.Ebms3UserMessage)5 ESimpleUserMessageSendResult (com.helger.phase4.sender.AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult)5 Nullable (javax.annotation.Nullable)5 WSSecurityException (org.apache.wss4j.common.ext.WSSecurityException)5 HttpXMLEntity (com.helger.phase4.http.HttpXMLEntity)4 IAS4IncomingMessageMetadata (com.helger.phase4.messaging.IAS4IncomingMessageMetadata)4 AS4UserMessage (com.helger.phase4.messaging.domain.AS4UserMessage)4 Phase4Exception (com.helger.phase4.util.Phase4Exception)4 MessagingException (javax.mail.MessagingException)4 Wrapper (com.helger.commons.wrapper.Wrapper)3