cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: The wsdl generated from cxf contains elements with minOccurs=0 instead of a choice
Date Wed, 16 Apr 2014 14:39:36 GMT

On Apr 16, 2014, at 7:55 AM, sfont <stefano.fontanel@gmail.com> wrote:

> Hi,
> we have solved introducing the wsdlLocation attribute in the jaws:endpoint
> configuration. We verified also that after that change if we enable the
> schema validation cxf validates the soap request and response against our
> original schema/wsdl :)
> 
> Searching the web we found that the wsdl that cxf publish by default
> (without the wsdlLocation configuration) is generated from the jaxws/jaxb
> annotations of the classes generated from the wsdl2java tool..Is it correct?

Yep.  That’s correct.   Not everything in schema is recorded in the JAXB generated classes.
 Things like facets and such are lost.  Additionally, there are several schema constructs
that map to the same JAXB structure so when you do the reverse, it may not be exactly the
same. 

In general, if you have a wsdl/schema, it’s likely best to use it via the wsdlLocation.


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


Mime
View raw message