|
36 | 36 | import java.util.Enumeration; |
37 | 37 |
|
38 | 38 | import javax.annotation.Nonnull; |
39 | | -import javax.mail.Header; |
40 | | -import javax.mail.internet.MimeBodyPart; |
41 | 39 |
|
42 | 40 | import org.slf4j.Logger; |
43 | 41 | import org.slf4j.LoggerFactory; |
|
65 | 63 | import com.helger.commons.system.SystemHelper; |
66 | 64 | import com.helger.security.keystore.EKeyStoreType; |
67 | 65 |
|
| 66 | +import jakarta.mail.Header; |
| 67 | +import jakarta.mail.internet.MimeBodyPart; |
| 68 | + |
68 | 69 | /** |
69 | 70 | * <pre> |
70 | 71 | * <partnerships> |
@@ -114,7 +115,8 @@ public static void main (final String [] args) |
114 | 115 | aSettings.setSenderData ("OpenAS2A", "email@example.org", "OpenAS2A_alias"); |
115 | 116 | aSettings.setReceiverData ("OpenAS2B", "OpenAS2B_alias", "http://localhost:10080/HttpReceiver"); |
116 | 117 | aSettings.setPartnershipName ("Partnership name"); |
117 | | - aSettings.setEncryptAndSign (DO_ENCRYPT ? ECryptoAlgorithmCrypt.CRYPT_3DES : null, DO_SIGN ? ECryptoAlgorithmSign.DIGEST_SHA_1 : null); |
| 118 | + aSettings.setEncryptAndSign (DO_ENCRYPT ? ECryptoAlgorithmCrypt.CRYPT_3DES : null, |
| 119 | + DO_SIGN ? ECryptoAlgorithmSign.DIGEST_SHA_1 : null); |
118 | 120 | // Use the default MDN options |
119 | 121 | // Use the default message ID format |
120 | 122 |
|
@@ -257,11 +259,19 @@ protected static void checkRequired (@Nonnull final IMessage aMsg) throws AS2Inv |
257 | 259 | try |
258 | 260 | { |
259 | 261 | AS2InvalidParameterException.checkValue (aMsg, "ContentType", aMsg.getContentType ()); |
260 | | - AS2InvalidParameterException.checkValue (aMsg, "Attribute: " + CPartnershipIDs.PA_AS2_URL, aPartnership.getAS2URL ()); |
261 | | - AS2InvalidParameterException.checkValue (aMsg, "Receiver: " + CPartnershipIDs.PID_AS2, aPartnership.getReceiverAS2ID ()); |
262 | | - AS2InvalidParameterException.checkValue (aMsg, "Sender: " + CPartnershipIDs.PID_AS2, aPartnership.getSenderAS2ID ()); |
| 262 | + AS2InvalidParameterException.checkValue (aMsg, |
| 263 | + "Attribute: " + CPartnershipIDs.PA_AS2_URL, |
| 264 | + aPartnership.getAS2URL ()); |
| 265 | + AS2InvalidParameterException.checkValue (aMsg, |
| 266 | + "Receiver: " + CPartnershipIDs.PID_AS2, |
| 267 | + aPartnership.getReceiverAS2ID ()); |
| 268 | + AS2InvalidParameterException.checkValue (aMsg, |
| 269 | + "Sender: " + CPartnershipIDs.PID_AS2, |
| 270 | + aPartnership.getSenderAS2ID ()); |
263 | 271 | AS2InvalidParameterException.checkValue (aMsg, "Subject", aMsg.getSubject ()); |
264 | | - AS2InvalidParameterException.checkValue (aMsg, "Sender: " + CPartnershipIDs.PID_EMAIL, aPartnership.getSenderEmail ()); |
| 272 | + AS2InvalidParameterException.checkValue (aMsg, |
| 273 | + "Sender: " + CPartnershipIDs.PID_EMAIL, |
| 274 | + aPartnership.getSenderEmail ()); |
265 | 275 | AS2InvalidParameterException.checkValue (aMsg, "Message Data", aMsg.getData ()); |
266 | 276 | } |
267 | 277 | catch (final AS2InvalidParameterException ex) |
|
0 commit comments