OxalisCommunity / Oxalis-AS4

PEPPOL AS4 pMode plugin for Oxalis
32 stars 25 forks source link

CEF Connectivity Test (dynamic scenario) #179

Open pierfrancesco72 opened 2 years ago

pierfrancesco72 commented 2 years ago

I have registered a participant with Phoss SMP: connectivity-partid-qns::dynceftest2party71gw

If I try to find it on https://acc.edelivery.tech.ec.europa.eu/edelivery-sml/search :

image

it is present:

SML sub-domain: connectivitytest.acc.edelivery.tech.ec.europa.eu

Y77IGVVUUFTBTHSW5CWSTWKSFDR5MTHZB4XFJXPLU66HMKZR3MNQ.connectivity-partid-qns.connectivitytest.acc.edelivery.tech.ec.europa.eu.  60  IN  NAPTR   100 10 "U" "Meta:SMP" "!.*!http://smp.pantarei-si.it!" .

or in this other site: https://peppol.helger.com/public/locale-en_US/menuitem-tools-participant

but when I try to send a payload.xml from oxalis-distribution-5.0.6-distro oxalis-standalone.jar with this payload.xml:

<?xml version="1.0" encoding="UTF-8"?>
<StandardBusinessDocument xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
    <StandardBusinessDocumentHeader>
        <HeaderVersion>1.0</HeaderVersion>
        <Sender>
            <Identifier Authority="connectivity-partid-qns">cefsupport1gw</Identifier>
        </Sender>
        <Receiver>
            <Identifier Authority="connectivity-partid-qns">dynceftest2party71gw</Identifier>
        </Receiver>
[...]

and this command:

java -classpath "./*:../api/*" eu.sendregning.oxalis.Main -f ./payload.xml

I receive this error:

Message failed : Identifier 'dynceftest2party71gw' is not registered in SML.

Maybe my payload.xml is badly formatted?

this is my oxalis.conf:

oxalis.keystore {
        path=dynceftest2party71gw.jks
        password = test123
        key.alias = dynceftest2party71gw
        key.password = test123
}

security.truststore.ap=/home/ubuntu/.oxalis/truststore/gateway_truststore.jks
security.truststore.password=test123

oxalis.as4.type=cef-connectivity
#oxalis.header.parser=dummy

lookup.locator.hostname="acc.edelivery.tech.ec.europa.eu/edelivery-sml/"
lookup.locator.class = network.oxalis.vefa.peppol.lookup.locator.BusdoxLocator

security.validator.class = network.oxalis.vefa.peppol.security.util.EmptyCertificateValidator

oxalis.path.inbound = /home/ubuntu/.oxalis/in
pierfrancesco72 commented 2 years ago

Hi all,

I have a question:

if I access the SMK website: acc.edelivery.tech.ec.europa.eu/edelivery-sml/listDNS I see a number of DNS mappings, among which there are also points to our SMP:

image

In fact, if I try to enter the name on the left in the browser url, I am redirected to the url that appears on the right after CNAME:

image

I press the Enter button and I am actually redirected to my server smp.pantarei-si.it:

image

This happens because in the specific line of the DNS list acc.edelivery.tech.ec.europa.eu/edelivery-sml/listDNS CNAME is written

As regards the mapping of PARTICIPANT-IDs, the DNS resource type is no longer CNAME, but NAPTR:

image

In this case the url on the left, copied and pasted into the browser, does not produce the actual redirection to my SMP: http://smp.pantarei-si.it/

image

This could be the reason why, whenever I test sending a message via PEPPOL to the specific PARTICIPANT-ID, it tells me that this PARTICIPANT-ID does not exist in the SMK.

Payload.xml:

image

image

What do you think about this behaviour I have described, relating to NAPTR type mapping that is not picked up by the DNS?

I saw the topic 498, and now I'm wondering if Oxalis also has issues with the NAPTR protocol. If so, the CEF Test would not be possible to resolve.

What do you guys think?

aleixmoreno commented 2 years ago

I have exactly the same problem

pierfrancesco72 commented 2 years ago

there is a site that allows you to test various configurations, through online tools:

https://peppol.helger.com/public/locale-en_US/menuitem-tools

If I run a test to verify the existence of the participant "dynceftest2party70gw", the test is successful:

image

https://peppol.helger.com/public/locale-en_US/menuitem-tools-participant?scheme=connectivity-partid-qns&value=dynceftest2party70gw&sml=autodetect&querybc=true&__querybc=true&__showtime=true&xsdvalidation=true&__xsdvalidation=true&verifysignatures=true&__verifysignatures=true&action=perform

But when I test the correctness of the participant's declaration structure, according to what I have been able to understand from the documentation, the test fails:

image

https://peppol.helger.com/public/locale-en_US/menuitem-tools-id-info?type=ppid&value=connectivity-partid-qns%3A%3Adynceftest2party70gw&decode=true&__decode=true&action=perform

image

While if I insert a known structure, like the following: iso6523-actorid-upis::0211:05901080969, the test is successful:

image

This may be why we always receive that the participant is not recognized in SMK.

What are your thoughts on this?

Greetings

Pierfrancesco

pierfrancesco72 commented 2 years ago

I couldn't find where to set this subdomain connectivitytest in all the oxalis documentation.

I tried (unsuccessfully) to change the parameter:

lookup.locator.hostname="connectivitytest.acc.edelivery.tech.ec.europa.eu/edelivery-sml/"

and I also saw that in the oxalis code, regarding the CEF connectivity test, there are carved parameters. That is, by searching the code for the AS4 configuration class, it appears in 6 places:

https://github.com/search?q=org%3AOxalisCommunity+network.oxalis.as4.config&type=code

For example As4OutboundModule.java image

so anything I put in the payload.xml would seem to be ignored.

dladlk commented 2 years ago

Did you try to omit context name from the locator hostname?

This looks weird for me - this configuration is used for DNS resolution, not for making calls...

lookup.locator.hostname="acc.edelivery.tech.ec.europa.eu/edelivery-sml/"

Try

lookup.locator.hostname=acc.edelivery.tech.ec.europa.eu

And as far as I see, NAPTR records are not supported by browsers, NAPTR is used by BdxlLookup, but Busdox lookup use CNAME via hashes. Try to debug network.oxalis.vefa.peppol.lookup.locator.BusdoxLocator to see how the lookup is done. As it does not log debug messages, only real debugging is possible.

dladlk commented 2 years ago

Oh, I remembered a way how to see debug messages for DNS lookups - add into your code before lookup invocation next line:

org.xbill.DNS.Options.set("verbose", "true");

This will give you in stdout something like:

lookup B-0634ebd9eda301f2872ec377c4aad0e4.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu. A
CNAME: { B-0634ebd9eda301f2872ec377c4aad0e4.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu. 60 IN CNAME [smp-test.belgium.be.publisher.acc.edelivery.tech.ec.europa.eu.] } cl = 3
lookup smp-test.belgium.be.publisher.acc.edelivery.tech.ec.europa.eu. A
CNAME: { smp-test.belgium.be.publisher.acc.edelivery.tech.ec.europa.eu. 60 IN CNAME [smp-test.belgium.be.] } cl = 3
lookup smp-test.belgium.be. A
successful
lookup B-ebba12d0d4e9ce1d70089b422b568879.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu. A
NXDOMAIN

so you can check what kind of DNS lookups actually are done.

Also it will show you DNS servers it queries so it is possible to optimize it by passing e.g. -Ddns.server=8.8.8.8 on startup.

pierfrancesco72 commented 2 years ago

Thanks @dladlk for your answer.

I think I have overcome the problem related to participant recognition with this configuration: oxalis.conf:

oxalis.keystore {
        path=dynceftest2party70gw.jks
        password = test123
        key.alias = dynceftest2party70gw
        key.password = test123
}
oxalis.as4.type=cef-connectivity

