Thank you so much for looking at this ...

So I have a WSDL which specifies a wsdl:message - wsdl:part
element='req:blahRequest'
(so it references an xsd with namespace 'req'

The request xsd in turn declares a complext type and uses
xsd:extension base="req:Request" to refer to yet another XSD

that request in turn looks like this :

<schema xmlns="http://www.w3.org/2001/XMLSchema";
xmlns:messageContext="http://messaging.ei.blah.net/datatypes";
targetNamespace="http://www.censored.com/common/message/Request/v1.0";
version="1.0">
        <import namespace="http://messaging.ei.blah.net/datatypes";
schemaLocation="EIMessageContext2.xsd"/>
        <complexType name="Request">
                <sequence>
                        <element name="eiMessageContext2"
type="messageContext:EIMessageContext2"/>
                </sequence>
        </complexType>
</schema>

Now.. that namespace messaging.ei.blah.net/datatypes is in the original XSD
but the maven codegen tool uses the -p switch to put this into a different
package (that might have some impact?)

So finally the file that's causing the problem is the EIMessageContext2 file
which 
looks a bit like this :

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema";
xmlns:tns="http://messaging.ei.blah.net/datatypes";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://messaging.ei.tmobile.net/datatypes";
version="-UNDEFINED-">
....
...
        <complexType name="EIDescriptionElement">
            <annotation>
                    <documentation>
                             blahblah
                    </documentation>
                </annotation>
                <simpleContent>
                        <extension base="string">
                                <attribute default="en" ref="tns:lang" 
use="optional"/>
                                <attribute name="descId" type="string" 
use="optional"/>
                        </extension>
                </simpleContent>
        </complexType>

..
..

note the 'use' attribute here which is not the same as the WSDL use
attribute, but is perfectly valid for this schema.

What I don't understand is why when spring tries to create the
<jaxws:endpoint ... bean .. the wsdls are being validated at all, since by
this time.. the wsdls have already been converted into concrete classes by
maven...
It must be something in the annotations.. but what?

Would placing the wsdls in classpath and referencing them in the maven
codegen execution help?



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Schema-validation-errors-on-publish-top-level-elements-may-not-have-a-use-tp5724860p5724869.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to