oxalis
oxalis copied to clipboard
Camel endpoint wrapper: Split As2InboundHandler::receive in multiple methods and make the class public
I'm currently working on creating a camel endpoint for peppol based on Oxalis. The outgoing part is working nice by re-using the OxalisOutboundComponent.
For the incoming traffic, the processing of the message, having it available is not really possible without code changes in Oxalis (other than trying to abus a persistencehandler, which is sort of is, but not really)
The As2InboundHandler effectively contains all logic, but
- it has package visibility
- has all logic in one
receive
method without the ability to influence the flow (like an exception from a persistence handler would) and without acces to the content
Would it be an option to split all the logic in receive
into multiple methods like processMessage
, createPositiveMDN
and persist
where the latter is only needed for Oxalis server or war but not for other 'wrappers' like camel.
I experimented with this and succeded. For this I needed to add a As2InboundData
which contains the content (currently as a byte[] but could be a reference to a (temporary) file to), As2InboundMetadata and the MDN. The Oxalis As2InboundHandler testcase still runs... But since it is limited (no testing of exceptions) it is hard to tell if all cases still apply. If a change like this can be excepted, I'll try creating more testcases and create a pull request or post the code here.
Cheers
p.s. I'm in the process of requesting making the the camel endpoint code public too if it is finished
This issue is closed due to age and lack of activity.
uhhhh..... This is weird.. Lack of activity by whom? By me? There was no feedback ever about this. Want a patch for this? Then please reopen and I will create one... For sure...
Hi, I'm sorry for closing this issue. Contributions are very much welcome, and we would absolutely like a patch for this.
Closing this issue since as per OpenPeppol, AS2 is Optional protocol starting 2020-02-01 and AS2 protocol will be removed soon. We in Oxalis community also starting process to deprecate and removing AS2 protocol support completely from Oxalis.