lookup.locator.hostname="connectivitytest.acc.edelivery.tech.ec.europa.eu"
lookup.locator.class = network.oxalis.vefa.peppol.lookup.locator.BdxlLocator
security.validator.class = network.oxalis.vefa.peppol.security.util.EmptyCertificateValidator
oxalis.path.inbound = /home/XXXXXX/.oxalis/in
oxalis.logging.config=logback.xml

I have now come to the problem of recognizing the DOCUMENTID. That is, the pattern required in the TAG <InstanceIdentifier>????</InstanceIdentifier> of the DOCUMENTID, seems to be too verbose for the standards of the "CEF Connectivity Test":

in fact the class PeppolDocumentTypeId.java, has a parser that retrieves that value, through a regular expression:

static Pattern documentIdPattern = Pattern.compile("(.*)::(.*)##(.*)::(.*)");

Is there any way to bypass this step of deconstructing and rebuilding the DOCUMENTID, and just take what is written in the TAG?

I'm making several attempts to find a tag content that will work, but I haven't succeeded yet. Below is my payload.xml:

<?xml version="1.0" encoding="UTF-8"?>
<StandardBusinessDocument xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
    <StandardBusinessDocumentHeader>
        <HeaderVersion>2.2</HeaderVersion>
        <Sender>
            <Identifier Authority="connectivity-partid-qns">dynceftest2party70gw</Identifier>
        </Sender>
        <Receiver>
            <Identifier Authority="connectivity-partid-qns">cefsupport1gw</Identifier>
        </Receiver>
        <DocumentIdentification>
            <Standard>NONE</Standard>
            <TypeVersion>1.0</TypeVersion>
            <InstanceIdentifier>d8b5b55f-508d-438a-8363-2e5e0d7820fc</InstanceIdentifier>
            <Type>CEF Connectivity test</Type>
            <CreationDateAndTime>2022-05-05T18:15:00.000+02:00</CreationDateAndTime>
        </DocumentIdentification>
        <BusinessScope> 
            <Scope>
                <Type>DOCUMENTID</Type>
                <Identifier>connectivity-docid-qns</Identifier>
                <InstanceIdentifier>::doc_id1##::</InstanceIdentifier>
            </Scope>
            <Scope>
                <Type>PROCESSID</Type>
                <Identifier>connectivity-procid-qns</Identifier>
                <InstanceIdentifier>urn:www.cenbii.eu:profile:bii04:ver1.0</InstanceIdentifier>
            </Scope>
        </BusinessScope>
    </StandardBusinessDocumentHeader>
    <Request>eDelivery AS4 Connectivity test. Sending Message</Request>
</StandardBusinessDocument>

log:

java -classpath "./standalone/*;./as4/*" eu.sendregning.oxalis.Main -f ./payload.xml
2022-05-09 14:48:19,826 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-09 14:48:19,830 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-09 14:48:19,831 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-09 14:48:19,831 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-09 14:48:19,840 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-09 14:48:19,841 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-09 14:48:19,841 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-09 14:48:20,910 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-09 14:48:20,910 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-09 14:48:20,911 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-09 14:48:20,911 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-09 14:48:20,914 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TOTAL: 20
2022-05-09 14:48:20,914 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_MAX_ROUTE: 2
2022-05-09 14:48:20,914 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_VALIDATE_AFTER_INACTIVITY: 1000
2022-05-09 14:48:20,914 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TIME_TO_LIVE: 30
2022-05-09 14:48:20,914 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_CONNECT: 0
2022-05-09 14:48:20,914 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_READ: 0
2022-05-09 14:48:20,915 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_SOCKET: 0
2022-05-09 14:48:20,915 INFO [network.oxalis.commons.settings.SettingsBuilder] Error => TRACKER: quiet
2022-05-09 14:48:20,916 INFO [network.oxalis.commons.settings.SettingsBuilder] AS2 => NOTIFICATION: not.in.use@difi.no
2022-05-09 14:48:20,916 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-09 14:48:20,916 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-09 14:48:20,917 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-09 14:48:20,917 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => HOSTNAME:
2022-05-09 14:48:20,918 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => MSGID_GENERATOR: default
2022-05-09 14:48:20,918 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PATH: dynceftest2party70gw.jks
2022-05-09 14:48:20,919 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PASSWORD: *******
2022-05-09 14:48:20,919 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_ALIAS: dynceftest2party70gw
2022-05-09 14:48:20,920 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_PASSWORD: *******
2022-05-09 14:48:20,920 INFO [network.oxalis.commons.settings.SettingsBuilder] Header => PARSER: sbdh
2022-05-09 14:48:20,921 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => PAYLOAD: default
2022-05-09 14:48:20,921 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => RECEIPT: default
2022-05-09 14:48:20,922 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => EXCEPTION: default
2022-05-09 14:48:20,922 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => HANDLER: default
2022-05-09 14:48:20,923 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => REPORTER: noop
2022-05-09 14:48:20,923 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => HTTP: <null>
2022-05-09 14:48:20,924 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => TRACER: noop
2022-05-09 14:48:20,924 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => DEFAULT: 50
2022-05-09 14:48:20,924 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => STATISTICS: 50
2022-05-09 14:48:20,925 INFO [network.oxalis.commons.settings.SettingsBuilder] Tag => GENERATOR: noop
2022-05-09 14:48:20,925 INFO [network.oxalis.commons.settings.SettingsBuilder] Timestamp => SERVICE: system
2022-05-09 14:48:20,926 INFO [network.oxalis.commons.settings.SettingsBuilder] Evidence => SERVICE: rem
2022-05-09 14:48:20,926 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => DETECTOR: noop
2022-05-09 14:48:20,927 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => WRAPPER: xml
2022-05-09 14:48:20,927 INFO [network.oxalis.commons.settings.SettingsBuilder] Statistics => SERVICE: noop
2022-05-09 14:48:20,928 INFO [network.oxalis.commons.settings.SettingsBuilder] Transmission => VERIFIER: default
2022-05-09 14:48:20,929 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => HOSTNAME:
2022-05-09 14:48:20,930 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => MSGID_GENERATOR: default
2022-05-09 14:48:20,930 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => TYPE: cef-connectivity
2022-05-09 14:48:20,931 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => CONFIG: logback.xml
2022-05-09 14:48:20,931 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => SERVICE: logback
2022-05-09 14:48:20,932 INFO [network.oxalis.commons.logging.LoggingHandler] Logging service: logback
Configuring Logback with configuration: /home/XXXXXX/.oxalis/logback.xml
14:48:21.004 [main] INFO  n.o.c.security.CertificateModule - Certificate subject: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=dynceftest2party70gw, OU=Connecting Europe Facility, O=Connectivity Test, ST=Brussels-Capital, C=BE
14:48:21.005 [main] INFO  n.o.c.security.CertificateModule - Certificate issuer: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=Connectivity Test Component CA, OU=Connecting Europe Facility, O=Connectivity Test, ST=Belgium, C=BE
14:48:21.016 [main] INFO  n.o.v.peppol.security.ModeDetector - Detected mode: TEST
14:48:21.020 [main] INFO  n.o.o.t.MessageSenderFactory - Prioritized list of transport profiles:
14:48:21.020 [main] INFO  n.o.o.t.MessageSenderFactory - => peppol-transport-as4-v2_0
14:48:21.021 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0r1
14:48:21.021 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver2p0
14:48:21.021 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0

