Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XJC: anyAttribute ignored when combined with inheritance #1146

Closed
Tomas-Kraus opened this issue Oct 4, 2017 · 3 comments
Closed

XJC: anyAttribute ignored when combined with inheritance #1146

Tomas-Kraus opened this issue Oct 4, 2017 · 3 comments

Comments

@Tomas-Kraus
Copy link
Member

Hi,

When using XJC 2.3.0 on the following schema, the anyAttribute is not processed, so the otherAttributes field in not generated in my bean:

<xsd:complexType name="jsonObject">
        <xsd:complexContent>
            <xsd:extension base="tns:jsonNode">
                <xsd:sequence>
                    <xsd:element ref="tns:jsonNode" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
                <xsd:attribute name="name" type="xsd:string" use="optional"/>
                <xsd:anyAttribute namespace="##any" processContents="lax"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

When removing the inheritance, the otherAttributes field is properly generated:
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();

Workaround: use the last version supporting this combination, 2.1.10.

@Tomas-Kraus
Copy link
Member Author

@rcosne Commented
Pull request submitted: javaee/jaxb-v2#1165

@Tomas-Kraus
Copy link
Member Author

@lukasj
Copy link
Member

lukasj commented Oct 15, 2019

fixed

@lukasj lukasj closed this as completed Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants