commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Goetz <kingofbr...@web.de>
Subject [betwixt] setting false object when parsing xml
Date Thu, 04 Sep 2008 16:22:31 GMT

Hi list!

I try to get betwixt 0.8 up and running and would like to map Java objects
to RSS 2.0 XML. It works fine up to the Item class, but then I can not get
the Category objects. Here is my Item.betwixt: 
<?xml version="1.0" encoding="UTF-8"?>
<info primitiveTypes="element">
  <element name="item">
    <element name="title" property="title" />
    <element name="category" property="category" />
  </element>
</info>

And the Category.betwixt: 
<?xml version="1.0" encoding="UTF-8"?>
<info primitiveTypes="element">
  <element name="category" property="name">
    <attribute name="domain" property="domain" />
  </element>
</info>

As you can see, my Item class has a property of Category, which itself has a
name and a domain member. When I run the serialisation I can see that my
Items are constructed, that the Category objects are constructed, but then I
get this in the log file: 
DEBUG [org.apache.commons.betwixt.expression.MethodUpdater] Calling setter
method: setName on bean: [...].Item@143c8b3 with new value:
[...].Category@1feca64
WARN [org.apache.commons.betwixt.expression.TypedUpdate] cannot evaluate:
MethodUpdater [method=public void [...].Category.setName(java.lang.String)]
on bean: [...].Item@143c8b3 of type: [...].Item with value:
[...].Category@1feca64 of type: [...].Category

It looks as if betwixt would try to call setName on the Item class instead
of Category. Can anyone explain me why this is happening? Am I missing
something in my mapping files? 

Thanks a lot for your help!

Peter
-- 
View this message in context: http://www.nabble.com/-betwixt--setting-false-object-when-parsing-xml-tp19314341p19314341.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message