Announcement Announcement Module
Collapse
No announcement yet.
CommonHttpMessageSender Credentials Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • CommonHttpMessageSender Credentials

    Hi there,

    When using the CommonHttpMessageSender as the messageSender in a WS clien, I pass the credentials as

    Code:
    <property name="credentials">
    			<bean class="org.apache.commons.httpclient.UsernamePasswordCredentials">
    				<constructor-arg value="username" />
    				<constructor-arg value="password" />
    			</bean>
    		</property>
    Should I write the credentials in plain text, or is there a way to relocate them in another file for better maintainability?

    What is the best practice?

    Best,
    wi.lee

  • #2
    Hi

    You can always use PropertyPlaceholderConfigurer - see http://static.springsource.org/sprin...lderconfigurer.

    But if you want to encrypt the password, you should override the PropertyPlaceholderConfigurer to perform decryption.

    regards
    Grzegorz Grzybek

    Comment


    • #3
      Nice, that was the thing I was looking for!
      Thank you.

      Comment

      Working...
      X