14:48:22.065 [pool-1-thread-1] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: default
14:48:22.075 [pool-1-thread-1] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
14:48:22.076 [pool-1-thread-1] DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://gateway-edelivery.westeurope.cloudapp.azure.com:444][total available: 0; route allocated: 0 of 2; total allocated: 0 of 20]
14:48:22.088 [pool-1-thread-1] DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://gateway-edelivery.westeurope.cloudapp.azure.com:444][total available: 0; route allocated: 1 of 2; total allocated: 1 of 20]
14:48:22.090 [pool-1-thread-1] DEBUG o.a.h.impl.execchain.MainClientExec - Opening connection {s}->https://gateway-edelivery.westeurope.cloudapp.azure.com:444
14:48:22.161 [pool-1-thread-1] DEBUG o.a.h.i.c.DefaultHttpClientConnectionOperator - Connecting to gateway-edelivery.westeurope.cloudapp.azure.com/40.118.99.138:444
14:48:22.161 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory - Connecting socket to gateway-edelivery.westeurope.cloudapp.azure.com/40.118.99.138:444 with timeout 0
14:48:22.219 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory - Enabled protocols: [TLSv1.2]
14:48:22.219 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
14:48:22.221 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory - Starting handshake
14:48:22.447 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory - Secure session established
14:48:22.448 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory -  negotiated protocol: TLSv1.2
14:48:22.449 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory -  negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
14:48:22.449 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory -  peer principal: CN=gateway-edelivery.westeurope.cloudapp.azure.com
14:48:22.450 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory -  peer alternative names: [gateway-edelivery.westeurope.cloudapp.azure.com]
14:48:22.450 [pool-1-thread-1] DEBUG o.a.h.c.s.SSLConnectionSocketFactory -  issuer principal: CN=R3, O=Let's Encrypt, C=US
14:48:22.454 [pool-1-thread-1] DEBUG o.a.h.i.c.DefaultHttpClientConnectionOperator - Connection established 192.168.178.31:56020<->40.118.99.138:444
14:48:22.454 [pool-1-thread-1] DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-0: set socket timeout to 0
14:48:22.455 [pool-1-thread-1] DEBUG o.a.h.impl.execchain.MainClientExec - Executing request GET /connectivity-partid-qns%3A%3Acefsupport1gw/services/connectivity-docid-qns%3A%3A%3A%3Adoc_id1%23%23%3A%3A HTTP/1.1
14:48:22.455 [pool-1-thread-1] DEBUG o.a.h.impl.execchain.MainClientExec - Target auth state: UNCHALLENGED
14:48:22.456 [pool-1-thread-1] DEBUG o.a.h.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
14:48:22.457 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 >> GET /connectivity-partid-qns%3A%3Acefsupport1gw/services/connectivity-docid-qns%3A%3A%3A%3Adoc_id1%23%23%3A%3A HTTP/1.1
14:48:22.457 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: gateway-edelivery.westeurope.cloudapp.azure.com:444
14:48:22.458 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
14:48:22.458 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: Oxalis 5.1.0
14:48:22.458 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
14:48:22.459 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 >> "GET /connectivity-partid-qns%3A%3Acefsupport1gw/services/connectivity-docid-qns%3A%3A%3A%3Adoc_id1%23%23%3A%3A HTTP/1.1[\r][\n]"
14:48:22.459 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: gateway-edelivery.westeurope.cloudapp.azure.com:444[\r][\n]"
14:48:22.459 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
14:48:22.460 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: Oxalis 5.1.0[\r][\n]"
14:48:22.460 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
14:48:22.460 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
14:48:22.513 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 404  [\r][\n]"
14:48:22.513 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "Keep-Alive: timeout=20[\r][\n]"
14:48:22.515 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
14:48:22.516 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "Content-Type: text/xml;charset=UTF-8[\r][\n]"
14:48:22.516 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "Set-Cookie: JSESSIONID=3D23945B8033F05BC64988B8EE6F935E; Path=/; HttpOnly[\r][\n]"
14:48:22.517 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "Date: Mon, 09 May 2022 12:48:54 GMT[\r][\n]"
14:48:22.517 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
14:48:22.518 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "1b7[\r][\n]"
14:48:22.518 [pool-1-thread-1] DEBUG org.apache.http.wire - http-outgoing-0 << "<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ErrorResponse xmlns="ec:services:SMP:1.0"><BusinessCode>NOT_FOUND</BusinessCode><ErrorDescription>ServiceMetadata not found (part. id: 'cefsupport1gw', part. sch.: 'connectivity-partid-qns',doc. id: '::doc_id1##::', doc. sch.: 'connectivity-docid-qns')!</ErrorDescription><ErrorUniqueId>2022-05-09T14:48:55.020CEST:00c1ab9a-a039-4eea-9e02-3286c68207a8</ErrorUniqueId></ErrorResponse>[\r][\n]"
14:48:22.521 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 404
14:48:22.521 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 << Keep-Alive: timeout=20
14:48:22.521 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 << Transfer-Encoding: chunked
14:48:22.522 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type: text/xml;charset=UTF-8
14:48:22.522 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 << Set-Cookie: JSESSIONID=3D23945B8033F05BC64988B8EE6F935E; Path=/; HttpOnly
14:48:22.523 [pool-1-thread-1] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Mon, 09 May 2022 12:48:54 GMT
14:48:22.528 [pool-1-thread-1] DEBUG o.a.h.impl.execchain.MainClientExec - Connection can be kept alive for 20000 MILLISECONDS
14:48:22.532 [pool-1-thread-1] DEBUG o.a.h.c.p.ResponseProcessCookies - Cookie accepted [JSESSIONID="3D23945B8033F05BC64988B8EE6F935E", version:0, domain:gateway-edelivery.westeurope.cloudapp.azure.com, path:/, expiry:null]
14:48:22.532 [pool-1-thread-1] DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
14:48:22.534 [pool-1-thread-1] DEBUG o.a.h.impl.execchain.MainClientExec - Connection discarded
14:48:22.535 [pool-1-thread-1] DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://gateway-edelivery.westeurope.cloudapp.azure.com:444][total available: 0; route allocated: 0 of 2; total allocated: 0 of 20]

Message failed : Combination of receiver (connectivity-partid-qns::cefsupport1gw) and document type identifier (connectivity-docid-qns::::doc_id1##::) is not supported.

14:48:22.539 [main] ERROR eu.sendregning.oxalis.Main - Execution failed: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
java.util.concurrent.ExecutionException: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at eu.sendregning.oxalis.Main.main(Main.java:225)
Caused by: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
        at network.oxalis.outbound.transmission.DefaultTransmitter.perform(DefaultTransmitter.java:116)
        at network.oxalis.outbound.transmission.DefaultTransmitter.transmit(DefaultTransmitter.java:93)
        at eu.sendregning.oxalis.TransmissionTask.performTransmission(TransmissionTask.java:166)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:94)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:48)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Total time spent: 1s
Attempted to send 0 files
Failed transmissions: 1
aleixmoreno commented 2 years ago

I tried the same than pierfrancesco and I received the same response

Message failed : Combination of receiver (xxx) and document type identifier (xxx) is not supported.

dladlk commented 2 years ago

Wow... It really looks weird for me :) As I remember, when I passed the connectivity test in 2019, CEF TestBed did not support dynamic lookup via SMK/SMP - destination URLs were configured per test case in some GUI, may be it is changed now.

But let's look into your configuration:

lookup.locator.hostname=connectivitytest.acc.edelivery.tech.ec.europa.eu and you do lookup by connectivity-partid-qns:cefsupport1gw

When I do it, I do not get Busdox simple result - but only Bdxl result:

image

So, as war as I see, SML forwards responses from

https://gateway-edelivery.westeurope.cloudapp.azure.com:444/connectivity-partid-qns::cefsupport1gw

If we try to access it to see which documents are configured, we see this XML: image

But if I try to access the URL to details of the single published document - it hangs:

