commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastien Laporte" <la...@touchtunes.com>
Subject Betwixt problem
Date Thu, 17 May 2007 21:27:39 GMT
Hi, 

 

I have just started using betwixt two weeks ago and it woks fine on my workstation which runs
under windows.

I've published the code to our server which works under Linux. Now when doing the parsing
of the xml, the object is only being partially populated.

 

Java code

 

BeanReader reader = new BeanReader();

            StringReader outputReader = new StringReader(xmlData);

 

            // Map the root ' objectx ' node of the XML to the Survey class

            reader.registerBeanClass("objectx", Objectx.class); 

 

            // Transform the XML file into a objectx  business object

            this.Objectx = (Objectx) reader.parse(outputReader);

 

xml betwixt file

 

<?xml version="1.0" encoding="UTF-8" ?>

<info primitiveTypes="element">

  <element name="objectx">

    <attribute name="id" property="id"/>

    <attribute name="version" property="version"/>

    <attribute name="name" property="name"/>

    <attribute name="lmd" property="lmd"/>

    <attribute name="type" property="type"/>

    <element name="messages" property="messages" />

</element>

</info>

 

Xml file 

 

<?xml version="1.0" encoding="UTF-8" ?>

  <objectx version="1.0" id="5" name="xxxxxx" lmd="1176756394911" type="branch">

    <messages>

      <closing>The Closing Message of your life</closing>

      <error/>

      <greeting>The Greeting Message of your life</greeting>

    </messages>

  </survey>

 

 

Only the messages element is being populated correctly. 

 

Any ideas?

 

Tx

 

Sébastien Laporte

 

 


CONFIDENTIALITY CAUTION 
This e-mail and any attachments may be confidential or legally privileged. If you received
this message in error or are not the intended recipient, you should destroy the e-mail message
and any attachments or copies, and you are prohibited from retaining, distributing, disclosing
or using any information contained herein. Please inform us of the erroneous delivery by return
e-mail. Thank you for your cooperation.
DOCUMENT CONFIDENTIEL 
Le présent courriel et tout fichier joint à celui-ci peuvent contenir des renseignements
confidentiels ou privilégiés. Si cet envoi ne s'adresse pas à vous ou si vous l'avez reçu
par erreur, vous devez l'effacer. Vous ne pouvez conserver, distribuer, communiquer ou utiliser
les renseignements qu'il contient. Nous vous prions de nous signaler l'erreur par courriel.
Merci de votre collaboration.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message