Announcement Announcement Module
No announcement yet.
Problem accessing wsdl for authenticated web service Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem accessing wsdl for authenticated web service

    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?


    2005-06-17 10:07:00,999 INFO  [] Creating shared instance of singleton bean 'wsTestService'
    2005-06-17 10:07:02,396 INFO  [] Destroying singletons in factory { 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: Server redirected too many  times (20)
    javax.xml.rpc.ServiceException: Error processing WSDL document: Server redirected too many  times (20)
    	at org.apache.axis.client.Service.initService(
    	at org.apache.axis.client.Service.<init>&#40;;164&#41;
    	at org.apache.axis.client.ServiceFactory.createService&#40;;198&#41;
    	at org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.createJaxRpcService&#40;;182&#41;
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.prepare&#40;;290&#41;
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.afterPropertiesSet&#40;;268&#41;
    	at org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean.afterPropertiesSet&#40;;55&#41;
    The Spring config for my JaxRpcPortProxyFactoryBean is:

        <bean id="wsTestService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
            <property name="serviceFactoryClass">
            <property name="wsdlDocumentUrl">
            <property name="namespaceUri">
            <property name="serviceName">
            <property name="portName">
            <property name="portInterface">
            <property name="serviceInterface">
            <!-- two properties added for authentication&#58; -->
            <property name="username">
            <property name="password">