Announcement Announcement Module
Collapse
No announcement yet.
Substituting user/psswd tokens in XwsSecurityInterceptor policyConfiguration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Substituting user/psswd tokens in XwsSecurityInterceptor policyConfiguration

    Hi

    This is a question replacing properties in an XML on the classpath using Spring.

    I have the following bean in my aplicationContext.xml

    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>
    The wss-config.xml file has an xml snippet like so:

    Code:
    <SecurityConfiguration>
        <UsernameToken name="USERNAME" password="PASSWORD"/>
    </SecurityConfiguration>
    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="${user.name}" password="${user.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.

    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?
Working...
X