Announcement Announcement Module
Collapse
No announcement yet.
Spring, WebService as Client and Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring, WebService as Client and Server

    Hi,

    currently I am developing a web-application which should expose some services as webservices and it should use these directly as webservice. So I tried to adapt the example from the spring-book. Here is what I have:

    0.) a context "myContext" which has spring and axis activated
    1.) a WebService FeedServer which is successfully registered in axis (but only if I am not using spring)
    2.) an error when I try to init a bean "feedWebService" from Spring. The ApplicationContext-Data for this is:

    Code:
    <bean id="feedWebService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
            <property name="serviceInterface">
                <value>kos.wnetz.modules.synd.RemoteFeedService</value>
            </property>
    			
            <property name="wsdlDocumentUrl">
                <value>http&#58;//localhost&#58;8080/kos/services/FeedService?WSDL</value>
            </property>
            <property name="namespaceUri">
                <value>http&#58;//localhost&#58;8080/kos/services/FeedService</value>
            </property>
            <property name="serviceName">
                <value>FeedService</value>
            </property>
    		
            <property name="portName">
                <value>FeedService</value>
            </property>
        </bean>
    Now when I try to start my web-app with the give configuration above I get the follwing error:

    Code:
    &#91;ERROR&#93; ContextLoader - Context initialization failed <org.springframework.beans.factory.BeanCreationException&#58; Error creating bean with name 'feedWebService' defined in ServletContext resource &#91;/WEB-INF/applicationContext.xml&#93;&#58; Initialization of bean failed; nested exception is javax.xml.rpc.ServiceException&#58; Error processing WSDL document&#58;  
    java.io.FileNotFoundException&#58; http&#58;//localhost&#58;8080/kos/services/FeedService?WSDL>org.springframework.beans.factory.BeanCreationException&#58; Error creating bean with name 'feedWebService' defined in ServletContext resource &#91;/WEB-INF/applicationContext.xml&#93;&#58; Initialization of bean failed; nested exception is javax.xml.rpc.ServiceException&#58; Error processing WSDL document&#58;  
    java.io.FileNotFoundException&#58; http&#58;//localhost&#58;8080/kos/services/FeedService?WSDL
    javax.xml.rpc.ServiceException&#58; Error processing WSDL document&#58;  
    java.io.FileNotFoundException&#58; http&#58;//localhost&#58;8080/kos/services/FeedService?WSDL
    	at org.apache.axis.client.Service.initService&#40;Service.java&#58;249&#41;
    	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;181&#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;937&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;334&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;222&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;146&#41;
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons&#40;DefaultListableBeanFactory.java&#58;271&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;310&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;133&#41;
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;230&#41;
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;156&#41;
    	at org.springframework.web.context.ContextLoaderServlet.init&#40;ContextLoaderServlet.java&#58;81&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1029&#41;
    	at org.apache.catalina.core.StandardWrapper.load&#40;StandardWrapper.java&#58;862&#41;
    	at org.apache.catalina.core.StandardContext.loadOnStartup&#40;StandardContext.java&#58;4013&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4357&#41;
    	at org.apache.catalina.core.StandardContext.reload&#40;StandardContext.java&#58;3043&#41;
    	at org.apache.catalina.manager.ManagerServlet.reload&#40;ManagerServlet.java&#58;1014&#41;
    	at org.apache.catalina.manager.ManagerServlet.doGet&#40;ManagerServlet.java&#58;330&#41;
    	at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;689&#41;
    	at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;802&#41;
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;237&#41;
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
    	at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;214&#41;
    	at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
    	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
    	at org.apache.catalina.core.StandardContextValve.invokeInternal&#40;StandardContextValve.java&#58;198&#41;
    	at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;152&#41;
    	at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke&#40;AuthenticatorBase.java&#58;540&#41;
    	at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;102&#41;
    	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
    	at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;137&#41;
    	at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
    	at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;117&#41;
    	at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;102&#41;
    	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
    	at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;109&#41;
    	at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
    	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
    	at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;929&#41;
    	at org.apache.coyote.tomcat5.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;160&#41;
    	at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;799&#41;
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;705&#41;
    	at org.apache.tomcat.util.net.TcpWorkerThread.runIt&#40;PoolTcpEndpoint.java&#58;577&#41;
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;683&#41;
    	at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
    I think the problem is that my web-app is client and server and the axis-Servlet is'nt ready - but I don't know what I can do about it. Setting the <load-on-startup> parameters did'nt help.

    I would be glad for any suggestions.

    Tino[/code]
Working...
X