I tried with a conduit configured in XML. Same issue. It is weird since
both the main and backup URL should have the same conduit name.

Le 10 janv. 2012 00:05, "Henri Tremblay" <[email protected]> a
écrit :
>
> Hi,
>
> I'm having a CXF client. This client is configured with failover. It is
also configured with http authentication. I'll show you the setup below.
>
> My problem is that both are working separately but not together. The
authentication doesn't work on the alternate addresses. I think it's
because it's not the same conduit.
>
> Can someone help me to setup it?
>
> The failover configuration:
>
>       <jaxws:client id="stuff" serviceClass="com.acme.MyService"
address="${main_url}">
>
>             <jaxws:features>
>
>                   <clustering:failover>
>
>                         <clustering:strategy>
>
>                              <bean
class="org.apache.cxf.clustering.SequentialStrategy">
>
>                                    <property name="alternateAddresses">
>
>                                          <util:list>
>
>
<value>${backup_url}</value>
>
>                                          </util:list>
>
>                                    </property>
>
>                              </bean>
>
>                         </clustering:strategy>
>
>                   </clustering:failover>
>
>             </jaxws:features>
>
>       </jaxws:client>
>
> And the code for the authentification:
>
>       @PostConstruct
>
>       private void makeDigestHttpAuth() {
>
>             final Client proxy = ClientProxy.getClient(clientProxy);
>
>             final HTTPConduit conduit = (HTTPConduit) proxy.getConduit();
>
>             final AuthorizationPolicy authorizationPolicy = new
AuthorizationPolicy();
>
>             authorizationPolicy.setUserName(userName);
>
>             authorizationPolicy.setPassword(password);
>
>             conduit.setAuthorization(authorizationPolicy);
>
>             conduit.setAuthSupplier(new DigestAuthSupplier());
>
>       }
>
> Thanks for your help
> -
> Henri
>

Reply via email to