I am using spring 1.2.1, and experimenting with web services.

I have set up a simple web service using Spring and Axis, and a simple client to access it, also using Spring & JaxRpcPortProxyFactoryBean.

That works ok and I can access it with no problems.

My next step is to implement BASIC authentication. I have configured the server end, and when I try to access it without any changes to the client, I get an authentication error, as would be expected.

I then added username and password properties to the JaxRpcPortProxyFactoryBean. However when I now try to redeploy the client application, I get the error shown below.

Has anyone come accross this before? Or suggest how to solve it?

TIA

Code:
2005-06-17 10:07:00,999 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Creating shared instance of singleton bean 'wsTestService'
2005-06-17 10:07:02,396 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [wsTestService,wsClientController,urlMapping1,viewResolver,configsetter]; root of BeanFactory hierarchy}
2005-06-17 10:07:02,396 ERROR [org.springframework.web.servlet.DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wsTestService' defined in ServletContext resource [/WEB-INF/wsclient_config.xml]: Initialization of bean failed; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:  
java.net.ProtocolException: Server redirected too many  times (20)
javax.xml.rpc.ServiceException: Error processing WSDL document:  
java.net.ProtocolException: Server redirected too many  times (20)
	at org.apache.axis.client.Service.initService(Service.java:249)
	at org.apache.axis.client.Service.<init>&#40;Service.java&#58;164&#41;
	at org.apache.axis.client.ServiceFactory.createService&#40;ServiceFactory.java&#58;198&#41;
	at org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.createJaxRpcService&#40;LocalJaxRpcServiceFactory.java&#58;182&#41;
	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.prepare&#40;JaxRpcPortClientInterceptor.java&#58;290&#41;
	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.afterPropertiesSet&#40;JaxRpcPortClientInterceptor.java&#58;268&#41;
	at org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean.afterPropertiesSet&#40;JaxRpcPortProxyFactoryBean.java&#58;55&#41;
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods&#40;AbstractAutowireCapableBeanFactory.java&#58;962&#41;
The Spring config for my JaxRpcPortProxyFactoryBean is:

Code:
<beans>
    <bean id="wsTestService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
        <property name="serviceFactoryClass">
            <value>org.apache.axis.client.ServiceFactory</value>
        </property>
        <property name="wsdlDocumentUrl">
            <value>http&#58;//turtle/wstest/services/WsTest?wsdl</value>
        </property>
        <property name="namespaceUri">
            <value>http&#58;//turtle/wstest/services/WsTest</value>
        </property>
        <property name="serviceName">
            <value>InformixDataAccessorJaxRpcImplService</value>
        </property>
        <property name="portName">
            <value>WsTest</value>
        </property>
        <property name="portInterface">
            <value>org.stl.wstest.data.InformixDataAccessorRemote</value>
        </property>
        <property name="serviceInterface">
            <value>org.stl.wstest.data.InformixDataAccessor</value>
        </property>
        <!-- two properties added for authentication&#58; -->
        <property name="username">
            <value>wsuser</value>
        </property>
        <property name="password">
            <value>wspwd</value>
        </property>
    </bean>