I have a problem that I can not store more than one element in the same TAG, look at the XML:
<ItemCardapio>
<nCdItemCardapio>10</nCdItemCardapio>
<nQtdeItemCardapio>2</nQtdeItemCardapio>
<ObsProducao>
<sDsObservacaoProducao>Com Gelo</sDsObservacaoProducao>
</ObsProducao>
<ObsProducao>
<sDsObservacaoProducao>Sem Açucar</sDsObservacaoProducao>
</ObsProducao>
</ItemCardapio>
As you can see, the TAG "ObsProducao" repeats, instead of looking like this:
<ItemCardapio>
<nCdItemCardapio>10</nCdItemCardapio>
<nQtdeItemCardapio>2</nQtdeItemCardapio>
<ObsProducao>
<sDsObservacaoProducao>Com Gelo</sDsObservacaoProducao>
<sDsObservacaoProducao>Sem Açucar</sDsObservacaoProducao>
</ObsProducao>
</itemcardapio>
Follow the class with JAXB annotations:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"nCdItemCardapio",
"nQtdeItemCardapio",
"obsProducao"
})
public static class ItemCardapio {
protected int nCdItemCardapio;
protected int nQtdeItemCardapio;
@XmlElement(name = "ObsProducao")
protected List<WsTSPaymentParamPedido.ItemCardapio.ObsProducao> obsProducao;
..........
Now the repeating class:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"sDsObservacaoProducao"
})
public static class ObsProducao {
protected String sDsObservacaoProducao;
......