Hi, If you don't provide a mapping for all classes involved, Castor XML will use an introspector approach for all classes not mapped (using some default naming conventions for working out member names etc.).
To be honest, the error message 'unable to find FieldDescriptor for 'gateway' in ClassDescriptor of gateway' somehow does not make sense, but this might be a result of working in that 'mixed' mode. Regards Werner Guttmann PS If you do not intend to provide a separate Java class (and a mapping) for the <config> element, you might want to consider the use of the location attribute (if applicable). > -----Ursprüngliche Nachricht----- > Von: Jon Wilmoth [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 29. März 2007 01:39 > An: [email protected] > Betreff: [castor-user] XML binding > > I'm having problems mapping an existing XML document to existing classes > using castor-0.9.5.3 and I'd like to know if I'm simply not doing > something right or if the functionality doesn't exist in the version I'm > using. > With an XML doc something like: > > <config> > <gateway> > <name></name> > <url></url> > <action> > <name></name> > <ID></ID> > </action> > <action> > <name></name> > <ID></ID> > </action> > </gateway> > </config> > > I'm trying unmarshal some elements, but not all to a class, but I'm > getting an org.xml.sax.SAXException: unable to find FieldDescriptor for > 'gateway' in ClassDescriptor of gateway". I thought I'd start small, but > the even the following mapping file won't unmarshall. > > <class name="com.mypackage.Gateway" auto-complete="false"> > <map-to xml="gateway"/> > <field name="name" type="java.lang.String"> > <bind-xml name="name" node="element"/> > </field> > </class> > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

