camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: SOAP message schema validation with CXF endpoint
Date Mon, 27 Oct 2008 13:59:02 GMT
Hi Dan,

I just add a test to verify the issue, the schema validation
configuration should work in my case[1][2].

Since the schema validation is based on JAXB's marshal and unmarshal, so
you need to configure the CXF Endpoint's data formate to be POJO.

>From you description, I don't think convert a parameter list into a xml
String, so I think your CXF Endpoint's data fromate is MESSAGE which
just leverage the CXF transport and does't touch any JAXB stuff.

So that is why you don't get the validate exception there.

[1] xml
[2] test


Daniel Pike wrote:
> 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=""
>                  id="serviceEndpoint"
>                  wsdlURL="META-INF/wsdl/service.wsdl"
>                  serviceClass=""
>                  address="/Service">
>         <properties>
>             <beans:entry key="schema-validation-enabled" value="true"/>
>         </properties>
> </cxfEndpoint>
> <camelContext id="camelContext" xmlns="
>         <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.

View raw message