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
The Spring config for my JaxRpcPortProxyFactoryBean is: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>(Service.java:164) at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198) at org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.createJaxRpcService(LocalJaxRpcServiceFactory.java:182) at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.prepare(JaxRpcPortClientInterceptor.java:290) at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.afterPropertiesSet(JaxRpcPortClientInterceptor.java:268) at org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean.afterPropertiesSet(JaxRpcPortProxyFactoryBean.java:55) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:962)
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://turtle/wstest/services/WsTest?wsdl</value> </property> <property name="namespaceUri"> <value>http://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: --> <property name="username"> <value>wsuser</value> </property> <property name="password"> <value>wspwd</value> </property> </bean>


Reply With Quote