OxalisCommunity / Oxalis-AS4

PEPPOL AS4 pMode plugin for Oxalis
33 stars 26 forks source link

Multiple Trasport profiles #64

Closed HarshaSuranjith closed 4 years ago

HarshaSuranjith commented 4 years ago

Hi,

What's the behaviour if a particular process supports multiple transport profiles ?

How to set AS4 as default trasnport profile ?

TransmissionRequestBuilder.java link

if (isEndpointSuppliedByCaller() && isOverrideAllowed()) {
            log.warn("Endpoint was set by caller not retrieved from SMP, make sure this is intended behaviour.");
        } else {
            Endpoint endpoint = lookupService.lookup(effectiveStandardBusinessHeader.toVefa(), null);

            if (isEndpointSuppliedByCaller() && !this.endpoint.equals(endpoint)) {
                throw new IllegalStateException("You are not allowed to override the EndpointAddress from SMP.");
            }

            this.endpoint = endpoint;
        }
FrodeBjerkholt commented 4 years ago

This question is probably better answered in the Oxalis repository, but you can specify weights for different transport profiles to make Oxalis select the one you want. I.e.:

transport.as4_peppol_v1_to_v2_adapter = {
    profile: bdxr-transport-ebms3-as4-v1p0
    sender: oxalis-as4
    weight: 5000
}
HarshaSuranjith commented 4 years ago

Thanks, sorted out my issue.