Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 31792 invoked from network); 2 Apr 2010 13:56:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Apr 2010 13:56:54 -0000 Received: (qmail 60619 invoked by uid 500); 2 Apr 2010 12:54:53 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 60448 invoked by uid 500); 2 Apr 2010 12:54:53 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 60440 invoked by uid 99); 2 Apr 2010 12:54:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 12:54:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mgainty@hotmail.com designates 65.55.116.85 as permitted sender) Received: from [65.55.116.85] (HELO blu0-omc3-s10.blu0.hotmail.com) (65.55.116.85) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 12:54:47 +0000 Received: from BLU142-W26 ([65.55.116.74]) by blu0-omc3-s10.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 2 Apr 2010 05:53:25 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_a471ed11-51ea-4208-acda-59e429e778dd_" X-Originating-IP: [24.63.136.58] From: Martin Gainty To: Subject: RE: Axis2-Spring integration Date: Fri, 2 Apr 2010 08:53:25 -0400 Importance: Normal In-Reply-To: References: ,,,,,<4BB486DD.1080205@thoughtcraft.com> ,, MIME-Version: 1.0 X-OriginalArrivalTime: 02 Apr 2010 12:53:25.0214 (UTC) FILETIME=[7BAEF7E0:01CAD263] --_a471ed11-51ea-4208-acda-59e429e778dd_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable thanks to andre for this essential howto on spring integration! =20 i ran a quick test (using pojoguidespring/META-INF/services.xml) for Weathe= rSpringService (here is the descriptor) =20 Weather Spring POJO Axis2 AAR deployment sample.spring.service.WeatherSpringSe= rvice org.apache.axis2.extensions.= spring.receivers.SpringAppContextAwareObjectSupplier weatherSpringService ... =20 package org.apache.axis2.extensions.spring.receivers=3B public class SpringServletContextObjectSupplier implements ServiceObjectSup= plier { public static final String SERVICE_SPRING_BEANNAME =3D "SpringBeanName"= =3B public Object getServiceObject(AxisService axisService) throws AxisFaul= t { try { // Name of spring aware bean to be injected=2C taken from servi= ces.xml // via 'SERVICE_SPRING_BEANNAME ' . The Bean and its properties= are pre-configured // as normally done in a spring type of way and subsequently lo= aded by Spring. // Axis2 just assumes that the bean is configured and is in the= classloader. Parameter implBeanParam =3D axisService.getParameter(SERVICE_SP= RING_BEANNAME)=3B String beanName =3D ((String)implBeanParam.getValue()).trim()= =3B if (beanName !=3D null) { Parameter servletConfigParam =3D axisService.getAxisConfigu= ration() .getParameter(HTTPConstants.HTTP_SERVLETCONFIG)=3B if (servletConfigParam =3D=3D null) { throw new Exception("Axis2 Can't find ServletConfigPara= meter")=3B } org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupp= lier getServiceObject method gacks looking for=20 transport.http.servletConfig any ideas to supply this transport.http.servletConfig parameter are/will be= greatly appreciated. Thanks=2C Martin Gainty=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . =20 > From: andreas.veithen@gmail.com > Date: Fri=2C 2 Apr 2010 12:46:44 +0200 > Subject: Re: Axis2-Spring integration > To: java-dev@axis.apache.org >=20 > On Fri=2C Apr 2=2C 2010 at 08:42=2C Amila Suriarachchi > wrote: > > > > > > On Fri=2C Apr 2=2C 2010 at 1:47 AM=2C Andreas Veithen > > wrote: > >> > >> One last message with java-user in copy: I've created a page on our > >> brand new Wiki: > >> > >> http://wiki.apache.org/axis/Axis2Spring > >> > >> Please feel free to edit and add your ideas. > > > > Thanks Andreas for creating the wiki an initiating the this work. > > > > Let me put my view and suggestion first before directly editing the wik= i. > > > > Here the term Axi2 is embeded inside the spring can be elaborated as Ax= is2 > > users spring beans initialised by the spring framework rather than > > initialising itself. In otherwords it acks as another plugin[1] to spri= ng > > container. > > > > Why this is important? Indikas' question gives the answer. Spring bean= s > > have all the features available with the spring container and additiona= lly > > webservice support. > > > > We can do this by using existing axis2-spring support by using > > org.apache.axis2.extensions.spring.receiversSpringServletContextObjectS= upplier > > but the configuration is done by using same axis2 xml files. > > > > The proposed project let users to do that as spring configuration files= as > > well. But still transports=2C modules and all manged by Axis2 runtime. > > > > So I suggest first paragraph should some thing like this. > > > > The goal is to provide Spring integration for Axis2 in scenarios where = Axis2 > > is embedded inside Spring (i.e. where the Axis2 runtime uses the spring > > beans initialized by the Spring container) while keeping the configurat= ion > > also witin the spring beans. This is different from the scenario suppor= ted > > by the existing axis2-spring module=2C which addresses the scenario of > > implementing a service using Spring=2C while all the configurations are= done > > using axis2 xml files and initialize the spring beans by itself. >=20 > As I wrote in my blog post=2C I personally prefer to have everything > inside Spring. However=2C I agree with Sagara that some people may > prefer to keep using the traditional axis2.xml file. From what I've > seen so far=2C it is fairly easy to support both approaches. If we can > give the user the option to choose between the two approaches while > still keeping the architecture simple=2C then we should not restrict > ourselves to a single option. >=20 > > > > I am not still clear about the stanalone mode. If we assume that as let= ting > > someone to start the simple axis2 server > > with a spring bean support configuration (i.e configurations in axis2.x= ml > > services.xml) this is not related to the orignal goal. >=20 > Just to be clear: standalone means scenarios that don't use a servlet > container=2C or at least that don't use the AxisServlet transport. This > may be a plain Java application that uses Spring=2C either with > SimpleHTTPServer or e.g. only the JMS transport. It may also be an > application that doesn't use any transport listener=2C but that is only > a Web service client. Or it may be an OSGi bundle implemented with > Spring... >=20 > Probably for everyone the priority of supporting this is different=2C > but again=2C if we can do it without making the architecture complex=2C w= e > should support it. As my PoC code shows=2C it is actually extremely easy > to support this. The only thing that is needed is to create and start > a ListenerManager in the application context. >=20 > > thanks=2C > > Amila. > > > > [1] http://www.developersbook.com/spring/images/SpringFrameworkModules.= PNG > >> > >> Andreas > >> > >> On Thu=2C Apr 1=2C 2010 at 13:43=2C Glen Daniels wrote: > >> > Quick comment=2C folks - do we really need to be cc'ing java-user fo= r this > >> > conversation? If people are interested to this level=2C I would thi= nk > >> > they > >> > would already be on java-dev. > >> > > >> > --G > >> > > >> > --------------------------------------------------------------------= - > >> > To unsubscribe=2C e-mail: java-dev-unsubscribe@axis.apache.org > >> > For additional commands=2C e-mail: java-dev-help@axis.apache.org > >> > > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe=2C e-mail: java-user-unsubscribe@axis.apache.org > >> For additional commands=2C e-mail: java-user-help@axis.apache.org > >> > > > > > > > > -- > > Amila Suriarachchi > > WSO2 Inc. > > blog: http://amilachinthaka.blogspot.com/ > > >=20 > --------------------------------------------------------------------- > To unsubscribe=2C e-mail: java-dev-unsubscribe@axis.apache.org > For additional commands=2C e-mail: java-dev-help@axis.apache.org >=20 =20 _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your = inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=3DPID28326::T:WLMTAGL:O= N:WL:en-US:WM_HMP:042010_2= --_a471ed11-51ea-4208-acda-59e429e778dd_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable thanks to andre =3Bfor this essential howto on spring integration!
 =3B
