commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Nanda <sam5...@gmail.com>
Subject Re: [betwixt] Problem loading a Bean in Betwixt
Date Mon, 17 Oct 2005 20:36:51 GMT
Hey Tom,

Just realized one thing doesnt wanna work as per the mapping.xml file (if at
all I use it). I have a "Person" element in my mapping file, which has its
bunch of elements:

<?xml version="1.0"?>
<betwixt-config>
<!--name of the class to map -->
<class name="com.mms.PeoplePersonsS">
<!-- standard definations (same as in standard .betwixt file) -->
<element name="Person">
<element name="personId" property="personId"/>
<element name="firstName" property="firstName"/>
<element name="lastName" property="lastName"/>
<element name="type" property="type"/>
</element>
</class>
</betwixt-config>

but when I use mapping file for configuring my BeanWriter, it certainly
doesnt include the <Person> element in the XML document:

<perspectiveResponse>
<object>
<personId>5667</personId>
<firstName>Kelly</firstName>
<lastName>Witham</lastName>
<type>Customer</type>
</object>
</perspectiveResponse>


Why ????

On 10/17/05, Sameer Nanda <sam504u@gmail.com> wrote:
>
> Kool I like that ....
>
> hey wanna go for a coffee :) :) where are you from by the way?
>
> Thank again
> -Sameer
>
> On 10/17/05, Thomas Dudziak <tomdzk@gmail.com> wrote:
> >
> > On 10/17/05, Sameer Nanda <sam504u@gmail.com> wrote:
> >
> > > I have a question, may sound a little bit stupid but its bugging me,
> > what
> > > would be the ideal purpose of having a Bean Reader ??? I mean I could
> > > understand that a BeanWrite would write your Bean in an XML form, so
> > does
> > > that mean a BeanReader reads an XML into a Bean ???
> > >
> > > I could hardly imagine a scenario where you would likely do this. Do
> > you
> > > happen to have an example?
> >
> > In your case it is probably not necessary. But in general, why do you
> > write your data to XML if nobody then reads it ? That's where the
> > BeanReader comes into play as it does just that: reading the XML back
> > into objects.
> >
> > Tom
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message