OK, I misunderstood. Thanks for the clarification !
2012/11/23 Sergey Beryozkin <[email protected]>: > On 23/11/12 15:55, Gege wrote: >> >> Thanks a lot. >> Event if i don't use a RS asynchronous client right now. It might >> prove usefull to switch from WS to RS. > > > I just think it can be a useful feature to let users to select which methods > will be handled at the code gen time, it won't imply that they'd need to > switch from WS if they also have WS frontends or that they have to use async > clients - will work Ok with browser based clients too or sync coded clients, > > I only now see that you actually were more interested in the async clients > :-) - this new option will help on the server only, to get the code > generator facilitating the support for async clients @UseAsyncMethod would > have to supported, not there yet > > Thanks, Sergey > > >> >> 2012/11/23 Sergey Beryozkin<[email protected]>: >>> >>> On 12/11/12 14:19, Sergey Beryozkin wrote: >>>> >>>> >>>> On 11/11/12 12:38, Gege wrote: >>>>> >>>>> >>>>> Hi, >>>>> >>>>> I'm using CXF between two endpoints (both are AS) in SOAP and/or REST >>>>> over >>>>> HTTP. >>>>> >>>>> I want network callflows to be as simple as possible (no callbacks, >>>>> plain >>>>> simple request/answer) and i want to be resources-efficient because >>>>> some >>>>> requests might be long (and i'll have long-polling for events). >>>>> >>>>> So, I need to have asynchronous implementations (in java) of both >>>>> client >>>>> and servers. >>>>> >>>>> Here is where i stand: >>>>> >>>>> SOAP (jax-ws) : >>>>> - asynchronous client : OK (wsimport + binding.xml) >>>>> - asynchronous server : not supported yet by CXF (AsyncProvider is >>>>> specified in jax-ws 2.2, it's not the most simple to implement (handle >>>>> the >>>>> XML myself...) but it should be able to do the job, might be supported >>>>> in >>>>> jax-ws-ri by sun). >>>>> >>>>> REST (jax-rs) : >>>>> - asynchronous client (cxf-wadl2java) : ? i did find anything about >>>>> asynchronous client and I really hope someone can give me a pointer >>>> >>>> >>>> >>>> I guess we can extend cxf-wadl2java to get "@Suspended AsyncResponse" >>>> added to the generated signature if a current method id is listed, >>>> example, "-async getIt", where "getIt" is the name or id of some >>>> specific WADL method element. I'll think about it... >>>> >>> >>> The code generator has been updated on the trunk to support "-async" >>> option, >>> for example, '-async get,addBook' where 'get' will match all WADL methods >>> with name "GET", and 'addBook' - a specific method with id attribute >>> 'addBook' >>> >>> "-managedAsync" option for supporting "@UseAsyncMethod" style will be >>> added >>> later... >>> >>> Sergey >>> >>> >>>> However, that will only help with preparing the server code, the proxy >>>> based client code will not be able to run in the async mode itself, it >>>> is only possible to use WebClient for the client code itself to run >>>> asynchronously. >>>> >>>> thanks, Sergey >>>> >>>>> - asynchronous server : OK using AsyncResponse (jax-rs 2.0) and some >>>>> fixes >>>>> that i'll post once i've tested a bit more >>>>> >>>>> For now, I feel like there are some pieces missing. >>>>> Of course i could implement a REST client myself, but i feel it's a >>>>> waste. >>>>> There are libraries and utilities everywhere and what I want to do >>>>> seems >>>>> pretty much in the scope of jax-rs and jax-ws). >>>>> >>>>> Thanks in advance. >>>>> >>>> >>>> >>> >>> >>> -- >>> Sergey Beryozkin >>> >>> Talend Community Coders >>> http://coders.talend.com/ >>> >>> Blog: http://sberyozkin.blogspot.com > > > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > > Blog: http://sberyozkin.blogspot.com
