Expand my Community achievements bar.

convert base64 encoded binary data to document

Avatar

Former Community Member
Hello,



for my project it is necessary that I take the response from a web service, which holds base64 encoded binary data, and transform it to document type, because I want to assign the result PDF to a user..I tried to bind the Input form variable from the Assign User operation to a simple XPath which points to the result data, but then I get the error [AWS] stalling action-instance: 833 with message: UserServiceImpl:createTaskFromDialogProperties() Exception - you have attempted to provide Form input of an invalid type, only com.adobe.ipd.Document or com.adobe.idp.taskmanager.form.FormInstance types are supported. Type attempted was: class org.apache.xerces.dom.DeferredElementNSImpl. That data are are correct, I can write them to a file and decode it manually, but that doesn't help me..Is there any way to decode base64 encoded data with a workbench process?



Thanks
7 Replies

Avatar

Level 10
In the xPath builder (under the document category), there is a function called getDocFromBase64 you can include in your xpath to decode a Base64 encoded string.



getDocFromBase64(/process_data/@MyString)



Jasmin

Avatar

Former Community Member
sorry, but I can't find it there..Solved the problem by developing a custom component which does the transformation

Avatar

Former Community Member
Any more help? I don't want to pay for that;-)

Avatar

Level 10
Sorry about that. It'll be in the next release of the product!



Jasmin

Avatar

Level 3
The function: getDocFromBase64(:String) is expected to be in the next release.



In the meantime, what would be the processing steps to implement this processing in the meantime.



Jesse

Avatar

Level 10
You can build your own component or use the executeString and write a java routine to do that.



You'll need to include a Base64 library on your server though.



Jasmin