You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sachin Nikam <sk...@gmail.com> on 2014/01/04 04:22:58 UTC

JAXB Validation vs Schema validation

what is the difference between the schema-validation-enabled property and
set-jaxb-validation-event-handler property?

    <jaxws:endpoint
            id="XYZ" address=""
            serviceName="ABC" endpointName="ABXY"
            implementor="#POAU">
<jaxws:properties>
    <entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
    </jaxws:endpoint>

   <jaxws:client id="omsCXFClient" serviceClass="XYZ"
   address="xyz">
     <jaxws:properties>
            <entry key="set-jaxb-validation-event-handler"
value="false" /> <!-- needed for backwards compatibilty -->
        </jaxws:properties>
.......
<jaxws:client>

Re: JAXB Validation vs Schema validation

Posted by Daniel Kulp <dk...@apache.org>.
schema validation enables full schema validation based on the schema defined in the XSD.   

The JAXB validation handler is a subset of that validation that can be done with very little overhead.  For the most part, that is just things like unknown elements or elements in wrong namespaces and such.   The full validation can handle things like facets (minOccurs/maxOccurs, patterns, etc…).


Dan



On Jan 3, 2014, at 10:22 PM, Sachin Nikam <sk...@gmail.com> wrote:

> what is the difference between the schema-validation-enabled property and
> set-jaxb-validation-event-handler property?
> 
>    <jaxws:endpoint
>            id="XYZ" address=""
>            serviceName="ABC" endpointName="ABXY"
>            implementor="#POAU">
> <jaxws:properties>
>    <entry key="schema-validation-enabled" value="true" />
> </jaxws:properties>
>    </jaxws:endpoint>
> 
>   <jaxws:client id="omsCXFClient" serviceClass="XYZ"
>   address="xyz">
>     <jaxws:properties>
>            <entry key="set-jaxb-validation-event-handler"
> value="false" /> <!-- needed for backwards compatibilty -->
>        </jaxws:properties>
> .......
> <jaxws:client>

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com