oxalis icon indicating copy to clipboard operation
oxalis copied to clipboard

Camel endpoint wrapper: Split As2InboundHandler::receive in multiple methods and make the class public

Open open-gdsn opened this issue 4 years ago • 3 comments

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

open-gdsn avatar Nov 22 '19 08:11 open-gdsn

This issue is closed due to age and lack of activity.

SuperJuell avatar Feb 01 '21 10:02 SuperJuell

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...

open-gdsn avatar Feb 04 '21 10:02 open-gdsn

Hi, I'm sorry for closing this issue. Contributions are very much welcome, and we would absolutely like a patch for this.

SuperJuell avatar Feb 05 '21 12:02 SuperJuell

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.

aaron-kumar avatar Oct 21 '22 16:10 aaron-kumar