cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Schema validation errors on publish.... "top level elements may not have a 'use'"
Date Wed, 20 Mar 2013 14:40:38 GMT

On Mar 20, 2013, at 9:59 AM, Richard Senior <> wrote:

> Hello,
> This is a pretty random question...
> I create some service code from a WSDL using the maven codegen tool.
> Then I use the jaxws:endpoint tag to create a service endpoint..
> All compiles and builds ok...
> But when I try to deploy I get :
> Top-level attributes may
> not have a 'use'
> Now.. it seems that one of the XSD's used by the wsdl has an attribute named
> 'use' in it, this is a legitimate attribute that specifies whether something
> is required or not.
> I think somehow this is getting confused with the wsdl 'use' attribute which
> has to do with 'document literal' etc.

Well, where is that attribute?  Top level or contained in a complexType or similar.  If you
look at:

and scroll down to just before section, it specifically states:

Note: The use attribute is not allowed on top-level <attribute> elements, so this can
only happen with <attribute> elements appearing within a <complexType> or<attributeGroup>

Thus, if the "use" is on a global attribute, the error message is correct.  It would be an
invalid schema.   


> I created my own bean that creates an EndpointImpl and calls publish
> manually but I get the same error.
> This is sensitive so I cannot really publish the wsdl here.. but if someone
> can help I should be able to provide something..
> Here's hoping someone knows straight away what the problem is...
> --
> View this message in context:
> Sent from the cxf-user mailing list archive at

Daniel Kulp -
Talend Community Coder -

View raw message