You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the array item type is a primitive, nillable should be false.
Additionally, permitting @xmlelement would allow customization
It could be used to override the current default mapping (of nillable
=true). For.e.g
@javax.jws.WebService
public class ComplexDataTypesImpl {
public int[] retArrayInt1D(@xmlelement(nillable=false) int[] intArray){ return intArray; }
Since the parameter -> element mapping is done by JAX-WS not JAXB, JAX-WS spec
also needs to specify when the nillable is true or false for both the default
case (which is not clear in the spec) as well as the case when @xmlelement is
used on a parameter.
The following
@javax.jws.WebService
public class ComplexDataTypesImpl {
public int[] retArrayInt1D(int[] intArray)
{ return intArray; }
}
results in the XSD mapping
<xs:complexType name="retArrayInt1D">
xs:sequence
<xs:element name="arg0" type="xs:int" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Since the array item type is a primitive, nillable should be false.
Additionally, permitting @xmlelement would allow customization
It could be used to override the current default mapping (of nillable
=true). For.e.g
@javax.jws.WebService
public class ComplexDataTypesImpl {
public int[] retArrayInt1D(@xmlelement(nillable=false) int[] intArray){ return intArray; }
}
would result in
<xs:complexType name="retArrayInt1D">
xs:sequence
<xs:element name="arg0" type="xs:int" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
The use of the XmlElement on a parameter requires a spec change. Looks there is
an already an issue for that https://jaxb.dev.java.net/issues/show_bug.cgi?id=444 .
Since the parameter -> element mapping is done by JAX-WS not JAXB, JAX-WS spec
also needs to specify when the nillable is true or false for both the default
case (which is not clear in the spec) as well as the case when @xmlelement is
used on a parameter.
Environment
Operating System: All
Platform: Sun
Affected Versions
[2.1.2]
Source: javaee/metro-jax-ws#483
Author: glassfishrobot
The text was updated successfully, but these errors were encountered: