Reputation: 3165
I'm generating an object which has an XSD schema
<xs:element name="roleAssignments" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="roleAssignment" type="tns:roleAssignmentDataObj" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
but which generates Java code as
protected ProjectDataObj.RoleAssignments roleAssignments;
I'm trying to get it generate
protected List<RoleAssignment> roleAssignments;
I've tried fiddling around with xjb binding for wsimport but that hasn't seemed to give me the control I want. Is there a way to do this?
Upvotes: 3
Views: 1003
Reputation: 3165
It turns out I needed to use a plug-in to XJC.
I used https://github.com/dmak/jaxb-xew-plugin. This plug-in will correctly generate the correct wrappers on the client side.
Upvotes: 2