This sounds like a bug or issue in JAXB. I would recommend asking a question or logging a bug with the JAXB folks. Not really sure if there is anything we could do about it.
Dan On Jan 17, 2013, at 3:11 PM, Nick Komen <[email protected]> wrote: > I'm trying to create an object with a single property in it that is defined > as having unordered properties (xs:all) in the WSDL. I can do it with > objects with more than one property in them, but it seems that for objects > with a single property, it is being forced to an xs:sequence. > > For example, the following object (with an empty / unordered propOrder) > > @XmlAccessorType(XmlAccessType.FIELD) > @XmlType(name = "testObjectWithUnorderedFields", propOrder = {}) > public class TestObjectWithUnorderedFields { > > @XmlElement(namespace=Constants.NAMESPACE, required=true, nillable=true) > protected String field1; > > //Getters and Setters > } > > This object is rendered in the WSDL as: > <xs:complexType name="testObjectWithUnorderedFields"> > <xs:sequence> > <xs:element form="qualified" name="field1" nillable="true" > type="xs:string"></xs:element> > </xs:sequence> > </xs:complexType> > > I would like this to be rendered in the WSDL as an xs:all instead of a > sequence, as my intention is to add more fields to this object in the future. > Is there any way I can force CXF / JAXB to render this as an xs:all complex > type instead of an xs:sequence? > > I know I can add a second dummy field to force it to an xs:all, but I'd > prefer not adding dummy fields to do that now. > > Thanks! > > -Nick > > > NOTICE: This email message is for the sole use of the intended recipient(s) > and may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not the > intended recipient, please contact the sender by reply email and destroy all > copies of the original message. > -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
