phax / as2-lib

A generic Java AS2 library, servlet and server
107 stars 43 forks source link

unable to send file to AS2 server from AS2-LIB #126

Closed ankitagrawa closed 2 years ago

ankitagrawa commented 2 years ago

1) What does "MIC IS NOT MATCHED" mean?

INFO com.helger.as2lib.processor.sender.AS2SenderModule - MIC IS NOT MATCHED, original mic: '8EU1L2J0xEcy1F/2st3s0rqWqFHlMOqtU91xAnWzn8U=, sha256' return mic: 'null' [17092021162016+0000-1627@xyz] [ source:xyr]

2) What does "Invalid disposition type format: null" mean? What is disposition type? INFO com.helger.as2lib.exception.OpenAS2Exception - OpenAS2 OpenAS2Exception terminated: Message was sent but an error occured while receiving the MDN
com.helger.as2lib.exception.OpenAS2Exception: Invalid disposition type format: null
at com.helger.as2lib.disposition.DispositionType.createFromString(DispositionType.java:175)
at com.helger.as2lib.processor.sender.AS2SenderModule.receiveSyncMDN(AS2SenderModule.java:707)
at com.helger.as2lib.processor.sender.AS2SenderModule._sendViaHTTP(AS2SenderModule.java:867)
at com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:932)

Is there a workaround for this?

phax commented 2 years ago

The source problem is the message Invalid disposition type format: null which is caused the problem, that the HTTP header Disposition is not part of the synchronous response. So please contact the receiver, and check what they are expecting (evtl. an async MDN)????

The MIC is basically a hash value that is calculated using a cryptographic algorihtm - sender and receiver must calculate the same value to ensure the message was not changed. In your case the error message is just a follow-up error, because the HTTP header is missing

phax commented 2 years ago

(sorry, clicked by accident)

phax commented 2 years ago

Does the edited answer from above answer your question?

ankitagrawa commented 2 years ago

I guess yes. Need to check few things from the receiver.

phax commented 2 years ago

@ankitagrawa did you check? Can this issue be closed?