Hi Sagara, I had a similar scenario in our application. What I did is to write my own Axis2 handler and module.
The Axis2 handler gets a Message context instance, from where you can access a AxisService instance, which is required to obtain the webapp configured ApplicationContext. Have a look at the source code of SpringServletContextObjectSupplier. There you see the required code to get hold of the ApplicationContext via the AxisService instance. Regards, Leander Von: Sagara Gunathunga [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 11. November 2008 14:58 An: [email protected] Betreff: Re: [Rampart] Acegi security within PWCHandler Hi Prabath, Thanks for your feedback, but my case is somewhat different from AcegiAuthenticator , in your AcegiRealm class you manually load the ApplicationContext as follows. ApplicationContext context = new FileSystemXmlApplicationContext( fileName); String authProviderId = config.getAuthProviderId(); if (authProviderId == null) { throw new UserManagerException("nullAuthProvider"); } authProvider = (AuthenticationProvider) context.getBean(authProviderId); That's how you load AuthenticationProvider in to AcegiAuthenticator . but in my case when the web application is start ApplicationContext (Acegi) also loaded. When the time of PWCHandler invokes , ApplicationContext already available , i just want to access those spring beans within the handle method of PWCHandler without reload them again . ( like Axis2 access beans define in spring context ,without reloading ApplicationContext ) Thanks , On Tue, Nov 11, 2008 at 6:45 PM, Prabath Siriwardena <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Hi Sagara; Having a look at AcegiAuthenticator available here[1] may also be helpful. Thanks & regards. - Prabath [1]:https://svn.wso2.org/repos/wso2/branches/solutions/identity/1.5/commons/usermanager/modules/core/src/main/java/org/wso2/usermanager/custom/acegi Sagara Gunathunga wrote: > Hi Nandana, > I use following settings in my service.xml file , only with these settings > I can expose a POJO service called "ExampleService" > > <service name="ExampleService"> > <parameter name="ServiceObjectSupplier" locked="false"> > > org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier > </parameter> > <parameter name="SpringBeanName" > locked="false">ExampleService</parameter> > <operation name="CreateUser"> > <messageReceiver > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> > </operation> > </service> > > I think SpringServletContextObjectSupplier is responsible for providing > Speing beans in to service , It would be great if we can use such approach > in Rampart password callback handler also. > > Thanks , > > On Tue, Nov 11, 2008 at 2:09 PM, Nandana Mihindukulasooriya < > [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: > >> Hi Sagara, >> Can you provide a code snippet of how you access spring beans in >> service level so that we can see whether we can use the same approach within >> the Rampart password callback handler. >> >> thanks, >> nandana >> >> >> On Tue, Nov 11, 2008 at 11:15 AM, Sagara Gunathunga < >> [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: >> >>> Hi guys , >>> I want to invoke Acegi [1] AuthenticationManger within the handle >>> method of PWCHandler. Is there any way to access Spring beans within >>> the PWCHandler of Rampart module ? (because our identity and access >>> management module based on Acegi ) I use axis2 within the Spring >>> context approach where web service is exposed as a part of a web >>> application. >>> >>> Axis2 provide "ServiceObjectSupplier" and "SpringBeanName" parameters for >>> access Spring beans in service level , is there such mechanism >>> available for Rampart ...? Or any other suggestions ....? >>> >>> >>> [1] - http://www.acegisecurity.org/ >>> >>> Thanks , >>> >>> Sagara Gunathunga >>> >>> Blog - ssagara.blogspot.com<http://ssagara.blogspot.com> >>> Web - http://sagaras.awardspace.com/ >>> >> > > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.549 / Virus Database: 270.9.0/1777 - Release Date: 11/9/2008 > 9:53 AM --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> For additional commands, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> -- Sagara Gunathunga Blog - ssagara.blogspot.com<http://ssagara.blogspot.com> Web - http://sagaras.awardspace.com/ ________________________________ VVA Networks GmbH Mario-Leander Reimer Dipl.-Inf. (FH) Teamleitung Publishing Solutions --------------------------------------------------------------------------- VVA Networks GmbH : medien mit zukunft Geisenhausenerstra?e 15-17 81379 M?nchen Deutschland --------------------------------------------------------------------------- Fon: +49 89 2000375-610 Fax: +49 89 2000375-699 Mobil: +49 173 5883541 --------------------------------------------------------------------------- [EMAIL PROTECTED] www.vva-networks.de ----------------------------------------------------------------------- HRB 33884 D?sseldorf Gesch?ftsf?hrer Rolf Christian Kassel ----------------------------------------------------------------------- Ein Unternehmen der VVA Kommunikation http://www.vva.de ----------------------------------------------------------------------- omnisuite(r) - integrate. automate. communicate. http://www.omnisuite.de ----------------------------------------------------------------------- Diese Nachricht (inklusive aller Anh?nge) ist vertraulich. Sie darf ausschlie?lich durch den vorgesehenen Empf?nger und Adressaten gelesen, kopiert oder genutzt werden. Sollten Sie diese Nachricht versehentlich erhalten haben, bitten wir, den Absender (durch Antwort-E-Mail) hiervon unverz?glich zu informieren und die Nachricht zu l?schen. Jede unerlaubte Nutzung oder Weitergabe des Inhalts dieser Nachricht, sei es vollst?ndig oder teilweise, ist unzul?ssig. This message (including any attachments) is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error please contact the sender (by return E-Mail) immediately and delete this message. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited.
