cancel
Showing results for 
Search instead for 
Did you mean: 

Process 0kb empty file and deliver to target directory

Former Member
0 Kudos

Hello Experts,

We had a requirements to process an empty file handling and send it to the receiver/target directory. We had configured to "Process Empty File" Handling and “Write Empty File. The 0KB file polling successfully and archived to the directory with empty payload, but the message output was never created/sent to the target directory. In smxi_moni error message displayed:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--

Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="MAPPING">CANNOT_READ_PAYLOAD</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Unable to read payload from the message object</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Since this is an empty file, there are no mappings involved. Is there a way to that we could check for 0kb file? If it is empty file, we want to pass/place the empty file to the target directory and if it is not empty, we want the message to process in the standard way.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I think you can create a module which will check if the file is empty it has to generate anempty XML structure as expected by XI else pass the file as it is. I dont know if anyone has a better solution than this.

Regards,

Sudheer.

Former Member
0 Kudos

Thanks guys!

Does anyone out there that have written a java module to check for empty file and generate empty xml structure?

Thanks

dn

Former Member
0 Kudos

Hi,

I think you can check this link. Not complete solution though.

Regards,

Sudheer.

Former Member
0 Kudos

Hi David,

"Since this is an empty file, there are no mappings involved. "

do you mean you didnt do the mapping at all cos it is empty file ?

though it is empty file still you need to do the mapping as usually,but when you check the option process the empty file both in sender and receiver adapter ,then it will process even an empty file comes.if you dont check these options and you get an empty file during the process then the mapping will fail.

in real time you don't know which one is empty file right,but her you know cos you are placing empty file.

I think you got to do all the steps you do in eneral for a scenario and top on that you have to check process empty file in both sender and receiver adapters,but you may not see the payload in SXMB_MONI.

but search in SDn you get lot stuff.