You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Madhawa Kasun Gunasekara <ma...@gmail.com> on 2015/09/18 09:31:19 UTC

[Olingo V4] Can we stream binary data using olingov4

Hi All,

When I look into the implementation I found below code in EdmStream.class

if(value instanceof URI) {
    return ((URI)value).toASCIIString();
} else {
    throw new EdmPrimitiveTypeException("The value type " +
value.getClass() + " is not supported.");
}

There fore we can't stream binary data using Stream property. Is there any
workaround for this.

Any help on this is highly appreciated.

Thanks,
Madhawa

Re: [Olingo V4] Can we stream binary data using olingov4

Posted by Ramesh Reddy <ra...@redhat.com>.
Madhawa, 

For the first question as to I can't stream binary data, here is example [1] & [2], explain how your case is different? Now to the second question about not able to set header, where is this needed? How are setting it? What is error that is saying it "not acceptable"? 

Ramesh.. 

[1] https://github.com/apache/olingo-odata4/blob/master/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinServiceTest.java#L274 
[2] https://github.com/apache/olingo-odata4/blob/master/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinHandler.java#L194 

----- Original Message -----

> Hi All,

> this odata.streaming=true header is also not acceptable in olingoV4

> Thanks,
> Madhawa

> Madhawa

> On Fri, Sep 18, 2015 at 1:01 PM, Madhawa Kasun Gunasekara <
> madhawa30@gmail.com > wrote:

> > Hi All,
> 

> > When I look into the implementation I found below code in EdmStream.class
> 
> > if (value instanceof URI) {
> 
> > return ((URI)value).toASCIIString();
> 
> > } else {
> 
> > throw new EdmPrimitiveTypeException( "The value type " + value.getClass() +
> > "
> > is not supported." );
> 
> > }
> 
> > There fore we can't stream binary data using Stream property. Is there any
> > workaround for this.
> 

> > Any help on this is highly appreciated.
> 

> > Thanks,
> 
> > Madhawa
> 

Re: [Olingo V4] Can we stream binary data using olingov4

Posted by Madhawa Kasun Gunasekara <ma...@gmail.com>.
Hi All,

this  odata.streaming=true header is also not acceptable in olingoV4

Thanks,
Madhawa

Madhawa

On Fri, Sep 18, 2015 at 1:01 PM, Madhawa Kasun Gunasekara <
madhawa30@gmail.com> wrote:

> Hi All,
>
> When I look into the implementation I found below code in EdmStream.class
>
> if(value instanceof URI) {
>     return ((URI)value).toASCIIString();
> } else {
>     throw new EdmPrimitiveTypeException("The value type " + value.getClass() + " is not supported.");
> }
>
> There fore we can't stream binary data using Stream property. Is there any
> workaround for this.
>
> Any help on this is highly appreciated.
>
> Thanks,
> Madhawa
>