1 Reply Latest reply on Oct 19, 2010 11:35 AM by andreas_back

    SchemaValidation error

    Martin Sarabura Newbie

      I am testing schema validation. When I send in a request to the web service I get this error back:

      org.xml.sax.SAXParseException: s4s-elt-schema-ns: The namespace of element 'definitions' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.


      Not true! The namespace of element 'definitions' is in fact "http://schemas.xmlsoap.org/wsdl/", and if I use the xml schema namespace then wsimport fails - I'm using top-down web service development. I confirmed that I am using namespaces exactly as they are being used in the schemavalidation demo http://jbossws.jboss.org/mediawiki/index.php?title=SchemaValidation_Demo


      Does anybody have a recommendation? FYI here is the <definitions> tag:


      <definitions name="Integrity_2010Service"

        • 1. Re: SchemaValidation error
          andreas_back Novice

          Hello Martin,


          since your posting some time has passed, but it might be interesing to others that we made the schema validation in combination with the wsdlLocation attribute of @javax.jws.WebService running for


          *     JBoss 4.2.3 and

          *     jbossws-native-3.1.1



          A wsdlLocation like wsdlLocation="WEB-INF/BasisartikelKonfigurierenInternService.wsdl" and did the job for us.


          (The error message occured when the attribute schemaLocation of the annotation SchemaValidation was used with the wsdl as a value of the schemaLocation.)


          It is possible to start with a WSDL that is generated by JBoss under




          and then copy it to the WEB-INF folder.


          And there some modifications can be done on the WSDL, for instance if someone wants an xs:choice element or some special simple types in it.


          With best regards,