You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2009/10/31 19:43:02 UTC
CXF-1126, my brain is nillable
A wrapped method that takes an object and an array of those objects, in
JAX-WS, yields the following. Not the lack of nillables.
This would seem to indicate that you can't pass a null in one of the array
slots, which in turn means that the above-captioned test is wrong and I
should fix it.
<xs:complexType name="beanFunction">
<xs:sequence>
<xs:element minOccurs="0" name="bean1"
type="ns1:testBean1"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
name="beanArray" type="ns1:testBean1"/>
</xs:sequence>
</xs:complexType>
Re: CXF-1126, my brain is nillable
Posted by Daniel Kulp <dk...@apache.org>.
Yea. This is one of the areas addressed by JAX-WS/JAXB 2.2. With 2.2, the
@XmlElement annotation can be added to the parameter to add the nillable
attribute. What I need to research more on is if @WebParam and @XmlElement
are both there and both have a "name", which name wins.
Of course, that's also JAX-WS/JAXB 2.2, not 2.1.
Dan
On Sat October 31 2009 2:43:02 pm Benson Margulies wrote:
> A wrapped method that takes an object and an array of those objects, in
> JAX-WS, yields the following. Not the lack of nillables.
> This would seem to indicate that you can't pass a null in one of the array
> slots, which in turn means that the above-captioned test is wrong and I
> should fix it.
>
> <xs:complexType name="beanFunction">
> <xs:sequence>
> <xs:element minOccurs="0" name="bean1"
> type="ns1:testBean1"/>
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="beanArray" type="ns1:testBean1"/>
> </xs:sequence>
> </xs:complexType>
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog