Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Binary data in REST step?

  1. #1
    Join Date
    Dec 2016
    Posts
    2

    Default Binary data in REST step?

    Hi all,

    I can't figure out what I'm doing wrong so Idecided to ask the experts
    My transformation is getting an image that is base64 encoded by XML. In a Javascript-step I use org.Apache.commons.codec.binary.Base64.decodeBase64() to get the original bytes back. From this step I have an outgoing step with type "binary" with that data.
    When I then put in in a file with the "Text file output" step, I can see the image, everything is fine.

    Now I try to send the binary data via REST to a CUBA-application to an endpoint that puts the content of the body in a file. This also works, BUT: the filesize increases from 45kb to 71kb, the content is very similar so I suspect that somewhere the binary data gets corrupted. Maybe there is a UTF-8 conversion happening??

    When I use Postman (a REST-client) and send the file to the CUBA-application everything works fine so I assume the problem lies in the REST-step but I can't figure out what settings could cause the trouble.

    Any advice?

    Thanks in advance!

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Does the unexpected conversion happen if you set the "Application type" to "OCTET STREAM"?
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2016
    Posts
    2

    Default

    I tried "OCTET SREAM" as well as "TEXT PLAIN" and it happens everytime. Honestly, I don't know what this setting has an effect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.