You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Shakeel Shaik <sh...@gmail.com> on 2011/07/20 22:07:22 UTC

Schema validation with Code first approach

Hello,
I'm working on CXF web services with Java first approach. I'm using
jaxb annotation on beans for required and nillable attributes. Is there any
CXF framework that validates the schema and throw an error at marshelling
and unmarshelling phase? I tried @SchemaValidation  annotation in service
bean but could not find any difference with and without the this annotation.

Thanks in advance

Shak

Re: Schema validation with Code first approach

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, July 20, 2011 3:07:22 PM Shakeel Shaik wrote:
> Hello,
> I'm working on CXF web services with Java first approach. I'm using
> jaxb annotation on beans for required and nillable attributes. Is there any
> CXF framework that validates the schema and throw an error at marshelling
> and unmarshelling phase? I tried @SchemaValidation  annotation in service
> bean but could not find any difference with and without the this annotation.

That should do it.   You should likely grab the generated ?wsdl and check the 
schema there to make sure it matches exactly what you are expecting.  With 
code first, that would be the schema it would be validating against.

Dan


> 
> Thanks in advance
> 
> Shak
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com