cancel
Showing results for 
Search instead for 
Did you mean: 

Binary file with File adapter

Former Member
0 Kudos

Hi gurus,

I am getting binary file as base64binary (not a text/xml file) in a request XML tag. I need to write this file to a file directory with the file adapter after retrieving it from the request message by a message/java mapping and use another field in XML as the file name.

I followed the blog `how to send binary data through PI` but in that case, the request message is also the same. Mine requires a mapping to be executed and in this case I cannot use dummy names for message types/interfaces as Enterprise Repository development is required.

How can I achieve this?

Thanks

Gokhan

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Your requirement is not very clear

If you would like to take the name of the file at receiver same as some field in source payload, then you may use Dynamic Configuration. The mapping could be done following this.

/people/farooq.farooqui3/blog/2008/05/22/decode-base64-incoming-encoded-information-in-sap-xipi-using-java-mapping

Regards,

Prateek

Former Member
0 Kudos

Just solved the problem actually

As I was trying to write a binary file directly with the receiver file adapter, I wasn't sure how to define a data type / message type for it. I developed a java mapping that decodes the base64 to binary data and writes it to the output stream, and used a dummy message type / data type for the service interface as the target in Operation Mapping

And it worked!

Regards,

Gökhan