http://gateway-edelivery.westeurope.cloudapp.azure.com:444/connectivity-partid-qns%3A%3Acefsupport1gw/services/connectivity-docid-qns%3A%3Adoc_id1

It slightly corresponds to log records you printed - Oxalis tries to load this metadata but gets ErrorResponse at 14:48:22.518...

Something is weird with this SMP registration, it has sense to ask CEF support why the SMP works so strange...

The question to them could be - why the link inside this XML result does not work?

https://gateway-edelivery.westeurope.cloudapp.azure.com:444/connectivity-partid-qns::cefsupport1gw

dladlk commented 2 years ago

Oh, I again answered not exact your question :)

According to overview of registered ServiceMetadataReferences, I think the document type id in SBDH should be just "connectivity-docid-qns::doc_id1":

            <Scope>
                <Type>DOCUMENTID</Type>
                <InstanceIdentifier>connectivity-docid-qns::doc_id1</InstanceIdentifier>
            </Scope>

In other words, in your logs I can see next line (URL decoded):

Executing request GET /connectivity-partid-qns::cefsupport1gw/services/connectivity-docid-qns::::doc_id1##::

According to SMP overview by participant, it should be just:

Executing request GET /connectivity-partid-qns::cefsupport1gw/services/connectivity-docid-qns::doc_id1

I guess that is why it was rejected immediately and did not hang.

But the problem for me was to get the response from SMP by request to details of this ServiceMetadata from SMP...

Are you able to get it? If yes, please post the response XML here.

pierfrancesco72 commented 2 years ago

Many Thanks @dladlk,

regarding what you suggest, there is the problem I mentioned in my previous post, that is the one regarding the XML parser, in fact if I insert this specific InstanceIdentifier, I receive the following error from Oxalis:

Message failed : Unable to parseOld 'connectivity-docid-qns::doc_id1' into PEPPOL Document Type Identifier

Oxalis immediately stops the execution of the request, already at the moment of the parse of the payload.xml not recognising that "simple" structure: (.*)::(.*), while it expects a structure like (.*)::(.*)##(.*)::(.*).

dladlk commented 2 years ago

Oh, you are right - I again answered not what you asked :)

The answer is - build SBDH by yourself.

The class you mention is inside oxalis-document-sniffer sub-project - which is an a legacy part. It is done to build SBDH by some predefined sets of documents, and that is why you have issues with doc_id1.

Just wrap your payload with SBDH and put there whatever you want - as I know, Oxalis invokes sniffer only if it is not already SBD in payload.

pierfrancesco72 commented 2 years ago

I'm not quite sure what to do...

I've tried editing the DocumentIdentification TAG in the following way:

<?xml version="1.0" encoding="UTF-8"?>
<StandardBusinessDocument xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
    <StandardBusinessDocumentHeader>
        <HeaderVersion>2.2</HeaderVersion>
        <Sender>
            <Identifier Authority="connectivity-partid-qns">dynceftest2party70gw</Identifier>
        </Sender>
        <Receiver>
            <Identifier Authority="connectivity-partid-qns">cefsupport1gw</Identifier>
        </Receiver>
        <DocumentIdentification>
            <Standard>connectivity-docid-qns</Standard>
            <TypeVersion>1.0</TypeVersion>
            <InstanceIdentifier>c799362c-45aa-494d-be1c-2df3ba277bf8</InstanceIdentifier>
            <Type>doc_id1</Type>
            <CreationDateAndTime>2022-05-09T12:00:00.000</CreationDateAndTime>
            <!--Standard>NONE</Standard>
            <TypeVersion>1.0</TypeVersion>
            <InstanceIdentifier>d8b5b55f-508d-438a-8363-2e5e0d7820fc</InstanceIdentifier>
            <Type>CEF Connectivity test</Type>
            <CreationDateAndTime>2022-05-05T18:15:00.000+02:00</CreationDateAndTime-->
        </DocumentIdentification>
        <BusinessScope> 
            <Scope>
                <Type>DOCUMENTID</Type>
                <Identifier>connectivity-docid-qns</Identifier>
                <InstanceIdentifier>doc_id1</InstanceIdentifier>
            </Scope>
            <Scope>
                <Type>PROCESSID</Type>
                <Identifier>connectivity-procid-qns</Identifier>
                <InstanceIdentifier>urn:www.cenbii.eu:profile:bii04:ver1.0</InstanceIdentifier>
            </Scope>
        </BusinessScope>
    </StandardBusinessDocumentHeader>
    <Request>eDelivery AS4 Connectivity test. Sending Message</Request>
</StandardBusinessDocument>

but the sniffer error is still there:

Message failed : Unable to parseOld 'doc_id1' into PEPPOL Document Type Identifier

And if I try to remove the first TAG Scope the error is the follow:

Message failed : Content does not contain SBDH.

dladlk commented 2 years ago

Oh, yes, you already send SBD... Can you post the whole stack trace so I try to reproduce it?

dladlk commented 2 years ago

For now I have only dirty hack for you - omit actual lookup and supply its results by yourselves :)

My previous suggestion that something is wrong with SMP was not fully correct - the only issue it has - they publish HTTP links in signed metadata but do not allow them :)

So the URL is openable if you change http to https:

https://gateway-edelivery.westeurope.cloudapp.azure.com:444/connectivity-partid-qns%3A%3Acefsupport1gw/services/connectivity-docid-qns%3A%3Adoc_id1

Here you can find receiver certificate, URL and transport protocol you can use to pass as parameters to eu.sendregning.oxalis.Main

What confuses me - that the transport profile in SMP response is bdxr-transport-ebms3-as4-v1p0 - which I cannot find in the code of Oxalis at all. I found only this ticket: https://github.com/OxalisCommunity/Oxalis-AS4/issues/12 which references this profile.

And it relates to Peppol testbed, not CEF test bed you pass, right? The problem is that Peppol is more narrow then CEF in general - that is why the document instance is hardcoded to have customization part (the one after ##) and does not allow so dummy doc_id1...

But if you supply all required parameters, lookup will be omitted and you can use your original InstanceIdentifier "::doc_id1##::"

dladlk commented 2 years ago

Found the transport profile in vefa-peppol: https://github.com/OxalisCommunity/vefa-peppol/blob/373176b22d91fc975ce0a297387a70dbef69108e/peppol-common/src/main/java/network/oxalis/vefa/peppol/common/model/TransportProfile.java#L42

So I guess it should work :)

Please post a message if you succeed - something like

eu.sendregning.oxalis.Main ^
--cert certificate.pem ^
-d doc_id1 ^
-p urn:www.cenbii.eu:profile:bii04:ver1.0 ^
--protocol bdxr-transport-ebms3-as4-v1p0 ^
-r cefsupport1gw ^
-s your-sender-id ^
-u https://gateway-edelivery.westeurope.cloudapp.azure.com/?domain=dynamic ^
-e %ROOT_DIR%\evidence ^
-f %ROOT_DIR%\payload.xml
pierfrancesco72 commented 2 years ago
19:42:34.196 [main] INFO  n.o.c.security.CertificateModule - Certificate issuer: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=Connectivity Test Component CA, OU=Connecting Europe Facility, O=Connectivity Test, ST=Belgium, C=BE
19:42:34.210 [main] INFO  n.o.v.peppol.security.ModeDetector - Detected mode: TEST
19:42:34.215 [main] INFO  n.o.o.t.MessageSenderFactory - Prioritized list of transport profiles:
19:42:34.216 [main] INFO  n.o.o.t.MessageSenderFactory - => peppol-transport-as4-v2_0
19:42:34.217 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0r1
19:42:34.217 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver2p0
19:42:34.218 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0

Message failed : Unable to parseOld 'doc_id1' into PEPPOL Document Type Identifier

