Hello, I currently develop a CXF web service (http) for a Spring application. I have the application up and running including a transaction proxy arround the endpoint implementor. Everything works as expected.
Here comes my problem: Since the transaction proxy is only placed around the implementor, errors arising from interceptors will not cause the transaction to be rolled back. So if the outgoing schema validator throws an exception the transaction will not be rolled back. Is there a convinient way to configure CXF/Spring with transactions in a way that (a part of) the interceptor chain is included in the transaction? Here is my context.xml for the CXF web service <?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:jaxws="http://cxf.apache.org/jaxws" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.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="workshopWebServiceEndpoint" implementor="#workshopWebService" implementorClass="de.vtg.hermes.workshop.Workshop" wsdlLocation="xsd/Workshop.wsdl" xmlns:ws="http://www.vtg.de/hermes/workshop/" serviceName="ws:Workshop" address="/Workshop"> <jaxws:properties> <entry key="schema-validation-enabled" value="true" /> </jaxws:properties> <jaxws:features> <bean class="org.apache.cxf.transport.http.gzip.GZIPFeature" /> </jaxws:features> </jaxws:endpoint> <bean id="workshopWebService" class="com.its4rail.hermes.workshop.ws.HermesWorkshopWsImpl" scope="request"> <aop:scoped-proxy /> <constructor-arg ref="workshopRailcarUpdateProcess" /> <constructor-arg ref="workshopMessagesObjectFactory" /> <constructor-arg ref="workshopLogger" /> </bean> <aop:config> <aop:pointcut id="workshopWebServiceOperation" expression="execution(* com.its4rail.hermes.workshop.ws.HermesWorkshopWsImpl.*(..))"/> <aop:advisor advice-ref="transactionAdvice" pointcut-ref="workshopWebServiceOperation"/> </aop:config> </beans> -- View this message in context: http://cxf.547215.n5.nabble.com/CXF-Transactions-including-schema-validation-tp4932732p4932732.html Sent from the cxf-user mailing list archive at Nabble.com.
