Results 1 to 3 of 3

Thread: CommonHttpMessageSender Credentials

  1. #1
    Join Date
    Dec 2010
    Posts
    14

    Default 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. #2
    Join Date
    Oct 2008
    Location
    Poland, Wrocław
    Posts
    424

    Default

    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

  3. #3
    Join Date
    Dec 2010
    Posts
    14

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •