javax.activation.DataSource.

On Sat, Aug 29, 2009 at 9:01 AM, sasuke<[email protected]> wrote:
>
>
> freak182 wrote:
>>
>> Hello,
>>
>> I developing a jcr base on jackrabbit. now i want the other application to
>> access it using webservice (cxf) . Now i have expose an interface to
>> return an java,io.InputStream
>>
>> @WebService
>> public interface JcrDocumentService
>> {
>>     @WebMethod
>>     InputStream getJcrFile(String jcrFilePath);
>> }
>>
>> as simple as that...in my other application I access it like this:
>>
>> InputStream stream =
>> jcrDocumentService.getJcrFile("photo/upload/test/test_signature.png");
>>
>> [trim]
>>
>
> Hi there,
>
> Are you sure that's even possible, I mean streaming response? Isn't it true
> that the entire response needs to be ready before sending it to the client?
>
> Anyways, whenever I needed something like this, I have used byte[] as the
> return type. You can emulate the `InputStream' like behavior by wrapping up
> the bytes in the ByteArrayInputStream.
>
> -sasuke
> --
> View this message in context: 
> http://www.nabble.com/How-to-handle-InputStream-tp25200495p25202713.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Reply via email to