cancel
Showing results for 
Search instead for 
Did you mean: 

Binary File Transfer with Java-Mapping via Sender File-Adapter

tobias_ster2
Discoverer
0 Kudos

Hey guys,

my szenario looks like that. Ich need to read an zip-File via File-Adapter without XML-parsing into AAE. To unzip the file/message, i will use an Java-Mapping.

So, i have many ideas for the Java-Mapping and tested it locally. Now the problem is, i'm not able to read the zip-file as an binary stream routing it to the Java-Mapping.

I have read this guide, which is nearly the same.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56...

But my tries failed on PO 7.31.

Any ideas? Thanks a lot!

Tobi

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184720
Active Contributor
0 Kudos

Not sure of the exact problem but why don't you use PayloadZipBean module to unzip the files and then execute your java mapping?

http://help.sap.com/saphelp_nw04/helpdata/en/45/da9358a1772e97e10000000a155369/content.htm

anupam_ghosh2
Active Contributor
0 Kudos

Hi Tobi,

                In local system your code is working?

Did you stop FCC?

what is the error meesage shown to you?

Regards

Anupam

tobias_ster2
Discoverer
0 Kudos

Hi Anupam,

in local testmode, unzipping is functional and working fine. Thats not my problem.

My problem is the previous step. How can i get the file as an binary stream without parsing the content in XML, or like the example above, with a simple parsing in a base65Binary Element (as i wrote, the example doesnt work in my system)???

There must be a way to read binary data into AAE, independently if its an jpg, zip or etc..

I know you can transfer data, so thats PI is in a role of an ftp-server. But just without interfaces. And i need interfaces to determinate the Operation Mapping...

Regards

Tobi

Former Member
0 Kudos

Hi Tobi,

In the sender file adapter do not choose File Content Conversion option and choose file transfer option as binary. Now when the file is picked up, the channel will not convert it into XML but read it as it is in binary format. In your Java Mapping when you now access your payload it will be in zipped file format (binary stream) which you can then unzip using the code you tested on your local machine.

Hope this helps!!

Regards,

Anurag Mahendru

anupam_ghosh2
Active Contributor
0 Kudos

Hi Tobi,

                Please check my response to this thread https://scn.sap.com/thread/1983926

The discussion is on a binary file. You can read and interpret contents of a binary file but you should have an idea on its structure. In the thread you can see how I interpreted each bit of binary file.

Regards

Anupam