19:42:34.793 [main] ERROR eu.sendregning.oxalis.Main - Execution failed: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
java.util.concurrent.ExecutionException: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at eu.sendregning.oxalis.Main.main(Main.java:225)
Caused by: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
        at network.oxalis.outbound.transmission.DefaultTransmitter.perform(DefaultTransmitter.java:116)
        at network.oxalis.outbound.transmission.DefaultTransmitter.transmit(DefaultTransmitter.java:93)
        at eu.sendregning.oxalis.TransmissionTask.performTransmission(TransmissionTask.java:166)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:94)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:48)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Total time spent: 0s
Attempted to send 0 files
Failed transmissions: 1

I do not know if this stacktrace can be significant.

dladlk commented 2 years ago

Sorry, I meant the stacktrace when you put

            <Scope>
                <Type>DOCUMENTID</Type>
                <Identifier>connectivity-docid-qns</Identifier>
                <InstanceIdentifier>doc_id1</InstanceIdentifier>
            </Scope>

or

            <Scope>
                <Type>DOCUMENTID</Type>
                <InstanceIdentifier>connectivity-docid-qns::doc_id1</InstanceIdentifier>
            </Scope>

But I guess it happens somewhere in network.oxalis.outbound.transmission.TransmissionRequestBuilder#build() line 206, when Oxalis tries to make a lookup and converts PeppolStandardBusinessHeader to Vefa...

dladlk commented 2 years ago

I am interested in your case because it looks like Oxalis does not support CEF connectivity dynamic scenario. I cannot test it by myself without submitting for the report, that is why I am asking all this :) The ticket here https://github.com/OxalisCommunity/Oxalis-AS4/issues/12 shows that at least in 2019 people managed to do it. So could be that something was changed in the code since 2019 which prevents proper dynamic scenario - or some simple oxalis.conf configuration we are missing. But looking into the code I do not see yet how to omit .toVefa() invocation, which leads to parsing documentIdentifier by Peppol rules with regexp you mentioned...

pierfrancesco72 commented 2 years ago

You could think of a temporary wokraround, to allow the CEF connectivity test to pass, which would involve putting a constant in the payload.xml within the InstanceIdentifier TAG which would allow the structure (.*)::(.*)##(.*)::(.*) to be parsed.

for example:

<InstanceIdentifier>connectivity::cef##connectivity-docid-qns::doc_id1</InstanceIdentifier>

thus the presence of the property:

oxalis.as4.type=cef-connectivity

in outbound stage, the connectivity::cef## constant will be removed so that the match can be made.

What do you think? Is it feasible?

This in the short term, then this management will be better structured in future releases.

dladlk commented 2 years ago

I would do something like if it was my own project :)

But I do not have enough knowledge yet about all the code to be sure that there are no other options. Only now I have found this documentation:

https://github.com/OxalisCommunity/Oxalis-AS4/blob/master/docs/CEF-connectivity.md

It suggests exactly what I proposed you to do - pass all required lookup results into parameters when you call document sending, so the lookup can be done by the "wrong" DOCUMENT_ID which conforms with Peppol requirements:

<InstanceIdentifier>connectivity::cef##connectivity::submitMessage</InstanceIdentifier>

In my eyes it has some incorrect values, e.g.

lookup.locator.hostname="acc.edelivery.tech.ec.europa.eu/edelivery-sml/"

should be

lookup.locator.hostname=connectivitytest.acc.edelivery.tech.ec.europa.eu

And looking into the code where https://github.com/OxalisCommunity/Oxalis-AS4/blob/739a7e08e87c823bfa77cd60e3fbcd9da1e689ba/src/main/java/network/oxalis/as4/common/AS4Constants.java#L9 is referenced, only now I found, that something similar to what you suggest already has done here:

https://github.com/OxalisCommunity/Oxalis-AS4/blob/739a7e08e87c823bfa77cd60e3fbcd9da1e689ba/src/main/java/network/oxalis/as4/common/As4CommonModule.java#L121-L131

Anyway, for now I would suggest you to try omitting real lookup as it is mentioned in the documentation for CEF connectivity test (btw, there is also CEF conformance test) - and I update the documentation basing on your results.

More general solution for easier CEF connectivity test passing should be discussed and confirmed by the Oxalis team I guess - as it will require more time to review the solution, approve and release...

pierfrancesco72 commented 2 years ago

So I guess it should work :)

Please post a message if you succeed - something like

eu.sendregning.oxalis.Main ^
--cert certificate.pem ^
-d doc_id1 ^
-p urn:www.cenbii.eu:profile:bii04:ver1.0 ^
--protocol bdxr-transport-ebms3-as4-v1p0 ^
-r cefsupport1gw ^
-s your-sender-id ^
-u https://gateway-edelivery.westeurope.cloudapp.azure.com/?domain=dynamic ^
-e %ROOT_DIR%\evidence ^
-f %ROOT_DIR%\payload.xml

Hi @dladlk ,

I have tried this configuration and the error is still there:

start.sh:

java -classpath "./standalone/*:./as4/*" eu.sendregning.oxalis.Main -f ./payload.xml -d doc_id1 -p urn:www.cenbii.eu:profile:bii04:ver1.0 

payload.xml:

<BusinessScope> 
    <Scope>
               <Type>DOCUMENTID</Type>
               <Identifier/>
           <InstanceIdentifier>connectivity::cef##connectivity::submitMessage</InstanceIdentifier>
        </Scope>
...
java -classpath "./standalone/*;./as4/*" eu.sendregning.oxalis.Main -f ./payload.xml -d doc_id1 -p urn:www.cenbii.eu:profile:bii04:ver1.0
2022-05-10 14:36:10,080 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 14:36:10,084 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 14:36:10,086 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 14:36:10,086 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-10 14:36:10,097 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-10 14:36:10,098 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-10 14:36:10,098 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-10 14:36:11,105 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 14:36:11,106 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 14:36:11,106 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 14:36:11,106 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-10 14:36:11,108 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TOTAL: 20
2022-05-10 14:36:11,108 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_MAX_ROUTE: 2
2022-05-10 14:36:11,109 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_VALIDATE_AFTER_INACTIVITY: 1000
2022-05-10 14:36:11,109 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TIME_TO_LIVE: 30
2022-05-10 14:36:11,109 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_CONNECT: 0
2022-05-10 14:36:11,109 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_READ: 0
2022-05-10 14:36:11,109 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_SOCKET: 0
2022-05-10 14:36:11,110 INFO [network.oxalis.commons.settings.SettingsBuilder] Error => TRACKER: quiet
2022-05-10 14:36:11,111 INFO [network.oxalis.commons.settings.SettingsBuilder] AS2 => NOTIFICATION: not.in.use@difi.no
2022-05-10 14:36:11,111 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-10 14:36:11,111 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-10 14:36:11,112 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-10 14:36:11,112 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => HOSTNAME:
2022-05-10 14:36:11,112 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => MSGID_GENERATOR: default
2022-05-10 14:36:11,113 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PATH: dynceftest2party70gw.jks
2022-05-10 14:36:11,113 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PASSWORD: *******
2022-05-10 14:36:11,113 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_ALIAS: dynceftest2party70gw
2022-05-10 14:36:11,114 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_PASSWORD: *******
2022-05-10 14:36:11,114 INFO [network.oxalis.commons.settings.SettingsBuilder] Header => PARSER: sbdh
2022-05-10 14:36:11,115 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => PAYLOAD: default
2022-05-10 14:36:11,115 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => RECEIPT: default
2022-05-10 14:36:11,115 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => EXCEPTION: default
2022-05-10 14:36:11,116 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => HANDLER: default
2022-05-10 14:36:11,116 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => REPORTER: noop
2022-05-10 14:36:11,117 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => HTTP: <null>
2022-05-10 14:36:11,117 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => TRACER: noop
2022-05-10 14:36:11,117 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => DEFAULT: 50
2022-05-10 14:36:11,118 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => STATISTICS: 50
2022-05-10 14:36:11,118 INFO [network.oxalis.commons.settings.SettingsBuilder] Tag => GENERATOR: noop
2022-05-10 14:36:11,118 INFO [network.oxalis.commons.settings.SettingsBuilder] Timestamp => SERVICE: system
2022-05-10 14:36:11,119 INFO [network.oxalis.commons.settings.SettingsBuilder] Evidence => SERVICE: rem
2022-05-10 14:36:11,120 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => DETECTOR: noop
2022-05-10 14:36:11,120 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => WRAPPER: xml
2022-05-10 14:36:11,121 INFO [network.oxalis.commons.settings.SettingsBuilder] Statistics => SERVICE: noop
2022-05-10 14:36:11,121 INFO [network.oxalis.commons.settings.SettingsBuilder] Transmission => VERIFIER: default
2022-05-10 14:36:11,121 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => HOSTNAME:
2022-05-10 14:36:11,122 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => MSGID_GENERATOR: default
2022-05-10 14:36:11,122 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => TYPE: cef-connectivity
2022-05-10 14:36:11,123 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => CONFIG: logback.xml
2022-05-10 14:36:11,123 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => SERVICE: logback
2022-05-10 14:36:11,124 INFO [network.oxalis.commons.logging.LoggingHandler] Logging service: logback
Configuring Logback with configuration: C:\Users\XXXXXXX\.oxalis\logback.xml
14:36:11.196 [main] INFO  n.o.c.security.CertificateModule - Certificate subject: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=dynceftest2party70gw, OU=Connecting Europe Facility, O=Connectivity Test, ST=Brussels-Capital, C=BE
14:36:11.196 [main] INFO  n.o.c.security.CertificateModule - Certificate issuer: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=Connectivity Test Component CA, OU=Connecting Europe Facility, O=Connectivity Test, ST=Belgium, C=BE
14:36:11.207 [main] INFO  n.o.v.peppol.security.ModeDetector - Detected mode: TEST
14:36:11.212 [main] INFO  n.o.o.t.MessageSenderFactory - Prioritized list of transport profiles:
14:36:11.212 [main] INFO  n.o.o.t.MessageSenderFactory - => peppol-transport-as4-v2_0
14:36:11.213 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0r1
14:36:11.213 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver2p0
14:36:11.213 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0

