You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by yulinxp <yu...@gmail.com> on 2008/01/16 19:51:18 UTC
CXF spring configuration problem
I need to integrate CXF to my existing web application. My existing web
application has integration with Spring. Spring will load configuration from
a rootConfiguration.xml
//rootConfiguration.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd"
default-lazy-init="true" default-autowire="no">
<import resource="classpath:/some-other-configuration.xml" />
<import resource="classpath:/cxf-ws.xml" /> <------------cxf
web service
<bean
class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="rewire">
<bean
class="com.rwsol.express.spring.scope.RewireSessionScope"/>
</entry>
</map>
</property>
</bean>
...
</beans>
//cxf-ws.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:simple="http://cxf.apache.org/simple"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint id="helloWorld" implementor="demo.spring.HelloWorldImpl"
address="/ServerEndPoint" />
/>
After deploy, I can locate wsdl file. But my existing web application will
fail!!!!!!!!
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1233)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:129)
at
org.springframework.web.context.request.ServletRequestAttributes.registerSessionDestructionCallback(ServletRequestAttributes.java:221)
at
org.springframework.web.context.request.ServletRequestAttributes.registerDestructionCallback(ServletRequestAttributes.java:180)
at
org.springframework.web.context.request.AbstractRequestAttributesScope.registerDestructionCallback(AbstractRequestAttributesScope.java:63)
at
org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:285)
at
org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
at
org.springframework.web.context.request.SessionScope.get(SessionScope.java:82)
at
com.rwsol.express.spring.scope.RewireSessionScope.get(RewireSessionScope.java:25)
if I remove the following from cxf-ws.xml and define no endpoint. My
existing web application works fine. Any idea? ?
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
--
View this message in context: http://www.nabble.com/CXF-spring-configuration-problem-tp14888273p14888273.html
Sent from the cxf-user mailing list archive at Nabble.com.