Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 23558 invoked from network); 1 Sep 2010 20:09:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Sep 2010 20:09:40 -0000 Received: (qmail 52259 invoked by uid 500); 1 Sep 2010 20:09:40 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 52173 invoked by uid 500); 1 Sep 2010 20:09:39 -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 52165 invoked by uid 99); 1 Sep 2010 20:09:39 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 20:09:39 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 20:09:17 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 0C9961865DA; Wed, 1 Sep 2010 16:08:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-users@cxf.apache.org.6aMif27Hlf Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id F1BE91865CE; Wed, 1 Sep 2010 16:08:53 -0400 (EDT) From: Daniel Kulp To: users@cxf.apache.org Subject: Re: Asynchronous call with Java first approach Date: Wed, 1 Sep 2010 16:07:56 -0400 User-Agent: KMail/1.13.5 (Linux/2.6.35; KDE/4.4.5; x86_64; ; ) Cc: Villoud Pierre Julien References: <0ECF2C865FC23C4C847FE886747883B28228CBAF43@FRVDX100.fr01.awl.atosorigin.net> In-Reply-To: <0ECF2C865FC23C4C847FE886747883B28228CBAF43@FRVDX100.fr01.awl.atosorigin.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201009011607.57194.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 On Wednesday 01 September 2010 11:37:56 am Villoud Pierre Julien wrote: > Hi every one, >=20 > I'm using CXF for my Soap Web Service and I would like to enable > asynchronous calls. I saw in the documentation that it was possible with a > wsdl first approach. Is it possible with Java first ? What are the > necessary steps to achieve this ? I assume you are talking client side. For the most part, it's just a matt= er of putting the correct method signatures onto the SEI and=20 probably creating the Request/Reponse wrappers (the java2ws tool can create= initial versions of those wrappers). For example, if you=20 have a method like: public java.lang.String greetMe( java.lang.String requestType ) you would need to add methods like: @RequestWrapper(localName =3D "greetMe",=20 targetNamespace =3D "http://cxf.apache.org/greeter_control/t= ypes",=20 className =3D "org.apache.cxf.greeter_control.types.GreetMe") @ResponseWrapper(localName =3D "greetMeResponse",=20 targetNamespace =3D "http://cxf.apache.org/greeter_control/t= ypes", className =3D "org.apache.cxf.greeter_control.types.GreetMeR= esponse") @WebMethod(operationName =3D "greetMe") public Response g= reetMeAsync( @WebParam(name =3D "requestType", targetNamespace =3D "http://cxf.a= pache.org/greeter_control/types") java.lang.String requestType ); @RequestWrapper(localName =3D "greetMe",=20 targetNamespace =3D "http://cxf.apache.org/greeter_control/ty= pes",=20 className =3D "org.apache.cxf.greeter_control.types.GreetMe") @ResponseWrapper(localName =3D "greetMeResponse", targetNamespace =3D "http://cxf.apache.org/greeter_control/ty= pes",=20 className =3D "org.apache.cxf.greeter_control.types.GreetMeRe= sponse") @WebMethod(operationName =3D "greetMe") public Future greetMeAsync( @WebParam(name =3D "requestType",=20 targetNamespace =3D "http://cxf.apache.org/greeter_control/ty= pes") java.lang.String requestType, @WebParam(name =3D "asyncHandler", targetNamespace =3D "") AsyncHandler = asyncHandler ); The first form is for a more "polling" version where you would poll the Res= ponse object to see if it's done yet. The second is more=20 even driven where your handler would be called when the response arrives. Dan >=20 > Thanks in advance >=20 > Best regards >=20 > Pierre-Julien VILLOUD > Responsable d'Applications > Unit=E9 Public - Sant=E9 - Transport - Atos Worldline > pierre-julien.villoud@atosorigin.com >=20 >=20 >=20 >=20 > ________________________________ >=20 > Ce message et les pi=E8ces jointes sont confidentiels et r=E9serv=E9s =E0= l'usage > exclusif de ses destinataires. Il peut =E9galement =EAtre prot=E9g=E9 par= le > secret professionnel. Si vous recevez ce message par erreur, merci d'en > avertir imm=E9diatement l'exp=E9diteur et de le d=E9truire. L'int=E9grit= =E9 du > message ne pouvant =EAtre assur=E9e sur Internet, la responsabilit=E9 du = groupe > Atos Origin ne pourra =EAtre recherch=E9e quant au contenu de ce message.= Bien > que les meilleurs efforts soient faits pour maintenir cette transmission > exempte de tout virus, l'exp=E9diteur ne donne aucune garantie =E0 cet = =E9gard > et sa responsabilit=E9 ne saurait =EAtre recherch=E9e pour tout dommage > r=E9sultant d'un virus transmis. >=20 > This e-mail and the documents attached are confidential and intended sole= ly > for the addressee; it may also be privileged. If you receive this e-mail > in error, please notify the sender immediately and destroy it. As its > integrity cannot be secured on the Internet, the Atos Origin group > liability cannot be triggered for the message content. Although the sender > endeavours to maintain a computer virus-free network, the sender does not > warrant that this transmission is virus-free and will not be liable for > any damages resulting from any virus transmitted. =2D-=20 Daniel Kulp dkulp@apache.org http://dankulp.com/blog