Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8681867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:37:10+00:00 2026-06-12T21:37:10+00:00

Could anyone guide me on how to add Basic Http authentication when using Spring

  • 0

Could anyone guide me on how to add Basic Http authentication when using Spring WS , namely the WebserviceTemplate class for writing a Web Service CLient?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:37:11+00:00Added an answer on June 12, 2026 at 9:37 pm

    You need to set the messageSender to use Commons HTTP. See here http://static.springsource.org/spring-ws/site/reference/html/client.html

    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
                <property name="credentials">
                    <bean class="org.apache.commons.httpclient.UsernamePasswordCredentials">
                        <constructor-arg value="john"/>
                        <constructor-arg value="secret"/>
                    </bean>
                </property>
            </bean>
        </property>
        <property name="defaultUri" value="http://example.com/WebService"/>
    </bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://docs.oracle.com/javase/1.5.0/docs/guide/jpda/trace.html Could anyone please provide me couple of examples of how to use Java
Could anyone guide me in created a simple app in JS? What the app
Could anyone guide me as to the best way to upload a collection of
Can anyone guide me what could be the problem in the mentioned below:- alt
Can anyone guide me through the right way to add an existing Helper into
I am writing HTTP server on top of Node.js, without using HTTP module. Retrieving
I just got started looking at using Solr as my search web service. I
Could anyone guide me how to import Active Directory in to user profiles in
Could anyone guide me as what is the difference among the following, 1) Visual
Could anyone please let me know if there is a way to programatically determine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.