Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to send an outside SBDH #22

Closed
phax opened this issue Nov 20, 2019 · 6 comments
Closed

Add the possibility to send an outside SBDH #22

phax opened this issue Nov 20, 2019 · 6 comments
Assignees

Comments

@phax
Copy link
Owner

phax commented Nov 20, 2019

In a comparable way as phax/as2-peppol#5

@phax phax self-assigned this Nov 20, 2019
@phax
Copy link
Owner Author

phax commented Dec 11, 2019

Part of the 0.9.6 release

@phax phax closed this as completed Dec 11, 2019
@kukel
Copy link
Contributor

kukel commented Jun 23, 2020

Does this still mean I need to manually parse the SBD(H) and retrieve the sender, recipient documenttypeid etc? Just that the SBDH is not created? I thought with your AS2 solution this was not needed or am I wrong?

@phax
Copy link
Owner Author

phax commented Jun 24, 2020

If you want phase4 to build your SBDH, you use Phase4PeppolSender.builder () whereas if you already have an SBDH, you use Phase4PeppolSender.sbdhBuilder() to set the necessary settings. The difference is in validation etc.
The setup here is not comparable to the AS2 solution and was rebuild from scratch (hopefully simpler).

@kukel
Copy link
Contributor

kukel commented Jun 25, 2020

Ok, maybe my expectation was wrong. With passing on an existing SBDH, I expected the sbdhBuilder to extract the recipient, doctype etc from the existing SDBH so I would not need to pass those on manually. This does not seem to be the case. Would it be an interesting enhancement? E.g. when doing Phase4PeppolSender.sbdhBuilder(true) it uses the info from the existing header...

@phax phax reopened this Jun 25, 2020
@phax
Copy link
Owner Author

phax commented Jun 26, 2020

@kukel Would something like this suffice:

    @Nonnull
    public SBDHBuilder payloadAndMetadata (@Nonnull final PeppolSBDHDocument aSBDH)
    {
      ValueEnforcer.notNull (aSBDH, "SBDH");
      return senderParticipantID (aSBDH.getSenderAsIdentifier ())
                   .receiverParticipantID (aSBDH.getReceiverAsIdentifier ())
                   .documentTypeID (aSBDH.getDocumentTypeAsIdentifier ())
                   .processID (aSBDH.getProcessAsIdentifier ())
                   .payload (new SBDMarshaller ().getAsBytes (new PeppolSBDHDocumentWriter ().createStandardBusinessDocument (aSBDH)));
    }

or what is your input format of the SBDH?

phax added a commit that referenced this issue Jun 26, 2020
@phax
Copy link
Owner Author

phax commented Jul 7, 2020

Part of 0.10.2 release

@phax phax closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants