There might be a silly mistake am doing it. but am trying to load a jpeg photo to ldap via java and facing small issue.
Currently in mule-3 we use invoke java and store it in ldap and when we download from ldap we get actual image. this is how its getting stored
and here is high level java code
In Mule-4 there is no event context and java module itself got changed. so am using similar java program and trying to load to ldap. its getting loaded but when i download its not an image.
this is how its storing in ldap, some extra content in the beginning it seems. below is my java code
%dw 2.0
import java!imaging::UploadPhotoToAD
import * from dw::core::Binaries
import * from dw::core::Numbers
output application/java
---
UploadPhotoToAD::updateEntry(ldap.image as Binary, ldap.userDN, ldap.usersDN, ldap.url, ldap.authDN, ldap.authPassword)
Any idea what am missing here or anything needs to be changed