Message failed : Unable to parseOld 'doc_id1' into PEPPOL Document Type Identifier

14:36:11.806 [main] ERROR eu.sendregning.oxalis.Main - Execution failed: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
java.util.concurrent.ExecutionException: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at eu.sendregning.oxalis.Main.main(Main.java:225)
Caused by: network.oxalis.api.lang.OxalisTransmissionException: No transmission is provided.
        at network.oxalis.outbound.transmission.DefaultTransmitter.perform(DefaultTransmitter.java:116)
        at network.oxalis.outbound.transmission.DefaultTransmitter.transmit(DefaultTransmitter.java:93)
        at eu.sendregning.oxalis.TransmissionTask.performTransmission(TransmissionTask.java:166)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:94)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:48)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Total time spent: 0s
Attempted to send 0 files
Failed transmissions: 1
dladlk commented 2 years ago

Yes, because you did not define endpoint URL, certificate, and all other parts mentioned in the documentation example for CEF connectivity test or in my example - that is why it still tries to make a lookup.

The trick is to make the lookup by yourselves - and get required data from the SMP link I posted and pass them as parameters to the program.

Try to define all of them in your script.sh file - looks like it is the only way to pass the test now...

pierfrancesco72 commented 2 years ago

There seem to be references to the old packages anyway

no.difi.certvalidator.Validator.getCertificate

java -classpath "./standalone/*;./as4/*" eu.sendregning.oxalis.Main --cert /Users/XXXXXX/.oxalis/dynceftest2party70gw.pem -d doc_id1 -p urn:www.cenbii.eu:profile:bii04:ver1.0 --protocol bdxr-transport-ebms3-as4-v1p0 -r cefsupport1gw -s dynceftest2party70gw -u https://gateway-edelivery.westeurope.cloudapp.azure.com/?domain=dynamic -e ./evidence -f ./payload.xml

2022-05-10 17:36:43,864 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 17:36:43,867 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 17:36:43,868 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 17:36:43,868 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-10 17:36:43,878 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-10 17:36:43,878 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-10 17:36:43,879 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-10 17:36:44,893 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 17:36:44,893 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 17:36:44,894 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-10 17:36:44,894 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-10 17:36:44,896 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TOTAL: 20
2022-05-10 17:36:44,896 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_MAX_ROUTE: 2
2022-05-10 17:36:44,896 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_VALIDATE_AFTER_INACTIVITY: 1000
2022-05-10 17:36:44,897 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TIME_TO_LIVE: 30
2022-05-10 17:36:44,897 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_CONNECT: 0
2022-05-10 17:36:44,898 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_READ: 0
2022-05-10 17:36:44,898 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_SOCKET: 0
2022-05-10 17:36:44,899 INFO [network.oxalis.commons.settings.SettingsBuilder] Error => TRACKER: quiet
2022-05-10 17:36:44,900 INFO [network.oxalis.commons.settings.SettingsBuilder] AS2 => NOTIFICATION: not.in.use@difi.no
2022-05-10 17:36:44,900 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-10 17:36:44,901 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-10 17:36:44,901 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-10 17:36:44,902 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => HOSTNAME:
2022-05-10 17:36:44,902 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => MSGID_GENERATOR: default
2022-05-10 17:36:44,903 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PATH: dynceftest2party70gw.jks
2022-05-10 17:36:44,903 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PASSWORD: *******
2022-05-10 17:36:44,903 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_ALIAS: dynceftest2party70gw
2022-05-10 17:36:44,904 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_PASSWORD: *******
2022-05-10 17:36:44,904 INFO [network.oxalis.commons.settings.SettingsBuilder] Header => PARSER: sbdh
2022-05-10 17:36:44,905 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => PAYLOAD: default
2022-05-10 17:36:44,905 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => RECEIPT: default
2022-05-10 17:36:44,906 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => EXCEPTION: default
2022-05-10 17:36:44,906 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => HANDLER: default
2022-05-10 17:36:44,907 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => REPORTER: noop
2022-05-10 17:36:44,907 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => HTTP: <null>
2022-05-10 17:36:44,907 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => TRACER: noop
2022-05-10 17:36:44,908 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => DEFAULT: 50
2022-05-10 17:36:44,908 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => STATISTICS: 50
2022-05-10 17:36:44,908 INFO [network.oxalis.commons.settings.SettingsBuilder] Tag => GENERATOR: noop
2022-05-10 17:36:44,909 INFO [network.oxalis.commons.settings.SettingsBuilder] Timestamp => SERVICE: system
2022-05-10 17:36:44,909 INFO [network.oxalis.commons.settings.SettingsBuilder] Evidence => SERVICE: rem
2022-05-10 17:36:44,910 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => DETECTOR: noop
2022-05-10 17:36:44,915 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => WRAPPER: xml
2022-05-10 17:36:44,916 INFO [network.oxalis.commons.settings.SettingsBuilder] Statistics => SERVICE: noop
2022-05-10 17:36:44,916 INFO [network.oxalis.commons.settings.SettingsBuilder] Transmission => VERIFIER: default
2022-05-10 17:36:44,916 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => HOSTNAME:
2022-05-10 17:36:44,917 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => MSGID_GENERATOR: default
2022-05-10 17:36:44,917 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => TYPE: cef-connectivity
2022-05-10 17:36:44,918 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => CONFIG: logback.xml
2022-05-10 17:36:44,918 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => SERVICE: logback
2022-05-10 17:36:44,919 INFO [network.oxalis.commons.logging.LoggingHandler] Logging service: logback
Configuring Logback with configuration: C:\Users\XXXXXXX\.oxalis\logback.xml
17:36:44.986 [main] INFO  n.o.c.security.CertificateModule - Certificate subject: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=dynceftest2party70gw, OU=Connecting Europe Facility, O=Connectivity Test, ST=Brussels-Capital, C=BE
17:36:44.987 [main] INFO  n.o.c.security.CertificateModule - Certificate issuer: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=Connectivity Test Component CA, OU=Connecting Europe Facility, O=Connectivity Test, ST=Belgium, C=BE
17:36:45.001 [main] INFO  n.o.v.peppol.security.ModeDetector - Detected mode: TEST
17:36:45.007 [main] INFO  n.o.o.t.MessageSenderFactory - Prioritized list of transport profiles:
17:36:45.008 [main] INFO  n.o.o.t.MessageSenderFactory - => peppol-transport-as4-v2_0
17:36:45.010 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0r1
17:36:45.011 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver2p0
17:36:45.011 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0
Exception in thread "main" no.difi.certvalidator.api.CertificateValidationException: signed fields invalid
        at no.difi.certvalidator.Validator.getCertificate(Validator.java:36)
        at eu.sendregning.oxalis.Main.main(Main.java:170)
