How to use the method signalMsgConsumer on Peppol client #119
-
Hi, I have a question regarding the signalMsgConsumer. Why is using this callback to only way to get detailed information about the response of the sent document? I would assume that the signalMessage would be a response of calling the sendMessageAndCheckForReceipt method, but instead it only returns an Enum which doesn't give a lot of detailed information. ESimpleUserMessageSendResult receipt =
Phase4PeppolSender.builder()
.documentTypeID(documentTypeIdentifier)
.processID(processIdentifier)
.senderParticipantID(senderParticipantIdentifier)
.receiverParticipantID(receiverParticipantIdentifier)
.fromPartyID(fromPartyId)
.smpClient(smpClient)
.payload(...)
.signalMsgConsumer(...)
.sendMessageAndCheckForReceipt(); What would be the recommended approach to get signalMessage information into the current "context". Right now I'm using a if (future.isDone()) {
response.ebms3SignalMessage = future.join();
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @luukth-infosupport,
My proposed approach to just store the SignalMessage is like this: com.helger.commons.wrapper.Wrapper<Ebms3SignalMessage> signalMessageHolder = new com.helger.commons.wrapper.Wrapper<> ();
SimpleUserMessageSendResult receipt =
Phase4PeppolSender.builder()
// ...
.signalMsgConsumer(signalMessageHolder::set)
.sendMessageAndCheckForReceipt();
// the above call is synchronous
Ebms3SignalMessage receivedSignalMsg = signalMessageHolder.get (); hth |
Beta Was this translation helpful? Give feedback.
Hi @luukth-infosupport,
The reasons for this rather "difficult" flow to retrieve Signal Messages are quite simple
null
would not help to spot any error