phax / phase4

phase4 - AS4 client and server for integration into existing systems. Specific support for Peppol and CEF eDelivery built-in.
Apache License 2.0
147 stars 48 forks source link

Dynamically set responder address for incoming messages #233

Closed koes-soptim closed 2 weeks ago

koes-soptim commented 5 months ago

In our software, we use IPmodeResolver.getPModeOfID to construct the PMode for any incoming AS4 message. Anyway, the parameter sAddress, which represents our "own" AS4 endpoint address(es) is always null. I found out that the address can only be configured globally ("phase4.endpoint.address") and is queried in SOAPHeaderElementProcessorExtractEbms3Messaging.

There is one issue: For the BDEW profile, the software manufacturers have to use dynamic addresses (like https://1111111111111.company.cloud, https://2222222222222.company.cloud) with SNI, so the AS4 endpoint can change with any incoming message.

Could you provide any way (e.g. a callback?) to handle this dynamically?

Kind regards, Robin

phax commented 2 weeks ago

Thanks, I will integrate this in v3

phax commented 2 weeks ago

Will be part of the first 3.0.0 release

Edit: I should have explained how-to ;-)

Question: do you need to configure it for the sender as well?