camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob <robert.find...@atos.net>
Subject CXF Schema Validation with a Custom Response
Date Thu, 17 Jul 2014 10:33:45 GMT
Hi
I'm trying to employ schema validation on a camel route which uses
cxf:cxfEndpoint:

	<cxf:cxfEndpoint id="serviceMgtEndpointMain_v2"
		address="/{{mainPath}}/v2" serviceClass="com.myCompany.v2.ServicesSoap">
		<cxf:properties>
			<entry key="schema-validation-enabled" value="${mainSchemaValidation}" />
		</cxf:properties>
	</cxf:cxfEndpoint>

What I need to do is create a custom response using the error message as
part of the reply but I need to be able to set the Exchange body after
getting the error message. ie I have a ResultSet in my xsd which would have
the description set using the validation error message.

I have tried using <onException> only this doesn't catch it as the error
seems to be thrown during the cxf phase and is not within the route.  I have
investigated the use of interceptors but it looks rather complex for my
needs and experience.

If there are any alternatives or explanations on how I might use
interceptors for this that would be appreciated.  I am using camel version
2.12.2 and apache cxf version 2.7.8.




--
View this message in context: http://camel.465427.n5.nabble.com/CXF-Schema-Validation-with-a-Custom-Response-tp5753958.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message