Skip to Content

PI 7.3: SFTP Adapter module - AttachmentSplitterBean - File name error

Dear experts,

I have a custom adapter module that connects to a SFTP server and polls JPEG files and attaches those

to the payload (

Eng Swee Yeoh then suggested to useAttachmentSplitterBean - Split attachments into child messages

to retrieve the attached JPEG files from the payload and write them to the FTP receiver.

I do have multiple attachments on the message but the "AttachmentSplitterBean" gives me the following error:

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header

In my adapter module I am writing the FileName to the Message header

MessagePropertyKey msz = new MessagePropertyKey(  
                                        "FileName", "http://sap.com/xi/XI/System/File");  
                                msg.setMessageProperty(msz, Filename);

but still I am getting this error.

I think it is connected to the Module configuration. Currently it looks like this:

In ASMA I have ticked "File Name" but the actual Sender Channel is NFS because Adapter Module "SFTPSender" does the actual SFTP connection.

In ASMA of FTP Receiver Channel "File Name" is also ticked.

Thank you for any help with this.

Best regards,

Peter

pastedImage_8.png (11.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 30, 2015 at 01:54 AM

    Hi Peter

    The error is at the receiver adapter processing and not at the custom module. This is because by default the custom module does not write the filename into the child messages' dynamic configuration.

    Try adding storeFileName = Y to the parameters of the splitter. You can refer to the Module Parameter Reference section for more details.

    Rgds

    Eng Swee

    Add comment
    10|10000 characters needed characters exceeded