Skip to content

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