thanks to andre for this essential howto on spring integration!
i ran a quick test (using pojoguidespring/META-INF/services.xml) for WeatherSpringService (here is the descriptor) <service name="WeatherSpringService"> <description> Weather Spring POJO Axis2 AAR deployment </description> <parameter name="ServiceClass" >sample.spring.service.WeatherSpringService</parameter> <parameter name="ServiceObjectSupplier" >org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter> <parameter name="SpringBeanName" >weatherSpringService</parameter> ... </service> package org.apache.axis2.extensions.spring.receivers; public class SpringServletContextObjectSupplier implements ServiceObjectSupplier { public static final String SERVICE_SPRING_BEANNAME = "SpringBeanName"; public Object getServiceObject(AxisService axisService) throws AxisFault { try { // Name of spring aware bean to be injected, taken from services.xml // via 'SERVICE_SPRING_BEANNAME ' . The Bean and its properties are pre-configured // as normally done in a spring type of way and subsequently loaded by Spring. // Axis2 just assumes that the bean is configured and is in the classloader. Parameter implBeanParam = axisService.getParameter(SERVICE_SPRING_BEANNAME); String beanName = ((String)implBeanParam.getValue()).trim(); if (beanName != null) { Parameter servletConfigParam = axisService.getAxisConfiguration() .getParameter(HTTPConstants.HTTP_SERVLETCONFIG); if (servletConfigParam == null) { throw new Exception("Axis2 Can't find ServletConfigParameter"); } org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier getServiceObject method gacks looking for transport.http.servletConfig any ideas to supply this transport.http.servletConfig parameter are/will be greatly appreciated. Thanks, Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: andreas.veit...@gmail.com > Date: Fri, 2 Apr 2010 12:46:44 +0200 > Subject: Re: Axis2-Spring integration > To: java-dev@axis.apache.org > > On Fri, Apr 2, 2010 at 08:42, Amila Suriarachchi > <amilasuriarach...@gmail.com> wrote: > > > > > > On Fri, Apr 2, 2010 at 1:47 AM, Andreas Veithen <andreas.veit...@gmail.com> > > 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 wiki. > > > > Here the term Axi2 is embeded inside the spring can be elaborated as Axis2 > > users spring beans initialised by the spring framework rather than > > initialising itself. In otherwords it acks as another plugin[1] to spring > > container. > > > > Why this is important? Indikas' question gives the answer. Spring beans > > have all the features available with the spring container and additionally > > webservice support. > > > > We can do this by using existing axis2-spring support by using > > org.apache.axis2.extensions.spring.receiversSpringServletContextObjectSupplier > > 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, 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 configuration > > also witin the spring beans. This is different from the scenario supported > > by the existing axis2-spring module, which addresses the scenario of > > implementing a service using Spring, while all the configurations are done > > using axis2 xml files and initialize the spring beans by itself. > > As I wrote in my blog post, I personally prefer to have everything > inside Spring. However, I agree with Sagara that some people may > prefer to keep using the traditional axis2.xml file. From what I've > seen so far, 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, then we should not restrict > ourselves to a single option. > > > > > I am not still clear about the stanalone mode. If we assume that as letting > > someone to start the simple axis2 server > > with a spring bean support configuration (i.e configurations in axis2.xml > > services.xml) this is not related to the orignal goal. > > Just to be clear: standalone means scenarios that don't use a servlet > container, or at least that don't use the AxisServlet transport. This > may be a plain Java application that uses Spring, either with > SimpleHTTPServer or e.g. only the JMS transport. It may also be an > application that doesn't use any transport listener, but that is only > a Web service client. Or it may be an OSGi bundle implemented with > Spring... > > Probably for everyone the priority of supporting this is different, > but again, if we can do it without making the architecture complex, we > should support it. As my PoC code shows, 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. > > > thanks, > > Amila. > > > > [1] http://www.developersbook.com/spring/images/SpringFrameworkModules.PNG > >> > >> Andreas > >> > >> On Thu, Apr 1, 2010 at 13:43, Glen Daniels <g...@thoughtcraft.com> wrote: > >> > Quick comment, folks - do we really need to be cc'ing java-user for this > >> > conversation? If people are interested to this level, I would think > >> > they > >> > would already be on java-dev. > >> > > >> > --G > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org > >> > For additional commands, e-mail: java-dev-h...@axis.apache.org > >> > > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org > >> For additional commands, e-mail: java-user-h...@axis.apache.org > >> > > > > > > > > -- > > Amila Suriarachchi > > WSO2 Inc. > > blog: http://amilachinthaka.blogspot.com/ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org > For additional commands, e-mail: java-dev-h...@axis.apache.org > _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2