|
From: Michael Y. <sp...@on...> - 2003-12-22 18:01:44
|
Thanks Rob! I'll give it a shot. /Michael. On Friday, Dec-19-2003 18:52 PM (PST) rob...@ur... (Rob Rudin) wrote: > Hi Michael - I've pasted the example configuration below. That's one of the > nice things of the Glue-Spring integration - there's no coding involved. > When we did this (back in spring of 2003), we were able to expose > Spring-configured objects as web services with no coding, just a little > configuration. Only thing we had to do was create a class with a static > method "getBean" that provides access to the BeanFactory (or > ApplicationContext) that you're using, similar to the BeanFactoryBootstrap > in org.springframework.beans.factory.support. We actually already had a > class like this, since we earlier had a need to have a singleton that makes > the ApplicationContext available (we weren't using Spring's MVC, so we > didn't have access to something like WebApplicationContext). > > So assuming you have a class called something like "BeanFactoryAccessor" and > a static method called "getBean" on it, which would just access the > BeanFactory and call getBean on that, and assuming you have an object in > Spring called "MyService" that you want Glue to publish as a web service, > the configuration in the Glue services file is just: > > <service> > <factory> > <class>com.foo.BeanFactoryAccessor</class> > <method>getBean</method> > <args> > <arg>MyService</arg> > </args> > </factory> > ... other Glue configuration attributes... > </service> > > And that's all there is to it. It's really nice because you don't have to > use any Glue or Spring API's in the object that you want to publish. Check > out the Glue docs to learn about the services config file. You pretty much > just drop it into your webapp under WEB-INF, and when you start it up, Glue > will publish the web service and then load objects via Spring to handle web > service requests. > > Hope that helps! > > Rob > > ----- Original Message ----- > From: "Michael Young" <sp...@on...> > To: <spr...@li...> > Sent: Thursday, December 18, 2003 11:18 PM > Subject: Re: [Springframework-developer] Spring and axis > > > > Rob, > > > > Thank you for your reply. Yes I can try Glue. Can you send me > > some sample code? > > > > Thanks! /Michael. > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |