We are getting an unexpected 'nillable="true"' in generated WSDL when using List
Issue
We have a web service that we expose from an EJB, a web method returns a object that contains collections like this:
public class Picture {
List<Person> buyers;
List<MyColor> colors;
public List<Person> getBuyers() {return buyers;}
public List<MyColor> getColors(){return colors;}
…
}
The wsdl generated contains the following for the class Picture
<xs:complexType name="picture">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="buyers" nillable="true" type="tns:person"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="colors" nillable="true" type="tns:myColor"/>
</xs:sequence>
</xs:complexType>
As you can see both of the collection are generated with nillable="true" where we expect @XMLElement defaults be applied:
public @interface XmlElement {
boolean nillable() default false;
…
}
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
- 6.x
- JBossWS-CXF
- JBossWS-Native
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.