cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
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 <richard.senior@gmail.com> 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 :
> 
> org.apache.ws.commons.schema.XmlSchemaException: 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:

http://www.w3.org/TR/xmlschema11-1/#declare-attribute

and scroll down to just before section 3.2.2.1, 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>
element.

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

Dan


> 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: http://cxf.547215.n5.nabble.com/Schema-validation-errors-on-publish-top-level-elements-may-not-have-a-use-tp5724860.html
> Sent from the cxf-user mailing list archive at Nabble.com.

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


Mime
View raw message