Package com.helger.phase4.peppol.servlet
Interface IPhase4PeppolIncomingSBDHandlerSPI
@IsSPIInterface
public interface IPhase4PeppolIncomingSBDHandlerSPI
This is the interface that must be implemented to handle incoming SBD documents.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleIncomingSBD(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHeaders, @NonNull com.helger.phase4.ebms3header.Ebms3UserMessage aUserMessage, byte @NonNull [] aSBDBytes, @NonNull org.unece.cefact.namespaces.sbdh.StandardBusinessDocument aSBD, @NonNull com.helger.peppol.sbdh.PeppolSBDHData aPeppolSBD, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aState, @NonNull com.helger.phase4.error.AS4ErrorList aProcessingErrorMessages) Handle the provided incoming StandardBusinessDocumentvoidprocessAS4ResponseMessage(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aIncomingState, @NonNull @Nonempty String sResponseMessageID, byte @Nullable [] aResponseBytes, boolean bResponsePayloadIsAvailable, @NonNull com.helger.phase4.error.AS4ErrorList aEbmsErrorMessages) Optional callback to process a response message
-
Method Details
-
handleIncomingSBD
void handleIncomingSBD(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHeaders, @NonNull com.helger.phase4.ebms3header.Ebms3UserMessage aUserMessage, byte @NonNull [] aSBDBytes, @NonNull org.unece.cefact.namespaces.sbdh.StandardBusinessDocument aSBD, @NonNull com.helger.peppol.sbdh.PeppolSBDHData aPeppolSBD, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aState, @NonNull com.helger.phase4.error.AS4ErrorList aProcessingErrorMessages) throws Exception Handle the provided incoming StandardBusinessDocument- Parameters:
aMessageMetadata- Message metadata. Includes data when and from whom it was received. Nevernull. Since v0.9.8.aHeaders- The (HTTP) headers of the incoming request. Nevernull.aUserMessage- The received EBMS user message. Nevernull. Since v0.9.8.aSBDBytes- The raw SBD bytes. These are the bytes as received via AS4, just decrypted and decompressed. Nevernull.aSBD- The incoming parsed Standard Business Document as JAXB data model. This is the pre-parsed SBD bytes. UseSBDMarshallerto serialize the document. NevernullaPeppolSBD- The pre-parsed Peppol Standard Business Document. Nevernull. Since v0.9.8.aState- The message state. Can e.g. be used to retrieve information about the certificate found in the message. Nevernull. Since v0.9.8aProcessingErrorMessages- List for error messages that occur during processing. Nevernull. Since v2.6.0.- Throws:
Exception- In case it cannot be processed.
-
processAS4ResponseMessage
void processAS4ResponseMessage(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aIncomingState, @Nonempty @NonNull @Nonempty String sResponseMessageID, byte @Nullable [] aResponseBytes, boolean bResponsePayloadIsAvailable, @NonNull com.helger.phase4.error.AS4ErrorList aEbmsErrorMessages) Optional callback to process a response message- Parameters:
aIncomingMessageMetadata- Incoming message metadata. Nevernull.aIncomingState- The current message state. Can be used to determine all other things potentially necessary for processing the response message. Nevernull.sResponseMessageID- The AS4 message ID of the response. Neithernullnor empty. Since v1.2.0.aResponseBytes- The response bytes to be written. May benullfor several reasons.bResponsePayloadIsAvailable- This indicates if a response payload is available at all. If this isfalsethan the response bytes arenull. Special case: if this istrueand response bytes isnullthan most likely the response entity is not repeatable and cannot be handled more than once - that's why it isnullhere in this callback, but non-nullin the originally returned message.aEbmsErrorMessages- The error messages collected while processing the message. Nevernullbut maybe empty for positive responses. Since v4.3.0.
-