Re: RxJava Observable with CXF

2016-08-31 Thread Sergey Beryozkin

I've looked a bit more today into it, see
http://git-wip-us.apache.org/repos/asf/cxf/commit/1224d5cc

It does offer a much better integration with JAX-RS 2.0 AsyncResponse, 
see a test there which streams the subscription items as get available 
which is quite useful. AsyncResponse itself can do multiple suspends 
till the first items start appearing.


I think more can be done there (may be later), but I suppose it will 
need to go into a dedicated module for 3.2.0 as the relevant code is 
going to grow for sure.


Cheers, Sergey
On 31/08/16 14:34, Muse Mekuria wrote:

Great! I'll be looking forward to this.

Muse

On Tue, Aug 30, 2016 at 1:04 PM, Sergey Beryozkin > wrote:

This should address this issue:

http://git-wip-us.apache.org/repos/asf/cxf/commit/502db47a


More work will be done on the client side too later on, with
CompletableFuture to be supported OOB.

Sergey

On 30/08/16 09:47, Sergey Beryozkin wrote:

Hi Muse

Thanks for starting experimenting with it.
It is fair to say that this feature requires more work - it is being
planned.
I'll add a missing @Provider annotation and that alone will let this
provider be auto discovered too with CXF 3.1.8 (with a
cxf.jaxrs.classes-scan -

http://cxf.apache.org/docs/springboot.html#SpringBoot-AdditionalConfiguration.1

).


I haven't tried yet Observable.just where a list is implicit -
will take
a look at it

Cheers, Sergey


On 29/08/16 16:09, Muse Mekuria wrote:

Hi Sergey,

I am working with Spring Boot & CXF and trying to implement
our APIs
with RxJava Observables. I used the ObservableWriter I found
here

>
and
added some Spring annotations so it gets picked up like so...

@Provider@Component@Produces(MediaType.APPLICATION_JSON)
public class ObservableWriter implements
MessageBodyWriter  {...

My api returns an empty list when I try to return the type
Observable
(where I am expecting a list of T) but if I wrap the whole
list into
Observable I get my response.

So my question is

  * Is there any documentation on how to use these
extensions properly
or is it still not ready for use
  * I was hoping to find something like this
>
where the
produced results are wrapped into a list, am I missing
something or
is this not available yet?

Thank you!
Muse





--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/






Re: RxJava Observable with CXF

2016-08-31 Thread Muse Mekuria
Great! I'll be looking forward to this.

Muse

On Tue, Aug 30, 2016 at 1:04 PM, Sergey Beryozkin 
wrote:

> This should address this issue:
>
> http://git-wip-us.apache.org/repos/asf/cxf/commit/502db47a
>
> More work will be done on the client side too later on, with
> CompletableFuture to be supported OOB.
>
> Sergey
>
> On 30/08/16 09:47, Sergey Beryozkin wrote:
>
>> Hi Muse
>>
>> Thanks for starting experimenting with it.
>> It is fair to say that this feature requires more work - it is being
>> planned.
>> I'll add a missing @Provider annotation and that alone will let this
>> provider be auto discovered too with CXF 3.1.8 (with a
>> cxf.jaxrs.classes-scan -
>> http://cxf.apache.org/docs/springboot.html#SpringBoot-Additi
>> onalConfiguration.1).
>>
>>
>> I haven't tried yet Observable.just where a list is implicit - will take
>> a look at it
>>
>> Cheers, Sergey
>>
>>
>> On 29/08/16 16:09, Muse Mekuria wrote:
>>
>>> Hi Sergey,
>>>
>>> I am working with Spring Boot & CXF and trying to implement our APIs
>>> with RxJava Observables. I used the ObservableWriter I found here
>>> >> 8ca8855ed481396c63>
>>> and
>>> added some Spring annotations so it gets picked up like so...
>>>
>>> @Provider@Component@Produces(MediaType.APPLICATION_JSON)
>>> public class ObservableWriter implements
>>> MessageBodyWriter  {...
>>>
>>> My api returns an empty list when I try to return the type Observable
>>> (where I am expecting a list of T) but if I wrap the whole list into
>>> Observable I get my response.
>>>
>>> So my question is
>>>
>>>   * Is there any documentation on how to use these extensions properly
>>> or is it still not ready for use
>>>   * I was hoping to find something like this
>>>  where the
>>> produced results are wrapped into a list, am I missing something or
>>> is this not available yet?
>>>
>>> Thank you!
>>> Muse
>>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>


CXF, Karaf, but no pax-web?

2016-08-31 Thread Benson Margulies
Has anyone any experience with using Karaf+CXF but punting on pax-web,
and just letting CXF launch jetty for itself?