Hello,

As you have noted, you should be able to use the reference service to give you the correct object back using eg, referenceService.renderIdentifier(reference, byte[].class, null) (where byte[].class can be replaced with whatever you want). However the problem here is you need a StreamToValueConverterSPI to do the conversion from a stream to the type you want and there isn't one for Base64.

So, an alternative is to try using the local worker EncodeByteArrayToBase64 which takes a byte array as input and outputs a Base64 object. Or write your own StreamToValueConverterSPI :)


Hope this helps.

Cheers,

Ian

Ian Dunlop
myGrid team
School of Computer Science
University of Manchester



On 5 May 2009, at 12:47, Michael Gerlich wrote:

Hi,

I have a question regarding the renderIdentifier function of the
ReferenceService.
The content of a reference can be accessed via the renderIdentifier, and
I guess the most common type might be StringReference or
InlineByteArrayReference. As I can cast a StringReference to a String by using String.class, how can I achieve this with InlineByteArrayReference?

Most of my outputs will either be a more or less formatted String output
(e.g. flat files) or images. As these images are transferred as Base64
encoded Strings wrapped inside an InlineByteArrayReference, how do I
extract this Base64 encoded String properly as String.class won't work
(I get somewhat like "binary as plain text").

Any help would be appreciated.

Regards,
Michael

--

Michael Gerlich
Group Bioinformatics & Mass Spectrometry
Leibniz Institute of Plant Biochemistry
06120 Halle, Germany


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
taverna-hackers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/taverna-hackers
Developers Guide: http://www.mygrid.org.uk/usermanual1.7/ dev_guide.html
FAQ: http://www.mygrid.org.uk/wiki/Mygrid/TavernaFaq

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
taverna-hackers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/taverna-hackers
Developers Guide: http://www.mygrid.org.uk/usermanual1.7/dev_guide.html
FAQ: http://www.mygrid.org.uk/wiki/Mygrid/TavernaFaq

Reply via email to