Topic
1 reply Latest Post - ‏2013-11-01T04:37:34Z by KY0J_Simbu_Selvarasu
Shyam_Tripathi
Shyam_Tripathi
1 Post
ACCEPTED ANSWER

Pinned topic How to process BLOB bytes to Image

‏2013-10-31T12:15:51Z |

Hi All,

 

I have to retrieve an Image against its Id from Database and send it to shared directory(as of now into my local directory). Earlier I did it with the help of stored procedure but later we got to know that we cannot use stored procedure as we are building application for the third party. So we have to do it in MB only.

Now I am stuck at the point that with the help of 'fileOutput' node how to propagate an image( which is in blob)and most important, how to process this blob into the target directory so that image will be accessible.

With the help of below code, I can propagate the Blob into target directory, but as I am not processing the blob , I am not able to open this image.

Please suggest me the way so that I can complete this requirement.

 

SET SqlQuery='SELECT FORM_CONTENT FROM prtformtbl WHERE FORM_ID = '||CAST (formId AS CHAR);

SET data.list[] = PASSTHRU(SqlQuery);

 

--Send the XML doc into the shared directory

SET OutputRoot.XMLNSC.ns:sendFaxResponse.dummy= data.list[1].FORM_CONTENT;

SET InputLocalEnvironment.Destination.File.Name='ImageId_'||formId||'.tiff';

PROPAGATE TO TERMINAL 'out1' DELETE NONE;

  • KY0J_Simbu_Selvarasu
    38 Posts
    ACCEPTED ANSWER

    Re: How to process BLOB bytes to Image

    ‏2013-11-01T04:37:34Z  in response to Shyam_Tripathi

    Actually you are propagating XML message into target directory and not BLOB message. Please try to send BLOB message and check the output.

    It should be like

    SET OutputRoot.BLOB.BLOB= data.list[1].FORM_CONTENT;