diff --git a/phase4-bdew-client/src/main/java/com/helger/phase4/bdew/Phase4BDEWSender.java b/phase4-bdew-client/src/main/java/com/helger/phase4/bdew/Phase4BDEWSender.java index ef649541e..926da1328 100644 --- a/phase4-bdew-client/src/main/java/com/helger/phase4/bdew/Phase4BDEWSender.java +++ b/phase4-bdew-client/src/main/java/com/helger/phase4/bdew/Phase4BDEWSender.java @@ -228,6 +228,9 @@ protected WSS4JAttachment createMainAttachment (@Nonnull final AS4OutgoingAttach if (m_aPayloadParams.getSubjectPartyRole () != null) aPayloadAttachment.customPartProperties () .put ("BDEWSubjectPartyRole", m_aPayloadParams.getSubjectPartyRole ()); + if (m_aPayloadParams.getApplicationReference () != null) + aPayloadAttachment.customPartProperties () + .put ("BDEWApplicationReference", m_aPayloadParams.getApplicationReference ()); } return aPayloadAttachment; } @@ -259,6 +262,7 @@ public static class BDEWPayloadParams private LocalDate m_aFulfillmentDate; private String m_sSubjectPartyID; private String m_sSubjectPartyRole; + private String m_sApplicationReference; /** * @return BDEW payload document type for payload identifier @@ -423,6 +427,31 @@ public BDEWPayloadParams setSubjectPartyRole (@Nullable final String sSubjectPar return this; } + + /** + * @return BDEW payload application reference for payload identifier + * BDEWApplicationReference + */ + @Nullable + public String getApplicationReference () + { + return m_sApplicationReference; + } + + /** + * BDEW payload application reference + * + * @param sApplicationReference + * Application reference to use. May be null. + * @return this for chaining + */ + @Nonnull + public BDEWPayloadParams setApplicationReference (@Nullable final String sApplicationReference) + { + m_sApplicationReference = sApplicationReference; + return this; + } + @Override public String toString () { @@ -432,6 +461,7 @@ public String toString () .append ("FulfillmentDate", m_aFulfillmentDate) .append ("SubjectPartyID", m_sSubjectPartyID) .append ("SubjectPartyRole", m_sSubjectPartyRole) + .append ("ApplicationReference", m_sApplicationReference) .getToString (); } }