cancel
Showing results for 
Search instead for 
Did you mean: 

File to File Scenario - Attachment not received in the target directory

Former Member
0 Kudos

Hello Experts,

I have a File to File scenario, the requirement is  'Source System' places two files in source directory where PI should pick 1 file as a main payload and the other as an attachment and place both the files(main payload/XML file & attachment/PDF file) should be placed in the target directory.

As I see we dont have a standard/direct solution in 'File Adapter' to pick and place the attached file, Kindly suggest what can to be done to receive the attachment by sender File adapter and place it in the target using File adapter.

Do we have any Adapter Modules or any other solutions where we can pick the files as attachment and also place the attached files in target directory.

Please note, we have mapping involved for the main payload whereas the attachment must be sent as is.

Thank you.

Kind Regards,

Pooja

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

Hi Pooja,

Could you see the attachments in the monitoring?, why do you really need have the additional files like attachments in a file to file scenario?, in a file to soap for example i think can be necessary if the WS endpoint demands the two files at the same tame, but in a file to file i don't figure out the reason, i've said this because with Advanced selection for Source File option is easier to get the files although they will  be picked up one after another.

Hope this helps.

Regards.

Former Member
0 Kudos

Hello Iñaki,

Yes i could see the attachments in the monitoring using a Receiver File channel.

In our case, the files picked by PI are an XML(main payload) and a PDF file(attachment). Although the name of the attachment in the "attachments" tab is shown as ".xml" but the content of this file is that of a PDF file.

I've gone through the document referred by you and tried using a SOAP Receiver channel instead, but i get the following exception when i run the scenario.

Axis: error in invocation: java.io.IOException: failed to rename ./temp/test2753703929965672136.xml7854602955514629740.tmp to /Reuse/interfaces/pitest/output/test2753703929965672136.xml

Adapter type : SOAP

Transport Protocol : File(Axis)

Message Protocol  Axis

I've rechecked and confirmed that all the permissions are set to the directory and the user.

Kindly provide your inputs.

Regards,

Pooja

iaki_vila
Active Contributor
0 Kudos

Hi Pooja,

First of all, before to figure out the solution for your exception, have you checked your AXIS libraries are right installed?, try with this url http://host:port/XIAxisAdapter/MessageServlet


Regards.

Former Member
0 Kudos

Hi Iñaki,

Yes, i've checked and the AXIS libraries are properly installed.

Other interfaces which are using Axis protocol are working fine.

Regards,

Pooja

RaghuVamseedhar
Active Contributor
0 Kudos

Pooja,

I think Receiver File channel cannot handle attachments. i.e. only one file can be written to target. If PayloadSwapBean is used, main payload will be lost.

Try this solution: - Split the message into two messages (in Receiver Determination add additional receiver system, maybe temp business service).

First receiver file channel will write main payload.

In second receiver file channel use PayloadSwapBean, it will write attachment.

Former Member
0 Kudos

Hello Raghu,

Thank you for the solution.

As there is no direct approch to handle attachments using File Adapter, i was trying to use SOAP adapter in the receiver channel.

I will keep you posted for any updates.

Regards,

Pooja

iaki_vila
Active Contributor
0 Kudos

Hi Pooja,

Have you tried the Additional Files utility in the Sender file adapter?

Check this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/404ee507-3fbc-2e10-00bc-be90ab28d...

Regards.

Former Member
0 Kudos


Hi Iñaki,

Thanks for your reply.

Yes, PI is picking the files using "Additional File(s)" option in the sender channel.

With this the all the files are getting picked but the picked attachments are not being shown in the traget directory.

Regards,

Pooja