2

I've been using wsimport to generate client stubs and supporting classes. I have a particular class that holds a list and wsimport does not generate a setter for this list (which I need). I've read where setting the collectionType to "indexed" would generate setters, but I'm not sure how I would go about doing this with the maven plugin. Any ideas on how I can generate setters for lists?

josh-cain
  • 4,997
  • 7
  • 35
  • 55
  • Didn't it generate an getter where you can call add(..).. ? – khmarbaise May 30 '12 at 14:29
  • Yeah, that's the way I would up doing it. I was after a remove() method, but I was able to access it directly via the getter. Post as an answer and I'll accept if you like. However, I'm still curious as to why setters are generated for other types (such as Strings), but not lists... any ideas? – josh-cain May 30 '12 at 17:27

1 Answers1

3

You can call the getter which gives you access to an add() of the list which is usually used to add elements.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • but we cant communicate with BlazeDS without setter. I mean class generated by jaxb is unable to communicate with Flex etc... – nwzhaider Nov 26 '15 at 10:39