cancel
Showing results for 
Search instead for 
Did you mean: 

Processing Binary files with Mapping NOT (always) possible ??

Former Member
0 Kudos

Hello All,

I need your help solving this strange behaviour of XI.

I am developing a (image)file to (image)file interface with a simple mapping but XI is giving unpredictable results.

Processing the same inputfile e.g. 10 times after each other: results in 6 times OK and 4 times errormessage in SXMB_MONI. After restarting the 4 errormessages sometimes 1 or 2 msg are suddenly processed fine ??!!

The given error is always: "Parsing an empty source. Root element expected!". But why are the

other 6 messages are processed OK ? Why not all the 10 messages returns with error ??

My scenario is :

1) File FTP Sender: pick up image-files (.gif) from FTP-server (30.000 per day)

2) XI mapping: A) via Java program convert file into Base64, otherwise no mapping is possible at all

B) via UDF fill few outputfields only using the inputfilename. There is no need to go "inside" the

inputfile; just get the filename using Dynamic Configuration.

3) File FTP Sender: After message processing store the inputfile on the SAP filer in a particular

directory derived from the filename. Creating the directory and moving the file is done by an OS script in the sender file adapter.

4) XI Receiver HTTP: after succesfull processing the payload is filled with the correct fields.

The cause of error is (sometimes) using the DynamicConfiguration in the UDF, but a few fields must be filled using the inputfilename.

Has someone experienced this before or an other solution/idea to make this scenario stable and robust ??

Regards,

Jack

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

better not to do anything in IR , go to ID and confiigure the channels.

It will take the Gif and attach to the HTTP.

Use payloadswapbean & messagetransformbean in Modules in the receiver communication channel.

Former Member
0 Kudos

Jack,

I may not have understood your scenario in full, however, an alternate solution could be to write a custom XI module and attach it to the file adapter. You could access the file name inside the module as well(See SAP Note 819761).

You should get a lot of articles/blogs in SDN on custom XI module creation and deployment to the server via NWDS. Give a thought on these lines as well.

Are you using any third party APIs to base64 encode your files, If so i beleive you will have to include them in the librarries in NWDS and deploy them to the XI server.

Thanks

Saravana

Former Member
0 Kudos

Hi Saravana,

Thanks for your input but creating a module is not what we want because that means a lot of custom code. We want to fix it with the "standard" XI-functions like Java mapping and UDF.

This scenario is almost working :

We processed the same inputfile every minute for about 8 hours (480 messages) the result was 230 OK-messages and 250 error messages, all with the same error "Parsing an empty source. Root element expected"

But we cannot find out what the cause of the error message is.

Regards

Jack