Hi
This is a question replacing properties in an XML on the classpath using Spring.
I have the following bean in my aplicationContext.xml
The wss-config.xml file has an xml snippet like so:Code:<bean id="xwsSecurityInterceptor" class="org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor"> <property name="policyConfiguration" value="classpath:wss-config.xml" /> <property name="callbackHandlers"> <list> <ref bean="callbackHandler" /> </list> </property> </bean>
I need to tokenize the name and password in UsernameToken and get the values from a property file. I tried using tokenizing it like so:Code:<SecurityConfiguration> <UsernameToken name="USERNAME" password="PASSWORD"/> </SecurityConfiguration>
The user.name and password properties are in a properties file. These properties get substituted in my applicationContext.xml but don't seem to work for the config.xml.Code:<SecurityConfiguration> <UsernameToken name="${user.name}" password="${user.password}"/> </SecurityConfiguration>
I understand that the config is loaded as a resource into XwsSecurityInterceptor and has nothing to with the Properties Placeholder defined in the ap context but is there a way I can set these properties from a file?


Reply With Quote