i ran a quick test (using pojoguidespring/META-INF/services.xml) for Weathe= rSpringService (here is the descriptor)
 =3B
 =3B <=3Bservice name=3D"WeatherSpringService">=3B
 =3B = =3B =3B <=3Bdescription>=3B
 =3B =3B =3B =3B&nbs= p=3B Weather Spring POJO Axis2 AAR deployment
 =3B =3B =3B &= lt=3B/description>=3B
 =3B =3B =3B <=3Bparameter name=3D= "ServiceClass" >=3Bsample.spring.service.WeatherSpringService<=3B/param= eter>=3B
 =3B =3B =3B <=3Bparameter name=3D"ServiceObjec= tSupplier" >=3Borg.apache.axis2.extensions.spring.receivers.SpringAppCont= extAwareObjectSupplier<=3B/parameter>=3B
 =3B =3B =3B &l= t=3Bparameter name=3D"SpringBeanName" >=3BweatherSpringService<=3B/para= meter>=3B
...
 =3B<=3B/service>=3B
 =3B
package org.apache.axis2.extensions.spring.receivers=3B
public class SpringServletContextObjectSupplier implements ServiceObjectSup= plier {
 =3B =3B public static final String SERVICE_SPRING_BEANNAME =3D "Sp= ringBeanName"=3B
 =3B =3B =3B public Object getServiceObject(AxisService axisSer= vice) throws AxisFault {
 =3B =3B =3B =3B =3B = =3B =3B try {
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B // Name of spring aware bean to be inje= cted=2C taken from services.xml
 =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B // via 'SERVICE_SPRING_BEA= NNAME ' . The Bean and its properties are pre-configured
 =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= // as normally done in a spring type of way and subsequently loaded by Spr= ing.
 =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B // Axis2 just assumes that the bean is configured and= is in the classloader.
 =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B Parameter implBeanParam =3D axisSe= rvice.getParameter(SERVICE_SPRING_BEANNAME)=3B
 =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B String bean= Name =3D ((String)implBeanParam.getValue()).trim()=3B
 =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B if (= beanName !=3D null) {
 =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B Para= meter servletConfigParam =3D axisService.getAxisConfiguration()
 =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B .getParameter(HTTPConstants.HTTP_SERVLETCONFIG)= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B if (servletConfigParam =3D=3D= null) {
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B throw new Exception("Axis2 Can't find ServletConfigParamet= er")=3B
 =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B }

org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupp= lier getServiceObject method =3Bgacks looking for
transport.http.servletConfig

any ideas to supply this transport.http.servletConfig parameter =3Bare/= will be =3Bgreatly =3Bappreciated.
Thanks=2C
Martin Gainty
____________________________________________= __
Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confident= ialit=E9

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorg= esehene Empfaenger sein=2C so bitten wir hoeflich um eine Mitteilung. Jede = unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese N= achricht dient lediglich dem Austausch von Informationen und entfaltet kein= e rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E= -Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

C=
e message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes =
pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sati=
sfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e =
ou la copie de ceci est interdite. Ce message sert =E0 l'information seulem=
ent et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant do=
nn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation=2C=
 nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni.



 =3B
>=3B From: andreas.veithen@gmail.com
>=3B Date: Fri=2C 2 Apr 201= 0 12:46:44 +0200
>=3B Subject: Re: Axis2-Spring integration
>=3B = To: java-dev@axis.apache.org
>=3B
>=3B On Fri=2C Apr 2=2C 2010 a= t 08:42=2C Amila Suriarachchi
>=3B <=3Bamilasuriarachchi@gmail.com&g= t=3B wrote:
>=3B >=3B
>=3B >=3B
>=3B >=3B On Fri=2C Ap= r 2=2C 2010 at 1:47 AM=2C Andreas Veithen <=3Bandreas.veithen@gmail.com&g= t=3B
>=3B >=3B wrote:
>=3B >=3B>=3B
>=3B >=3B>=3B = One last message with java-user in copy: I've created a page on our
>= =3B >=3B>=3B brand new Wiki:
>=3B >=3B>=3B
>=3B >=3B>= =3B http://wiki.apache.org/axis/Axis2Spring
>=3B >=3B>=3B
>= =3B >=3B>=3B Please feel free to edit and add your ideas.
>=3B >= =3B
>=3B >=3B Thanks Andreas for creating the wiki an initiating the= this work.
>=3B >=3B
>=3B >=3B Let me put my view and sugges= tion first before directly editing the wiki.
>=3B >=3B
>=3B >= =3B Here the term Axi2 is embeded inside the spring can be elaborated as Ax= is2
>=3B >=3B users spring beans initialised by the spring framework= rather than
>=3B >=3B initialising itself. In otherwords it acks as= another plugin[1] to spring
>=3B >=3B container.
>=3B >=3B>=3B >=3B  =3BWhy this is important? Indikas' question gives the = answer. Spring beans
>=3B >=3B have all the features available with = the spring container and additionally
>=3B >=3B webservice support.<= BR>>=3B >=3B
>=3B >=3B We can do this by using existing axis2-sp= ring support by using
>=3B >=3B org.apache.axis2.extensions.spring.r= eceiversSpringServletContextObjectSupplier
>=3B >=3B but the configu= ration is done by using same axis2 xml files.
>=3B >=3B
>=3B &g= t=3B The proposed project let users to do that as spring configuration file= s as
>=3B >=3B well. But still transports=2C modules and all manged = by Axis2 runtime.
>=3B >=3B
>=3B >=3B So I suggest first para= graph should some thing like this.
>=3B >=3B
>=3B >=3B The go= al is to provide Spring integration for Axis2 in scenarios where Axis2
&= gt=3B >=3B is embedded inside Spring (i.e. where the Axis2 runtime uses t= he spring
>=3B >=3B beans initialized by the Spring container) while= keeping the configuration
>=3B >=3B also witin the spring beans. Th= is is different from the scenario supported
>=3B >=3B by the existin= g axis2-spring module=2C which addresses the scenario of
>=3B >=3B i= mplementing a service using Spring=2C while all the configurations are done=
>=3B >=3B using axis2 xml files and initialize the spring beans by = itself.
>=3B
>=3B As I wrote in my blog post=2C I personally pre= fer to have everything
>=3B inside Spring. However=2C I agree with Sag= ara that some people may
>=3B prefer to keep using the traditional axi= s2.xml file. From what I've
>=3B seen so far=2C it is fairly easy to s= upport both approaches. If we can
>=3B give the user the option to cho= ose between the two approaches while
>=3B still keeping the architectu= re simple=2C then we should not restrict
>=3B ourselves to a single op= tion.
>=3B
>=3B >=3B
>=3B >=3B I am not still clear abo= ut the stanalone mode. If we assume that as letting
>=3B >=3B someon= e to start the simple axis2 server
>=3B >=3B with a spring bean supp= ort configuration (i.e configurations in axis2.xml
>=3B >=3B service= s.xml) this is not related to the orignal goal.
>=3B
>=3B Just t= o be clear: standalone means scenarios that don't use a servlet
>=3B c= ontainer=2C or at least that don't use the AxisServlet transport. This
&= gt=3B may be a plain Java application that uses Spring=2C either with
&g= t=3B SimpleHTTPServer or e.g. only the JMS transport. It may also be an
= >=3B application that doesn't use any transport listener=2C but that is o= nly
>=3B a Web service client. Or it may be an OSGi bundle implemented= with
>=3B Spring...
>=3B
>=3B Probably for everyone the pr= iority of supporting this is different=2C
>=3B but again=2C if we can = do it without making the architecture complex=2C we
>=3B should suppor= t it. As my PoC code shows=2C it is actually extremely easy
>=3B to su= pport this. The only thing that is needed is to create and start
>=3B = a ListenerManager in the application context.
>=3B
>=3B >=3B t= hanks=2C
>=3B >=3B Amila.
>=3B >=3B
>=3B >=3B [1] http= ://www.developersbook.com/spring/images/SpringFrameworkModules.PNG
>= =3B >=3B>=3B
>=3B >=3B>=3B Andreas
>=3B >=3B>=3B
&= gt=3B >=3B>=3B On Thu=2C Apr 1=2C 2010 at 13:43=2C Glen Daniels <=3Bg= len@thoughtcraft.com>=3B wrote:
>=3B >=3B>=3B >=3B Quick comme= nt=2C folks - do we really need to be cc'ing java-user for this
>=3B &= gt=3B>=3B >=3B conversation?  =3BIf people are interested to this l= evel=2C I would think
>=3B >=3B>=3B >=3B they
>=3B >=3B&g= t=3B >=3B would already be on java-dev.
>=3B >=3B>=3B >=3B
= >=3B >=3B>=3B >=3B --G
>=3B >=3B>=3B >=3B
>=3B >= =3B>=3B >=3B ----------------------------------------------------------= -----------
>=3B >=3B>=3B >=3B To unsubscribe=2C e-mail: java-de= v-unsubscribe@axis.apache.org
>=3B >=3B>=3B >=3B For additional = commands=2C e-mail: java-dev-help@axis.apache.org
>=3B >=3B>=3B &g= t=3B
>=3B >=3B>=3B >=3B
>=3B >=3B>=3B
>=3B >=3B&= gt=3B ---------------------------------------------------------------------=
>=3B >=3B>=3B To unsubscribe=2C e-mail: java-user-unsubscribe@axi= s.apache.org
>=3B >=3B>=3B For additional commands=2C e-mail: java= -user-help@axis.apache.org
>=3B >=3B>=3B
>=3B >=3B
>= =3B >=3B
>=3B >=3B
>=3B >=3B --
>=3B >=3B Amila Suri= arachchi
>=3B >=3B WSO2 Inc.
>=3B >=3B blog: http://amilachin= thaka.blogspot.com/
>=3B >=3B
>=3B
>=3B -----------------= ----------------------------------------------------
>=3B To unsubscri= be=2C e-mail: java-dev-unsubscribe@axis.apache.org
>=3B For additional= commands=2C e-mail: java-dev-help@axis.apache.org
>=3B
=

Hotmail is redefining busy with tools for the New Busy. Get m= ore from your inbox. See how. = --_a471ed11-51ea-4208-acda-59e429e778dd_--