I am currently trying to implement a CXF endpoint to receive messages based on a wsdl specification, route the message through a number of beans and xml transformations and then return the message as a SOAP response. This all seems to be working except I have been unable to get CXF to perform schema validation on the SOAP messages received. In my spring application context, I have the CXF endpoint and camel context/route setup as below. <cxfEndpoint xmlns="http://activemq.apache.org/camel/schema/cxfEndpoint" id="serviceEndpoint" wsdlURL="META-INF/wsdl/service.wsdl" serviceClass="com.services.Service" address="/Service"> <properties> <beans:entry key="schema-validation-enabled" value="true"/> </properties> </cxfEndpoint>
<camelContext id="camelContext" xmlns=" http://activemq.apache.org/camel/schema/spring"> <route> <from uri="cxf:bean:serviceEndpoint"/> <to uri="log:service"/> <convertBodyTo type="java.lang.String"/> <to uri="xslt:META-INF/xsl/messageTransformation.xsl"/> <to uri="bean:messageSenderBean?methodName=sendMessage"/> </route> </camelContext> When I send a message to CXF in a format that does not comply to the schema defined in the WSDL, CXF does not perform the validation and the message passes through successfully. Does anyone know why this might not be working? Is there any way to perform schema validation using CXF and Camel? Thanks Dan.
