Closed myedigateway closed 3 years ago
The error you are seeing is if the HTTP POST contains no post data.
This is the code that extracts the file name from the received AS2 message:
try {
// Extract and Store the received filename of the payload
String filename = msg.extractPayloadFilename();
// check for a fallback if not able to extract from content-disposition
if (filename == null || filename.length() == 0) {
filename = Properties.getProperty(Properties.AS2_RX_MESSAGE_FILENAME_FALLBACK, null);
if (filename == null) {
filename = msg.getMessageID();
} else {
CompositeParameters parser = new CompositeParameters(false).add("date", new DateParameters()).add("msg", new MessageParameters(msg)).add("rand", new RandomParameters());
filename = ParameterParser.parse(filename, parser);
}
}
msg.setPayloadFilename(filename);
} catch (ParseException e1) {
LOG.error("Failed to extract the file name from received content-disposition", e1);
}
As you can see, if it does not manage to create a file name for the inbound file it will throw a different message to what you are seeing.
2021-10-07 19:24:19.883 FINE AS2ReceiverHandler: Error receiving message for inbound AS2 request. There is no data. [null] org.openas2.OpenAS2Exception: Missing data in AS2 request. at org.openas2.processor.receiver.AS2ReceiverHandler.handle(AS2ReceiverHandler.java:123) at org.openas2.processor.receiver.NetModule$ConnectionHandler.run(NetModule.java:176) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Recreated by doing a quick test on the method :