diff --git a/phase4-server-webapp/src/main/java/com/helger/phase4/server/servlet/DropFolderUserMessage.java b/phase4-server-webapp/src/main/java/com/helger/phase4/server/servlet/DropFolderUserMessage.java index 61f2ea55e..b06555836 100644 --- a/phase4-server-webapp/src/main/java/com/helger/phase4/server/servlet/DropFolderUserMessage.java +++ b/phase4-server-webapp/src/main/java/com/helger/phase4/server/servlet/DropFolderUserMessage.java @@ -126,7 +126,7 @@ private static void _send (@Nonnull final IAS4CryptoFactory aCF, final Path aSen aClient.signingParams ().setAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_512); aClient.signingParams ().setAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_512); - // FIXME Action, Service etc. are missing + // TODO Action, Service etc. need to be provided by you aClient.setAction ("xxx"); aClient.setServiceType ("xxx"); aClient.setServiceValue ("xxx"); diff --git a/phase4-test/src/test/java/com/helger/phase4/CEF/AS4CEFOneWayFuncTest.java b/phase4-test/src/test/java/com/helger/phase4/CEF/AS4CEFOneWayFuncTest.java index 11b45de80..f982e9607 100644 --- a/phase4-test/src/test/java/com/helger/phase4/CEF/AS4CEFOneWayFuncTest.java +++ b/phase4-test/src/test/java/com/helger/phase4/CEF/AS4CEFOneWayFuncTest.java @@ -122,8 +122,7 @@ public void testAS4_TA03 () throws Exception aEbms3PartyInfo, aEbms3MessageProperties, null, - m_eSoapVersion) - .setMustUnderstand (true); + m_eSoapVersion).setMustUnderstand (true); final Document aSignedDoc = AS4Signer.createSignedMessage (m_aCryptoFactory, aMsg.getAsSoapDocument (m_aPayload), @@ -202,14 +201,13 @@ public void testAS4_TA06 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeType (CMimeType.APPLICATION_XML) .compression (EAS4CompressionMode.GZIP) - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final AS4MimeMessage aMsg = AS4MimeMessageHelper.generateMimeMessage (m_eSoapVersion, - createTestSignedUserMessage (m_eSoapVersion, - m_aPayload, - aAttachments, - s_aResMgr), - aAttachments); + createTestSignedUserMessage (m_eSoapVersion, + m_aPayload, + aAttachments, + s_aResMgr), + aAttachments); final String sResponse = sendMimeMessage (HttpMimeMessageEntity.create (aMsg), true, null); assertTrue (sResponse.contains (AS4TestConstants.RECEIPT_ASSERTCHECK)); assertTrue (sResponse.contains (AS4TestConstants.NON_REPUDIATION_INFORMATION)); @@ -236,8 +234,7 @@ public void testAS4_TA07 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeType (CMimeType.APPLICATION_XML) .compression (EAS4CompressionMode.GZIP) - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -271,8 +268,7 @@ public void testAS4_TA08 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -303,8 +299,7 @@ public void testAS4_TA09 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -421,7 +416,7 @@ public void testAS4_TA11 () throws Exception @Test public void testAS4_TA12 () { - // XXX + // empty so far } /** @@ -457,8 +452,8 @@ public void testAS4_TA13 () throws Exception aAttachments.get (0).setSourceStreamProvider (new ClassPathResource ("attachment/CompressedPayload.txt")); final AS4MimeMessage aMimeMsg = AS4MimeMessageHelper.generateMimeMessage (m_eSoapVersion, - aMsg.getAsSoapDocument (m_aPayload), - aAttachments); + aMsg.getAsSoapDocument (m_aPayload), + aAttachments); sendMimeMessage (HttpMimeMessageEntity.create (aMimeMsg), false, EEbmsError.EBMS_DECOMPRESSION_FAILURE.getErrorCode ()); @@ -502,8 +497,7 @@ public void testAS4_TA15 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -532,20 +526,17 @@ public void testAS4_TA16 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); aAttachments.add (WSS4JAttachment.createOutgoingFileAttachment (AS4OutgoingAttachment.builder () .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG)) .mimeType (CMimeType.IMAGE_JPG) .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); aAttachments.add (WSS4JAttachment.createOutgoingFileAttachment (AS4OutgoingAttachment.builder () .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML2_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -573,8 +564,7 @@ public void testAS4_TA17 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -605,8 +595,7 @@ public void testAS4_TA18 () throws Exception aAttachments.add (WSS4JAttachment.createOutgoingFileAttachment (AS4OutgoingAttachment.builder () .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final Document aDoc = createTestSignedUserMessage (m_eSoapVersion, m_aPayload, aAttachments, s_aResMgr); @@ -615,8 +604,7 @@ public void testAS4_TA18 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final AS4MimeMessage aMsg = AS4MimeMessageHelper.generateMimeMessage (m_eSoapVersion, aDoc, aAttachments); sendMimeMessage (HttpMimeMessageEntity.create (aMsg), false, EEbmsError.EBMS_VALUE_INCONSISTENT.getErrorCode ()); @@ -641,8 +629,7 @@ public void testAS4_TA19 () throws Exception aAttachments.add (WSS4JAttachment.createOutgoingFileAttachment (AS4OutgoingAttachment.builder () .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final AS4UserMessage aMsg = MockMessages.createUserMessageNotSigned (m_eSoapVersion, null, aAttachments); final AS4MimeMessage aMimeMsg = AS4Encryptor.encryptToMimeMessage (m_eSoapVersion, @@ -691,7 +678,7 @@ public void testAS4_TA20 () throws Exception // Compression final NonBlockingByteArrayOutputStream aCompressedOS = new NonBlockingByteArrayOutputStream (); try (final InputStream aIS = new NonBlockingByteArrayInputStream (aSrc); - final OutputStream aOS = EAS4CompressionMode.GZIP.getCompressStream (aCompressedOS)) + final OutputStream aOS = EAS4CompressionMode.GZIP.getCompressStream (aCompressedOS)) { StreamHelper.copyInputStreamToOutputStream (aIS, aOS); } @@ -722,8 +709,7 @@ public void testAS4_TA21 () throws Exception .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () .compressionGZIP () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final AS4UserMessage aMsg = MockMessages.createUserMessageNotSigned (m_eSoapVersion, null, aAttachments); final Document aDoc = AS4Signer.createSignedMessage (m_aCryptoFactory, @@ -807,20 +793,18 @@ public void testAS4_TA28 () throws Exception aAttachments.add (WSS4JAttachment.createOutgoingFileAttachment (AS4OutgoingAttachment.builder () .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_SHORTXML_XML)) .mimeTypeXML () - .build (), - s_aResMgr)); + .build (), s_aResMgr)); aAttachments.add (WSS4JAttachment.createOutgoingFileAttachment (AS4OutgoingAttachment.builder () .data (ClassPathResource.getAsFile (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG)) .mimeType (CMimeType.IMAGE_JPG) - .build (), - s_aResMgr)); + .build (), s_aResMgr)); final AS4MimeMessage aMsg = AS4MimeMessageHelper.generateMimeMessage (m_eSoapVersion, - MockMessages.createUserMessageNotSigned (m_eSoapVersion, - null, - aAttachments) - .getAsSoapDocument (), - aAttachments); + MockMessages.createUserMessageNotSigned (m_eSoapVersion, + null, + aAttachments) + .getAsSoapDocument (), + aAttachments); final String sResponse = sendMimeMessage (HttpMimeMessageEntity.create (aMsg), true, null); assertTrue (sResponse.contains (AS4TestConstants.RECEIPT_ASSERTCHECK)); diff --git a/phase4-test/src/test/java/com/helger/phase4/server/external/HolodeckOnlineTestSuite.java b/phase4-test/src/test/java/com/helger/phase4/server/external/HolodeckOnlineTestSuite.java index a80279742..d7dbe1202 100644 --- a/phase4-test/src/test/java/com/helger/phase4/server/external/HolodeckOnlineTestSuite.java +++ b/phase4-test/src/test/java/com/helger/phase4/server/external/HolodeckOnlineTestSuite.java @@ -39,7 +39,7 @@ public final class HolodeckOnlineTestSuite { /** The default URL where Holodeck is supposed to run */ - // TODO will be changed soon + // TODO change to whatever you use public static final String DEFAULT_HOLODECK_URI = "http://localhost:8080/msh"; private static ScopedAS4Configuration s_aSC;