Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F446D169 for ; Fri, 23 Nov 2012 17:08:01 +0000 (UTC) Received: (qmail 15648 invoked by uid 500); 23 Nov 2012 17:08:00 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 15407 invoked by uid 500); 23 Nov 2012 17:08:00 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 15385 invoked by uid 99); 23 Nov 2012 17:07:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 17:07:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gegefr@gmail.com designates 209.85.160.41 as permitted sender) Received: from [209.85.160.41] (HELO mail-pb0-f41.google.com) (209.85.160.41) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 17:07:54 +0000 Received: by mail-pb0-f41.google.com with SMTP id xa7so6923928pbc.0 for ; Fri, 23 Nov 2012 09:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WoYVT2lQKE4pceDqv/LNcCcePGR6ibA2zgyuuwmpLZI=; b=i7Sha/nuJ9CjJLZnnaCh6JrOgCDenHrVTASxERmXy7BFSddYy1RQH39cJwbqH/n8Aa Q1zL6vTsfVfcvcZ+m+tWkEQSjFSGAKpYd/sJVSxh22iwDrPcDK0kAe7iywEu88YM8QLh FdRPxPYPKLNRx9/1Ds4YKFY4fYPLwu8/xLnfihHHPpsHcDEarQRA4xya0C23TYOZ4kAs vC2PfHxzQxM2SAhNswNMW8kbPyH7ke2PjOh2pzojowmRloMEMrsDDrw7ec3vopMHMBXo k3xVwWDWTp9bAZlTwMuFknPMjfZdoPD9mVJ0Ml+CyKIClTb9F6iW98hk8ukP24tpgOoY wkkw== MIME-Version: 1.0 Received: by 10.66.79.133 with SMTP id j5mr11761860pax.51.1353690453993; Fri, 23 Nov 2012 09:07:33 -0800 (PST) Received: by 10.68.1.40 with HTTP; Fri, 23 Nov 2012 09:07:33 -0800 (PST) In-Reply-To: <50AFA43A.6050204@gmail.com> References: <50A1057A.3060705@gmail.com> <50AF6644.3050702@gmail.com> <50AFA43A.6050204@gmail.com> Date: Fri, 23 Nov 2012 18:07:33 +0100 Message-ID: Subject: Re: Asynchronous From: Gege To: users@cxf.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org OK, I misunderstood. Thanks for the clarification ! 2012/11/23 Sergey Beryozkin : > 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: >>> >>> 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