cancel
Showing results for 
Search instead for 
Did you mean: 

Convert payload to base64binary

Former Member
0 Kudos

I have a requirement where I have to convert the payload of the message into base64binary data. This is used in an integration scenario were a partner sends an xml message. The message should then be posted to a Microsoft share point site where it is stored as a file attachment. The WSDL for the Microsoft share point site web service specifies that the message be submitted in a base64binary node.

Can anyone help me with how I can convert the payload?

Regards

Philip

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

U can use java mapping as shown

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

Here instead of using BASE64Decoder, u may use BASE64Encoder class in the code

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek

Thank you very much for your help. It is spot on!!!!

I have implemented the mapping as explained in the blog but when I test it in the interface mapping in the integration repository, I get a java error. The exception is:

java.lang.UnsupportedClassVersionError: testpijavatransform/Main (Unsupported major.minor version 49.0)

Can you help me with this?

Regards

Philip

Former Member
0 Kudos

Philip,

If you give a look at the following SUN's java forum, you could see posts about usage "restriction" of sun.misc.* packages () :

"The source is not released by Sun. It is private to Sun and it is not a supported class. It should not be used in a production environment because if one tries to run a program using say IBM JDK then it may not exist."

There seems to be no official javadoc for these classes, so I think it would be better using XI's own b64 enc/dec classes, or APACHE common-objects ...

Btw, regarding your error, it looks like you've created a main() method in your mapping ? I think execute() is the main method when working with java mappings, though I'm not sure it's related to your error

Rgds

Chris

Answers (0)