1

I got an attribute like this

private ArrayList<ArrayList<Vector3D>>    trajectories = new ArrayList<ArrayList<Vector3D>>();

Vector3D is a simple container for 3 double values. How do I marshall this properly with JAXB? I only get elements in the XML-File.

Mirco
  • 2,940
  • 5
  • 34
  • 57

1 Answers1

1

1) Use

private ArrayList<ListOfVectors>    trajectories = new ArrayList<ListOfVectors>();  

instead of

private ArrayList<ArrayList<Vector3D>>    trajectories = new ArrayList<ArrayList<Vector3D>>();  

where ListOfVectors is

@XmlAccessorType(XmlAccessType.FIELD)
public class ListOfVectors 
{
   ArrayList<Vector3D> list = new ArrayList<Vector3D>();
} 
Ilya
  • 29,135
  • 19
  • 110
  • 158
  • Thanks, this and this http://stackoverflow.com/questions/6137665/how-do-i-get-cxf-to-understand-a-mapstring-listmybean helped me – Mirco Nov 13 '12 at 13:35