Hello, The type of field person in class Customer is of type Person. Therefore the mapping compiler is able to map to the right class. Even so I use the map-as attribute to document the assoziation within the mapping file.
Mathias -------- Original-Nachricht -------- Datum: Thu, 7 Sep 2006 13:47:05 +1000 Von: Brian Wallis <[EMAIL PROTECTED]> An: "\'JiBX users\'" <jibx-users@lists.sourceforge.net> Betreff: Re: [jibx-users] Dumb mapping question > That would be a map-as="" wouldn't it? > > I saw that in the getting started pages, but what I missed is how the > example in Figure 1 worked, it doesn't have a map-as="" in the binding so > how does JiBX know to create a "Person" object? > > _____ > > From: Ilya Sterin [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 07, 2006 1:15 PM > To: JiBX users > Subject: Re: [jibx-users] Dumb mapping question > > > It's by adding > > type="..." > > attribute to structure element :-) > > Ilya > > > On 9/6/06, Brian Wallis < <mailto:[EMAIL PROTECTED]> > [EMAIL PROTECTED]> wrote: > > I'm new to jibx as of yesterday when I got it all downloaded and setup so > this might be a dumb question but... > > >>From the tutorial, Figure 1, we have a mapping like so: > > <binding> > <mapping name="customer" class="Customer"> > <structure name="person" field="person"> > <value .../> > </structure> > <value .../> > </mapping> > </binding> > > What I seem to be missing is how does the unmarshalling work out that it > needs to create an instance of the "Person" class for the structure > definition. The class name is not mentioned in the mapping. Is it > > 1) some sort of fuzzy name mapping from person to Person > 2) or is it via reflection on the field person in the Customer class? > > Seems likely it is the second way but I could find this explained > anywhere. > > thanks, > brian wallis... > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > &kid=120709&bid=263057&dat=121642 > > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net <mailto:jibx-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/jibx-users > <https://lists.sourceforge.net/lists/listinfo/jibx-users> > > > > > -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users