Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 10387 invoked from network); 16 Dec 2002 22:01:33 -0000 Received: from exchange.sun.com (HELO nagoya.betaversion.org) (192.18.33.10) by daedalus.apache.org with SMTP; 16 Dec 2002 22:01:33 -0000 Received: (qmail 2763 invoked by uid 97); 16 Dec 2002 22:02:44 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 2747 invoked by uid 97); 16 Dec 2002 22:02:43 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 2735 invoked by uid 98); 16 Dec 2002 22:02:43 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Mon, 16 Dec 2002 22:01:45 +0000 Subject: Re: [betwixt][BUG?] Destreaming custom collections using Hyphenated/DecapitalizeNameMapper? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.482) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N i've committed a fix for this. if you get the chance, give it a try. thanks for the unit tests. it turned out to be to do with recognition of recursive elements rather than anything to do with the NameMapper implementations so i might have had difficulties replicate it otherwise. - robert On Sunday, December 15, 2002, at 11:13 PM, Tim Anderson wrote: > Go for it. I didn't include the license out of laziness ;) > >> -----Original Message----- >> From: robert burrell donkin >> [mailto:robertburrelldonkin@blueyonder.co.uk] >> Sent: Monday, December 16, 2002 3:34 AM >> To: Jakarta Commons Developers List >> Subject: Re: [betwixt][BUG?] Destreaming custom collections using >> Hyphenated/DecapitalizeNameMapper? >> >> >> thanks. >> >> those unit tests demonstrate the problem fine. fancy donating them to the >> apache software foundation (saves me writing equivalent ones)? >> >> (you didn't include the apache license at the top of each so i thought it >> best to check...) >> >> - robert >> >> On Saturday, December 14, 2002, at 10:31 AM, Tim Anderson wrote: >> >>> Attached is a junit test case which reproduces the problem. >>> >>> Regards, >>> >>> Tim >>> >>>> -----Original Message----- >>>> From: Tim Anderson [mailto:tima@intalio.com] >>>> Sent: Saturday, December 14, 2002 7:50 PM >>>> To: commons-dev@jakarta.apache.org >>>> Subject: [betwixt][BUG?] Destreaming custom collections using >>>> Hyphenated/DecapitalizeNameMapper? >>>> >>>> >>>> Hi people, >>>> I am trying to destream some XML using betwixt into a >> class structure >>>> which looks like: >>>> >>>> public class Foos { >>>> // manages a collection of Foo >>>> public void addFoo(Foo foo) { ... } >>>> public Iterator getFoos() { .... } >>>> } >>>> >>>> public class Foo { >>>> // ... >>>> public void setValue(String value) { ... } >>>> public String getValue() { ...} >>>> } >>>> >>>> Using the DefaultNameMapper, this streams as: >>>> >>>> >>>> >>>> >>>> >>>> >>>> and destreams fine. However with the >> Hyphenated/DecapitalizeNameMappers, >>>> it doesn't destream correctly - the addFoo() method is not invoked. >>>> Streamed it looks like: >>>> >>>> >>>> >>>> >>>> >>>> Looking at the debug trace, the following messages from >>>> XMLIntrospector >>>> appear: >>>> .... >>>> Processing child >> ElementDescriptor[qname=foos,pname=foos,class=interface >>>> java.util.Iterator,singular=class Foo,updater=MethodUpdater >>>> [method=public >>>> void Foos.addFoo(Foo)]] >>>> >>>> Creating generic rule for recursive elements >>>> ^^^^^^^^^^^^ problem starts here^^^^^^^^^^^^ >>>> >>>> Created bean create rule >>>> Descriptor=ElementDescriptor[qname=foos,pname=foos,class=interface >>>> java.util.Iterator,singular=class Foo,updater=MethodUpdater >>>> [method=public >>>> void Foos.addFoo(org.apache.commons.sql.type.Foo)]] >>>> Class=class Foo Path prefix=*/foos >>>> Ignoring duplicate digester rule for path: */foos rule: >>>> BeanCreateRule [path >>>> prefix=*/foos >>>> descriptor=ElementDescriptor[qname=foos,pname=foos,class=interface >>>> java.util.Iterator, .... >>>> >>>> I'm configuring the introspector using: >>>> >>>> introspector.setAttributesForPrimitives(true); >>>> introspector.setWrapCollectionsInElement(false); >>>> introspector.setElementNameMapper(new >> DecapitalizeNameMapper()); >>>> >>>> Any ideas/workarounds? >>>> >>>> Thanks, >>>> >>>> Tim >>>> >>>> >>>> -- >>>> To unsubscribe, e-mail: >>>> >>>> For additional commands, e-mail: >>>> >>>> >>> -- >>> To unsubscribe, e-mail: >> >> org> >>> For additional commands, e-mail: >> >> org> >> >> >> -- >> To unsubscribe, e-mail: >> >> For additional commands, e-mail: >> >> > > > -- > To unsubscribe, e-mail: org> > For additional commands, e-mail: org> > -- To unsubscribe, e-mail: For additional commands, e-mail: