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

Add property -Djaxb.allowNonNillableArray=true #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add property -Djaxb.allowNonNillableArray=true #31

wants to merge 5 commits into from

Conversation

eheeren
Copy link

@eheeren eheeren commented Feb 12, 2019

The following issue has been reported by a customer:

The @xmlelement(nillable=false) doesn't work with String[] only. i.e. cannot
customized the default nillable element of String array.

DIAGNOSTIC ANALYSIS

The below doc specifies that default value for nillable is false

https://docs.oracle.com/javaee/7/api/javax/xml/bind/annotation/XmlElement.html#nillable()

So trying to override using @xmlelement(name="title01", nillable=true) and
@xmlelement(name="title01", nillable=false)

But the XSD artifact which is generated in output directory is always true.

xsd:sequence
<xsd:element name="arg0" type="xsd:string" minOccurs="0"
maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="getEntitlementsResponse">
xsd:sequence
<xsd:element name="title01" type="xsd:string" minOccurs="0"
maxOccurs="unbounded" nillable="true"/>
</xsd:sequence

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

Successfully merging this pull request may close these issues.

1 participant