Caused by: java.security.cert.CertificateParsingException: signed fields invalid
        at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1842)
        at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:195)
        at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:102)
        at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
        at no.difi.certvalidator.Validator.getCertificate(Validator.java:34)
        ... 1 more
dladlk commented 2 years ago

Looks like the file you passed as --cert is not valid :)

E.g. try to rename its extension to *.crt and open as windows - it should be openable and show certificate details.

You need to copy the contents of published certificate at SMP into file and pass it to Oxalis:

image

E.g. like this:

image

Result file should (certificate of the endpoint) should be passed as --cert

The package you mentioned from commons-certvalidator.jar which is out of Oxalis, external library from Difi.

BTW, may be the document type for Oxalis should be in the Peppol-compliant form - like -d connectivity::cef##connectivity::doc_id1

pierfrancesco72 commented 2 years ago

Sorry Dym you are right,

I have modified the certificate and it is now OK, I have also modified the -d connectivity::cef##connectivity::doc_id1 parameter for the document and I will paste the log below:

java.util.concurrent.ExecutionException: network.oxalis.api.lang.OxalisTransmissionException: Transport protocol 'bdxr-transport-ebms3-as4-v1p0' not supported.

java -classpath "./standalone/*;./as4/*" eu.sendregning.oxalis.Main --cert /Users/XXXXXX/.oxalis/dynceftest2party70gw.pem -d connectivity::cef##connectivity::doc_id1 -p urn:www.cenbii.eu:profile:bii04:ver1.0 --protocol bdxr-transport-ebms3-as4-v1p0 -r cefsupport1gw -s dynceftest2party70gw -u https://gateway-edelivery.westeurope.cloudapp.azure.com/?domain=dynamic -e ./evidence -f ./payload.xml
2022-05-11 09:57:36,127 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-11 09:57:36,131 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-11 09:57:36,132 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-11 09:57:36,132 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-11 09:57:36,141 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-11 09:57:36,144 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-11 09:57:36,145 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-11 09:57:37,237 INFO [network.oxalis.commons.filesystem.detector.UserHomeDetector] Using Oxalis folder relative to home folder: C:\Users\XXXXXXX\.oxalis
2022-05-11 09:57:37,237 INFO [network.oxalis.commons.filesystem.FileSystemModule] Home folder: C:\Users\XXXXXXX\.oxalis
2022-05-11 09:57:37,238 INFO [network.oxalis.commons.filesystem.FileSystemModule] Configuration folder: C:\Users\XXXXXXX\.oxalis
2022-05-11 09:57:37,238 INFO [network.oxalis.commons.config.ConfigModule] Configuration file: C:\Users\XXXXXXX\.oxalis\oxalis.conf
2022-05-11 09:57:37,241 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TOTAL: 20
2022-05-11 09:57:37,241 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_MAX_ROUTE: 2
2022-05-11 09:57:37,241 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_VALIDATE_AFTER_INACTIVITY: 1000
2022-05-11 09:57:37,241 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => POOL_TIME_TO_LIVE: 30
2022-05-11 09:57:37,242 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_CONNECT: 0
2022-05-11 09:57:37,242 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_READ: 0
2022-05-11 09:57:37,242 INFO [network.oxalis.commons.settings.SettingsBuilder] HTTP => TIMEOUT_SOCKET: 0
2022-05-11 09:57:37,242 INFO [network.oxalis.commons.settings.SettingsBuilder] Error => TRACKER: quiet
2022-05-11 09:57:37,242 INFO [network.oxalis.commons.settings.SettingsBuilder] AS2 => NOTIFICATION: not.in.use@difi.no
2022-05-11 09:57:37,243 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => CONF:
2022-05-11 09:57:37,243 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => INBOUND: /Users/XXXXXXX/.oxalis/in
2022-05-11 09:57:37,243 INFO [network.oxalis.commons.settings.SettingsBuilder] File system => PLUGIN: <null>
2022-05-11 09:57:37,243 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => HOSTNAME:
2022-05-11 09:57:37,243 INFO [network.oxalis.commons.settings.SettingsBuilder] Identifiers => MSGID_GENERATOR: default
2022-05-11 09:57:37,243 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PATH: dynceftest2party70gw.jks
2022-05-11 09:57:37,244 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => PASSWORD: *******
2022-05-11 09:57:37,244 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_ALIAS: dynceftest2party70gw
2022-05-11 09:57:37,244 INFO [network.oxalis.commons.settings.SettingsBuilder] Key store => KEY_PASSWORD: *******
2022-05-11 09:57:37,244 INFO [network.oxalis.commons.settings.SettingsBuilder] Header => PARSER: sbdh
2022-05-11 09:57:37,244 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => PAYLOAD: default
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => RECEIPT: default
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => EXCEPTION: default
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Persister => HANDLER: default
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => REPORTER: noop
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => HTTP: <null>
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Tracing => TRACER: noop
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => DEFAULT: 50
2022-05-11 09:57:37,245 INFO [network.oxalis.commons.settings.SettingsBuilder] Executor => STATISTICS: 50
2022-05-11 09:57:37,246 INFO [network.oxalis.commons.settings.SettingsBuilder] Tag => GENERATOR: noop
2022-05-11 09:57:37,246 INFO [network.oxalis.commons.settings.SettingsBuilder] Timestamp => SERVICE: system
2022-05-11 09:57:37,246 INFO [network.oxalis.commons.settings.SettingsBuilder] Evidence => SERVICE: rem
2022-05-11 09:57:37,246 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => DETECTOR: noop
2022-05-11 09:57:37,246 INFO [network.oxalis.commons.settings.SettingsBuilder] Transformer => WRAPPER: xml
2022-05-11 09:57:37,246 INFO [network.oxalis.commons.settings.SettingsBuilder] Statistics => SERVICE: noop
2022-05-11 09:57:37,247 INFO [network.oxalis.commons.settings.SettingsBuilder] Transmission => VERIFIER: default
2022-05-11 09:57:37,247 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => HOSTNAME:
2022-05-11 09:57:37,247 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => MSGID_GENERATOR: default
2022-05-11 09:57:37,247 INFO [network.oxalis.commons.settings.SettingsBuilder] AS4 => TYPE: cef-connectivity
2022-05-11 09:57:37,247 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => CONFIG: logback.xml
2022-05-11 09:57:37,247 INFO [network.oxalis.commons.settings.SettingsBuilder] Logging => SERVICE: logback
2022-05-11 09:57:37,248 INFO [network.oxalis.commons.logging.LoggingHandler] Logging service: logback
Configuring Logback with configuration: C:\Users\XXXXXXX\.oxalis\logback.xml
09:57:37.340 [main] INFO  n.o.c.security.CertificateModule - Certificate subject: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=dynceftest2party70gw, OU=Connecting Europe Facility, O=Connectivity Test, ST=Brussels-Capital, C=BE
09:57:37.341 [main] INFO  n.o.c.security.CertificateModule - Certificate issuer: EMAILADDRESS=CEF-EDELIVERY-SUPPORT@ec.europa.eu, CN=Connectivity Test Component CA, OU=Connecting Europe Facility, O=Connectivity Test, ST=Belgium, C=BE
09:57:37.357 [main] INFO  n.o.v.peppol.security.ModeDetector - Detected mode: TEST
09:57:37.363 [main] INFO  n.o.o.t.MessageSenderFactory - Prioritized list of transport profiles:
09:57:37.364 [main] INFO  n.o.o.t.MessageSenderFactory - => peppol-transport-as4-v2_0
09:57:37.364 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0r1
09:57:37.370 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver2p0
09:57:37.370 [main] INFO  n.o.o.t.MessageSenderFactory - => busdox-transport-as2-ver1p0

