Hi there -

I'm looking to change the authentication preference order for a Java based Soap 
client I'm currently using with httpclient 4.2.  I've poured over the web and 
so far I've come up short.

Here's what I'm basically looking to do in my spring context:

List<String> authtypes = new ArrayList<String>();
        authtypes.add(AuthPolicy.NTLM);
        authtypes.add(AuthPolicy.DIGEST);
        authtypes.add(AuthPolicy.BASIC);
        httpclient.getParams().setParameter(AuthPNames.PROXY_AUTH_PREF,
                authtypes);
        httpclient.getParams().setParameter(AuthPNames.TARGET_AUTH_PREF,
                authtypes);


The basic outline in spring should in my opinion look something like this:

<bean id="httpParams" class="org.apache.http.params.HttpParams">
      <constructor-arg type="java.lang.String" value=" 
http.auth.target-scheme-pref" />
      <constructor-arg type="java.lang.Object">
      <ref bean="authPref"/>
      </constructor-arg>
    </bean>

      <bean id="httpClient" 
class="org.apache.http.impl.client.DefaultHttpClient">
        <constructor-arg index="0" ref="httpParams"/>
    </bean>



    <util:list id="authPref" value-type="java.lang.String">
    <value>AuthPolicy.NTLM</value>
    <value>AuthPolicy.DIGEST</value>
      </util:list>


But so far I'm not having any luck as the httpParam bean is complaining about 
not finding the proper constructor.  Any insight on how this might be done 
correctly?

Reply via email to