Suffix in xjb binding does not work correctly. Java. Wsdl

I am generating Java classes from WSDL. It has several conflicts, so I use a binding file.

I will show 2 cases. My question is why the second suffix approach does not work.

Working example:

<jaxb:bindings schemaLocation="../wsdl/WebServiceSVC-init.wsdl#types?schema18">
    <jaxb:bindings node="//xs:element[@name='MyConfictElement']">
        <jaxb:class name="MyConfictElement_Element"/>
    </jaxb:bindings>
</jaxb:bindings>

It resolves this conflict, but in this case I need to go through several conflicts and resolve them, like this manual one by one.

The second does not work, but prefers the case for me - it automatically adds a suffix, as in the previous case:

<jaxb:bindings schemaLocation="../wsdl/WebServiceSVC-init.wsdl#types?schema18">
    <jaxb:schemaBindings>
            <jaxb:package name="com.kirillch.classes.Egrul"/>
            <jaxb:nameXmlTransform>
                <jaxb:elementName suffix="_Element"/>
                <!--<jaxb:typeName suffix="_Type"/>-->
            </jaxb:nameXmlTransform>
    </jaxb:schemaBindings>
</jaxb:bindings>

If I use this case, conflicts will not be resolved.

0
source share

All Articles