OxalisCommunity / Oxalis-AS4

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

Oxalis-AS4 Outbound Java Class integration #128

Closed simo385 closed 4 years ago

simo385 commented 4 years ago

Hi Everybody,

how we can integrate the Oxalis AS4 outbound in Java Class?

Thanks in advance. Simone

abaigelcom commented 4 years ago

Hi, I believe you shouldn't be doing any code change as long as you have as4 libs setup according to documentation.

Sample code works for AS2/AS4.. OxalisOutboundComponent oxalisOutboundComponent = new OxalisOutboundComponent(); TransmissionRequestBuilder requestBuilder = oxalisOutboundComponent.getTransmissionRequestBuilder(); requestBuilder.receiver(ParticipantIdentifier.of(receiver)); requestBuilder.sender(ParticipantIdentifier.of(sender)); requestBuilder.documentType(DocumentTypeIdentifier.of(docType)); requestBuilder.processType(ProcessIdentifier.of(procType)); requestBuilder.payLoad(stream);

// Fetches a transmitter ... Transmitter transmitter = oxalisOutboundComponent.getTransmitter(); TransmissionResponse transmissionResponse = transmitter.transmit(requestBuilder.build());

simo385 commented 4 years ago

Hi @abaigelcom,

many thanks for your response. I'm able to send messages using Oxalis Outbound module.

Unfortunately, the code sends the messages using the AS2 protocol. Is there a way to set the protocol to AS4?

thanks for your support. Simone

abaigelcom commented 4 years ago

Hi, I believe your setup for as4 incomplete. couple of things I can suggest to verify SMP where your AP is registered pointing to AS4 and once you start sending/receiving docs, oxalis logs should display transport profiles, it should contain as4 (peppol-transport-as4-v2_0) hope this helps.

Oxalis logs: Detected mode: TEST Prioritized list of transport profiles: => peppol-transport-as4-v2_0 => busdox-transport-as2-ver1p0r1 => busdox-transport-as2-ver2p0 => busdox-transport-as2-ver1p0

simo385 commented 4 years ago

Hi @abaigelcom,

I had to include all Oxalis AS4 library into my maven project.

Now, it works fine.

Thanks for your support. Simone

francescodiperna commented 2 years ago

Hi @abaigelcom , I have a similar problem, can I ask which version of oxalis did you use? I got some error: (https://github.com/OxalisCommunity/oxalis/discussions/566)

Bye