09:57:38.004 [pool-1-thread-1] WARN  n.o.o.t.TransmissionRequestBuilder - Endpoint was set by caller not retrieved from SMP, make sure this is intended behaviour.
09:57:38.009 [main] ERROR eu.sendregning.oxalis.Main - Execution failed: network.oxalis.api.lang.OxalisTransmissionException: Transport protocol 'bdxr-transport-ebms3-as4-v1p0' not supported.
java.util.concurrent.ExecutionException: network.oxalis.api.lang.OxalisTransmissionException: Transport protocol 'bdxr-transport-ebms3-as4-v1p0' not supported.
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at eu.sendregning.oxalis.Main.main(Main.java:225)
Caused by: network.oxalis.api.lang.OxalisTransmissionException: Transport protocol 'bdxr-transport-ebms3-as4-v1p0' not supported.
        at network.oxalis.outbound.transmission.MessageSenderFactory.getSender(MessageSenderFactory.java:108)
        at network.oxalis.outbound.transmission.MessageSenderFactory.getMessageSender(MessageSenderFactory.java:121)
        at network.oxalis.outbound.transmission.DefaultTransmitter.perform(DefaultTransmitter.java:148)
        at network.oxalis.outbound.transmission.DefaultTransmitter.transmit(DefaultTransmitter.java:93)
        at eu.sendregning.oxalis.TransmissionTask.performTransmission(TransmissionTask.java:166)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:94)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:48)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Total time spent: 0s
Attempted to send 0 files
Failed transmissions: 1
dladlk commented 2 years ago

Yes, that is what I worried about... But looks like we are close :)

In the doc file about CEF connectivity https://github.com/OxalisCommunity/Oxalis-AS4/blob/master/docs/CEF-connectivity.md

it is mentioned another protocol for this:

--protocol peppol-transport-as4-v2_0

Also as oxalis.conf:

oxalis.as4.type=cef-connectivity

Try to "play" with these options - e.g. use another protocol...

If it does not help - possible option is to expand your oxalis.conf with definition for the profile:

defaults.transport.bdxr-transport-ebms3-as4-v1p0 = {
    profile: bdxr-transport-ebms3-as4-v1p0
    sender: oxalis-as4
    weight: 5001
}

At least for now it fails because cannot find sender value - but I am not sure which configs are expected here...

pierfrancesco72 commented 2 years ago

OK, with --protocol peppol-transport-as4-v2_0 parameter, I am receiving a response from the server to which we are sending the message. The response is as follows:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Header>
        <eb:Messaging xmlns:eb="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" env:mustUnderstand="true">
            <eb:SignalMessage>
                <eb:MessageInfo>
                    <eb:Timestamp>2022-05-11T10:56:02.943Z</eb:Timestamp>
                    <eb:MessageId>f316f193-d118-11ec-8606-000d3a2269b3@domibus.eu</eb:MessageId>
                    <eb:RefToMessageId>8b1ab66e-fdb6-41d9-9005-4ceb86847f97@host.docker.internal</eb:RefToMessageId>
                </eb:MessageInfo>
                <eb:Error category="PROCESSING" errorCode="EBMS:0010" origin="ebMS" refToMessageInError="8b1ab66e-fdb6-41d9-9005-4ceb86847f97@host.docker.internal" severity="failure" shortDescription="ProcessingModeMismatch">
                    <eb:Description xml:lang="">The ebMS header or another header (e.g. reliability, security) expected by the MSH is not compatible with the expected content, based on the associated P-Mode.</eb:Description>
                    <eb:ErrorDetail>No matching dynamic discovery processes found for message.</eb:ErrorDetail>
                </eb:Error>
            </eb:SignalMessage>
        </eb:Messaging>
    </env:Header>
    <env:Body>
        <env:Fault>
            <env:Code>
                <env:Value>env:Receiver</env:Value>
            </env:Code>
            <env:Reason>
                <env:Text xml:lang="en">An error occurred while processing your request. Please check the message header for more details.</env:Text>
            </env:Reason>
        </env:Fault>
    </env:Body>
</env:Envelope>

this is the log file: oxalis-standalone.log

while with the configuration oxalis.conf:

oxalis.keystore {
        path=dynceftest2party70gw.jks
        password = test123
        key.alias = dynceftest2party70gw
        key.password = test123
}

oxalis.as4.type=cef-connectivity

defaults.transport.bdxr-transport-ebms3-as4-v1p0 = {
    profile: bdxr-transport-ebms3-as4-v1p0
    sender: oxalis-as4
    weight: 5001
}
lookup.locator.hostname="connectivitytest.acc.edelivery.tech.ec.europa.eu"
lookup.locator.class = network.oxalis.vefa.peppol.lookup.locator.BdxlLocator
security.validator.class = network.oxalis.vefa.peppol.security.util.EmptyCertificateValidator
oxalis.path.inbound = /Users/BK001496/.oxalis/in
oxalis.logging.config=logback.xml

and with parameter --protocol bdxr-transport-ebms3-as4-v1p0 not work:

13:10:50.095 [main] ERROR eu.sendregning.oxalis.Main - Execution failed: network.oxalis.api.lang.OxalisTransmissionException: Transport protocol 'bdxr-transport-ebms3-as4-v1p0' not supported.

and with parameter --protocol peppol-transport-as4-v2_0 the answer is the same as the first attempt:

<eb:Error category="PROCESSING" errorCode="EBMS:0010" origin="ebMS" refToMessageInError="30e81405-7c44-4e88-a14e-9c76be15739d@host.docker.internal" severity="failure" shortDescription="ProcessingModeMismatch">
  <eb:Description xml:lang="">The ebMS header or another header (e.g. reliability, security) expected by the MSH is not compatible with the expected content, based on the associated P-Mode.</eb:Description>
  <eb:ErrorDetail>No matching dynamic discovery processes found for message.</eb:ErrorDetail>
</eb:Error>
dladlk commented 2 years ago

We are close :)

What is the payload you sent? I guess they have Domibus on their side, the message about "No matching dynamic discovery processes found for message" means that SBDH is not configured as expected...

Try to activate again http logging - so we see actual SBDH sent there...

dladlk commented 2 years ago

Hi @pierfrancesco72! I hope you did not give up and successfully passed the test, did you? ;)

pierfrancesco72 commented 2 years ago

No, I have temporarily put the test on hold.

I did not download the sources, in order to highlight the logs of the http request, sent to the receiving participant.