On Tuesday 02 October 2007, Kaleb Walton wrote: > I'm using the simple server configured via Spring. When an object > contains an empty list (not null) my response does not return it as an > empty list - it just excludes the property from the response. Is there > any way to force it to include the property?
I'd probably have to see both the schema and the soap message. Most likely, the answer is no without creating a holder bean to hold the list. For the most part, when we see something like List<String>, we just create: <element name="foo" type="string" maxOccurs="unbounded" nillable="true"/> In that case, if the list is empty (or even if the list is null), nothing representing the list will appear on the wire. That is how the JAXB spec calls for it to be done. If you want something always on the wire, the schema would have to be something like: <element name="fooList"> <complexType> <sequence> <element name="foo" type="string" maxOccurs="unbounded" nillable="true"/> </sequence> <complexType> </element> and a "FooList" class would be created to hold the List<String>. -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
