Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Blob as web service parameter
TomTom53
Hello,
I have a dataset which contains a Blob field. I mapped this dataset to a table and now I would like to insert inside another table mapped on a web services dataset. I want to pass the Blob dataSetRow as a parameter to the web service but there is no such type (Blob type), how can i do that ?
My web service method has currently a byte array parameter so I suppose there is a conversion between Blob to byte array but i don't know where..
thanks
Find more posts tagged with
Comments
kclark
If you're wanting to convert blob to a byte array you could use getBytes() It would look something like this.
int blobLength = (int) blob.length();
byte[] blobAsBytes = blob.getBytes(1, blobLength);
blob.free();
TomTom53
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="111746" data-time="1353510214" data-date="21 November 2012 - 08:03 AM"><p>
If you're wanting to convert blob to a byte array you could use getBytes() It would look something like this.<br />
<br />
int blobLength = (int) blob.length(); <br />
byte[] blobAsBytes = blob.getBytes(1, blobLength);<br />
blob.free();<br /></p></blockquote>
<br />
Thanks kclark but i don't understand where can i do this conversion. I can edit the dataset parameter binding in order to specify the Blob as parameter of my web service and maybe the conversion has to be here (in the expression builder) but this is javascript code and i think your code is java ?
TomTom53
Any idea ?