Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 59049 invoked from network); 3 Sep 2010 15:03:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Sep 2010 15:03:27 -0000 Received: (qmail 23669 invoked by uid 500); 3 Sep 2010 15:03:26 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 23449 invoked by uid 500); 3 Sep 2010 15:03:24 -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 23437 invoked by uid 99); 3 Sep 2010 15:03:23 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 15:03:23 +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; Fri, 03 Sep 2010 15:03:00 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id D810B1865EC; Fri, 3 Sep 2010 11:02:38 -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.6u7dQwoyh8 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 5B4F81865E9; Fri, 3 Sep 2010 11:02:36 -0400 (EDT) From: Daniel Kulp To: users@cxf.apache.org Subject: Re: Asynchronous call with Java first approach Date: Fri, 3 Sep 2010 11:01:53 -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> <201009011607.57194.dkulp@apache.org> <0ECF2C865FC23C4C847FE886747883B28229C759ED@FRVDX100.fr01.awl.atosorigin.net> In-Reply-To: <0ECF2C865FC23C4C847FE886747883B28229C759ED@FRVDX100.fr01.awl.atosorigin.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201009031101.53285.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 Friday 03 September 2010 5:08:19 am Villoud Pierre Julien wrote: > Thanks for your help. Could you indicate me how to use java2ws to generate > the wrappers ? There is a -wrapperbean flag to the java2ws tool that will generate the bea= ns. =20 You would probably need to also add the -s flags to tell= it=20 where to generate them to. Dan > I'm successfully using the maven plugin to generate the > wsdl : >=20 > pom.xml---------------------------------------- >=20 > ... > > > process-classes > process-classes > > fr.Hello.ws.MyService > true > true > > > java2ws > > > > ... > ----------------------------------------------- > MyServiceImpl.java----------------------------- >=20 > ... > @RequestWrapper(localName =3D "sendMessageAsync", className =3D > "fr.Hello.ws.types.sendMessage") @ResponseWrapper(localName =3D > "sendMessageResponse", className =3D > "fr.Hello.ws.types.sendMessageResponse") @WebMethod(operationName =3D > "sendMessageAsync") > public Response > sendMessageAsync(String message); ... > ----------------------------------------------- >=20 > Thanks in advance >=20 > Best Regards >=20 > Pierre-Julien >=20 > -----Message d'origine----- > De : Daniel Kulp [mailto:dkulp@apache.org] > Envoy=E9 : mercredi 1 septembre 2010 22:08 > =C0 : users@cxf.apache.org > Cc : Villoud Pierre Julien > Objet : Re: Asynchronous call with Java first approach >=20 > 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 ? >=20 > I assume you are talking client side. For the most part, it's just a > matter of putting the correct method signatures onto the SEI and probably > creating the Request/Reponse wrappers (the java2ws tool can create initial > versions of those wrappers). For example, if you have a method like: >=20 > public java.lang.String greetMe( > java.lang.String requestType > ) >=20 > you would need to add methods like: >=20 > @RequestWrapper(localName =3D "greetMe", > targetNamespace =3D > "http://cxf.apache.org/greeter_control/types", className =3D > "org.apache.cxf.greeter_control.types.GreetMe") @ResponseWrapper(localName > =3D "greetMeResponse", > targetNamespace =3D > "http://cxf.apache.org/greeter_control/types", className =3D > "org.apache.cxf.greeter_control.types.GreetMeResponse") > @WebMethod(operationName =3D "greetMe") > public Response > greetMeAsync( @WebParam(name =3D "requestType", targetNamespace =3D > "http://cxf.apache.org/greeter_control/types") java.lang.String > requestType > ); >=20 > @RequestWrapper(localName =3D "greetMe", > targetNamespace =3D > "http://cxf.apache.org/greeter_control/types", className =3D > "org.apache.cxf.greeter_control.types.GreetMe") @ResponseWrapper(localName > =3D "greetMeResponse", > targetNamespace =3D > "http://cxf.apache.org/greeter_control/types", className =3D > "org.apache.cxf.greeter_control.types.GreetMeResponse") > @WebMethod(operationName =3D "greetMe") > public Future greetMeAsync( > @WebParam(name =3D "requestType", > targetNamespace =3D > "http://cxf.apache.org/greeter_control/types") java.lang.String > requestType, > @WebParam(name =3D "asyncHandler", targetNamespace =3D "") > AsyncHandler > asyncHandler ); >=20 > The first form is for a more "polling" version where you would poll the > Response object to see if it's done yet. The second is more even driven > where your handler would be called when the response arrives. >=20 > 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 > m> > >=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 p= ar 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=E9gri= t=E9 du > > message ne pouvant =EAtre assur=E9e sur Internet, la responsabilit=E9 d= u groupe > > Atos Origin ne pourra =EAtre recherch=E9e quant au contenu de ce messag= e. > > 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 reche= rch=E9e > > pour tout dommage r=E9sultant d'un virus transmis. > >=20 > > This e-mail and the documents attached are confidential and intended > > solely 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. >=20 > -- > Daniel Kulp > dkulp@apache.org > http://dankulp.com/blog >=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