You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Andy E. <and...@so...> - 2007-06-05 11:35:02
|
Sounds like it could be benefical to be able to set tags of a service in a number of ways. We should assume that users may set them in more than one way for any service and so therefore the mechanism of setting tags should share the same tag data structure. I'd suggest that for now we should aim for 3 methods of setting tags: 1. By Annotation 2. By Service Descriptor (web.xml) 3. By Service Definition (spring config - annotation or xml based) I'll post this up as a feature request on the dev site<http://dev.soapod.org/> . Andy On 6/4/07, Victor Bayon <vb...@gm...> wrote: > > Hi! > Answering my own question :) > > What I wanted to do was to be able to pass some initial values to my > service, kind of "init()" method where I read the property > > At the end was very simple. I am pretty sure that there are other ways but > this one seems to work if we follow the Spring DI (Dependency Injection) > pattern [1]. > > So I wanted to read the property "tag" when my service gets deployed. What > we do is to declare a property in our bean in applicationContext.xml > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" " > http://www.springframework.org/dtd/spring-beans-2.0.dtd"> > > <beans> > <!-- Config your Spring beans here --> > <bean id="myServiceBean" class=" > org.soapod.myService.ServiceImplementation"> > <property name="tag" value="hiThere"/> > </bean> > </beans> > > Then in our service implementation we declare our getter and setter > methods. This could be our interface: > > package org.soapod.myService; > > public interface ServiceInterface { > > public void setOther(String other); > public String getOther(); > } > > We declare explicitly the methods. And this one our service > Implementation: > > package org.soapod.myService; > public class ServiceImplementation implements ServiceInterface{ > > private String other; > > public void setOther(String other) > { > this.other = other; > } > > public String getOther() > { > return this.other; > } > > > } > > When our service gets deployed, Spring will inject the property init value > into our bean. Neat!. It might be possible to do it only with the > configuration file, but this works. > > > /V > > [1] > > http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-some-examples > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Soapod-users mailing list > Soa...@li... > https://lists.sourceforge.net/lists/listinfo/soapod-users > > -- Andy |
From: Victor B. <vb...@gm...> - 2007-06-04 18:09:58
|
Hi! Answering my own question :) What I wanted to do was to be able to pass some initial values to my service, kind of "init()" method where I read the property At the end was very simple. I am pretty sure that there are other ways but this one seems to work if we follow the Spring DI (Dependency Injection) pattern [1]. So I wanted to read the property "tag" when my service gets deployed. What we do is to declare a property in our bean in applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" " http://www.springframework.org/dtd/spring-beans-2.0.dtd"> <beans> <!-- Config your Spring beans here --> <bean id="myServiceBean" class=" org.soapod.myService.ServiceImplementation"> <property name="tag" value="hiThere"/> </bean> </beans> Then in our service implementation we declare our getter and setter methods. This could be our interface: package org.soapod.myService; public interface ServiceInterface { public void setOther(String other); public String getOther(); } We declare explicitly the methods. And this one our service Implementation: package org.soapod.myService; public class ServiceImplementation implements ServiceInterface{ private String other; public void setOther(String other) { this.other = other; } public String getOther() { return this.other; } } When our service gets deployed, Spring will inject the property init value into our bean. Neat!. It might be possible to do it only with the configuration file, but this works. /V [1] http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-some-examples |
From: Victor B. <vb...@gm...> - 2007-06-03 16:51:51
|
Hi there, A question=85 This is the scenario, I have a service called PTagger deployed in soapod J How can I at service runtime read which tags, SI, etc are associated to tha= t particular service. My guess is that I need to somehow access the Spring ApplicationContext object and try to read the properties from there?? Many Thanks! /V |