Hi Alberto, 

Here actually your doing marshalling (object to xml conversion), I
guess.

 

In your binding file, particularly for structure 1, u have mapped first
element of your xml (not binding xml), to unmeCdDensidadeOleo field   of
your pojo, particularly.

Same for 2-5 structure elements in binding file.

 

But, for 6th structure, u didn't mention itemMedicaoOleoGases element is
mapped to which field.

 

So, solution is change your 6th structure to 

 

<structure field="itemMedicaoOleoGases" usage="optional"> (6)

 


Thanks & Regards,

Ravi K

 

 

 

From: Alberto Ivo [mailto:alberto...@gmail.com] 
Sent: Thursday, April 16, 2009 6:01 PM
To: JiBX users
Subject: [jibx-users] A really big doubt about Jibx

 

Hello,

I'm having a huge problem with Jibx and I have tried many things but
unsuccessful... My doubt is the following:

In my entity I have 5 structure (all of the same type: UnidadeMedida):

<structure field="unmeCdDensidadeOleo" usage="optional" /> (1)
<structure field="unmeCdTempSepara" usage="optional" /> (2)
<structure field="unmeCdPressMont" usage="optional" /> (3)
<structure field="unmeCdPressJusante" usage="optional" /> (4)
<structure field="unmeCdPressSepara" usage="optional" /> (5)
<structure name="itemMedicaoOleoGases" usage="optional"> (6)

The first structure unmeCdDensidadeOleo can be null. The others are
mandatory. And when I don't put a value for it, my generated XML file is
like this:

<UnidadeMedida>
     <unmeCdUnidade>20</unmeCdUnidade>      (2)
</UnidadeMedida>
<UnidadeMedida>
     <unmeCdUnidade>46</unmeCdUnidade>      (3)
</UnidadeMedida>
<UnidadeMedida>
     <unmeCdUnidade>46</unmeCdUnidade>      (4)
</UnidadeMedida>
<UnidadeMedida>
     <unmeCdUnidade>46</unmeCdUnidade>      (5)
</UnidadeMedida>
  the (1) is null

Note that it was generated only 4 tags for <UnidadeMedida> instead of 5.
My problem is: when I import the XML file, it throws the value in the
1,2,3,4 when should be 2,3,4,5.

I don't know if you understand me... but the fact is, I want that
appears the 5 <UnidadeMedida> because the XML doesn't know which one is
the correct attribute.

thanks very much!

-- 
Alberto Ivo Vieira



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly 
prohibited and may be unlawful.
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to