简体   繁体   中英

ERROR] s4s-elt-schema-ns: The namespace of 'bindings' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'

I am facing below error while compiling my jaxb file.

C:\bea\jdk160_05\bin>xjc cmf.jaxb
parsing a schema...
[ERROR] s4s-elt-schema-ns: The namespace of element 'bindings' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.
  line 2 of file:/C:/bea/jdk160_05/bin/cmf.jaxb

JaxB File is

<?xml version='1.0'?>
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"   xmlns:xs="http://www.w3.org/2001/XMLSchema"  version="2.1"> 
    <bindings schemaLocation="bi-cmf-flat_V1_0.xsd" >
        <!-- rename the value element -->
        <bindings node="//xs:complexType[@name='DeductibleType']">          
            <class name="DeductibleTypeAttribute"/>
        </bindings>
    </bindings>
</bindings>

The format for the XJC call is:

xjc -b <bindinfo> <schema>

This means your XJC call should be:

xjc -b cmf.jaxb bi-cmf-flat_V1_0.xsd

Example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM