soap pdf attachment to base 64 format is coming blank.

 Basically In Apigee we are calling a SOAP API. and we receive XML with attachment(MTOM). and convert xop to Json and pdf to base 64 encoded format. I have used repo https://github.com/DinoChiesa/Apigee-Java-XOP-Handler to extract soap attachment and converted pdf to base64 in the same jar file. but when I tested the base 64 encoded string in online tool, it is coming as blank..

I doubt when the Apigee receives the message of pdf in MTOM format. It converts it into ASCII string(simillar to this issue https://www.linkedin.com/pulse/converting-pdf-binary-base64-nodejs-trick-end-andrew-ribeiro). hence I feel the conversion to base 64 of the attached email is corrupted.

0 1 363
1 REPLY 1

Can you show some specifics? Like the full callout configuration? 

What are you using for the action property? If I understand, you want to use transform_to_embedded. Are you doing that? what is the format of the SOAP/MTOM message? Can you show an example?

Also I am not clear what you mean by this

and convert xop to Json and pdf to base 64 encoded format.

Can you elaborate on what you mean by that? Give an example of what you mean by "convert XOP to JSON" ... Show the specific JSON you are hoping to generate?  and ... where do you want the PDF to be available?

Your message amounts to "I am trying this callout and it's not working", but you have provided very few specifics. I can offer very little help without details.