This content has been marked as final. Show 4 replies
Malathy, which jdev version do you use?
You are aware of the fact that a string isn't the right type to hold binary data. The first 0 byte you put into the string will end it. when you read or print the content of the string everything after the first 0 byte is lost.
Next thing to check are the headers you have set for the response. Which mime type have you set?
Have you written the data from hte WS into a file and tried to show hte image using any image software you have access to?
The Jdev version I use is 220.127.116.11.0.
Yeah, what you told is right, String is not the correct format..so I am converting it into bytes and then passing to the input stream.
I am not sure if this is sufficient.
Also I have tried through an online tool to decode the base64data response I got from WS and it did show the image nicely.So there seems to be
no problem with the WS response.
I have used the below code and it worked.
byte bytes = str.getBytes();
BASE64Decoder decoder = new BASE64Decoder();
byte decodedBytes = decoder.decodeBuffer(str);
InputStream in = new ByteArrayInputStream(decodedBytes);
to user8028603 ,
when working with Oracle internal (non production) builds its always worth testing if a problem reproduces in a public build before posing to a public forum. In your case it seems that build versions don't matter but in many cases internal builds are unstable and produce issues that are not reproducible in external (public) builds that people on this forum have access to